[Tutorial] - GCPhone - Adding calls and job messages

Steam name is not character name ?
( where is store real caractere name ? )

Blocking the name in account creation requires too many changes.

I can show only caractere name if you want.

 ## CONCAT(users.NAME, " @ ", twitter_accounts.username)  as author,
 user.????caractereName as author

Alternative method
Overwrite event gcPhone:twitter_createAccount
=> return error if username not equals CharacterName

RegisterServerEvent('gcPhone:twitter_createAccount')
AddEventHandler('gcPhone:twitter_createAccount', function(username, password, avatarUrl)
  local sourcePlayer = tonumber(source)

  local caractereName = '' -- getCaractereName ....
  if username ~= caractereName  then
    TwitterShowError(sourcePlayer, "Twitter", "username not equals carectereName")
  end


  TwitterCreateAccount(username, password, avatarUrl, function (id)
    if (id ~= 0) then
      TriggerClientEvent('gcPhone:twitter_setAccount', sourcePlayer, username, password, avatarUrl)
      TwitterShowSuccess(sourcePlayer, 'Twitter Info', 'APP_TWITTER_NOTIF_ACCOUNT_CREATE_SUCCESS')
    else
      TwitterShowError(sourcePlayer, 'Twitter Info', 'APP_TWITTER_NOTIF_ACCOUNT_CREATE_ERROR')
    end
  end)
end)

Hmm weird, now my “Create your account” button is grayed out. Also the character name is stored in our “users” table.

I’ll show you screenshots from another server that had this.

Login page

https://i.imgur.com/RT2MmXJ.png

Sign up page

https://i.imgur.com/so0IYFa.png

If making this possible requires too many changes, it’s fine. I just feel like with this type of freedom, people are going to make troll usernames and stuff. Locking the username by default for any server would be a better option tbh.

Edit: Nvm, you just needed to having matching passwords, oops. But yeah, it never set my characters name by default either way.

Ah see I wanted to go a step further and completely remove the signup all together. When you open it up you already have an account based on your characters name and you could change your picture but that’s it.

In the “User” table everyone has a unique ID based on Steam and whatever you name your character when you first join the server is under the “Name” column with ESX. So the info is already there it’s just about connecting them and I don’t think it will be to hard.

Honestly for me it comes down to not wanting to deal with passwords. To many people use the same password for everything and in the database you can just see whatever they pick right out in the open. I just don’t want to be responsible for that kind of information if someone decides to use their bank password or something stupid. Plus I think its just a nice QOL not having to remember another password if you do use something unique, in case you ever need it.

1 Like

I know exactly what you mean. I was also going to recommend the option of not even having it stored in a database at all, pretty sketchy in my opinion.

If you figure some shit out, could you let me know?

1 Like

Sorry, but it’s asking for too much change. Avatars and likes are linked to the twitter_accounts table. The changes would break the current version.

It’s workable, but I would not do it. Sry

1 Like

I think the best bet would just be first time you open the app you hit login. That would generate your name based off the User column and put your name/avatar on the twitter_accounts table. It’s redundant but seems like a pretty simple fix. Probably just throw a default avatar on them in the process since it’s not actually required currently and until you pick one you get the broken image icon.

1 Like

How can i modify the srcipt for the police and sheriff reveive same messages ?

Comment je peux faire pour que la police et les sheriffs reçoivent le meme message quand un appel police est fait ?

1 Like

Modifié les fonctions des events esx:playerLoaded & esx:playerDropped.
Si le jobs est police ou sheriff tu fait 2 trigger event ‘esx_addons_gcphone:addSource’ avec les 2 jobs.
Et inversement pour la deco.

1 Like

is there anyway your able to make this phone removable? so like an inventory item? and if so then a explanation would be awesome! Thanks. @SuisseGames

1 Like

Hello, I have followed everything but phone is not showing, when i press the button that should open the phone the minimap flash for half second and ped is getting that animation holding a phone but no phone is visible just animation. Older version of gcphone worked fine for me, also start order is correct and everything in sql is also fine. I have tracked it and it starts the function TooglePhone() and thats all, is there something wrong with SendNUIMessage or any idea whats wrong and why older version worked fine? Also tried to triggger event "gcPhone:forceOpenPhone"

1 Like

worked with me after like 4 hours of failing the Config file … this file is really sensitive if I change anything will fail the phone to work … … tbh I surrender after that and I just upload the last file with tweeter on it and I just change the network name and the F2 thingy and all good … until like 30 min ago somehow the SMS for Police and Ambulance didn’t work … so I just will let it be for now I will get back to it tomorrow… thank you btw for the sweet Mod… <3

1 Like

Je n’ai pas compris…

1 Like

I have the Probelm with the White Screen. when i send a Message then is the messages screen/page onlny white. can anyone help me

1 Like

My phone calls to police and ambulance arent working can anyone help?

1 Like

@WhatTheEthan … Search

1 Like

anyone know where the config is to change the default language to English?

1 Like

Edit gcphone/html/static/js/app.js replace fr_FR with en_US

2 Likes

the only thing not working is the voice. people can call but neither person can hear each other

2 Likes

Edit gcphone/html/static/config/config.json

change “useWebRTCVocal”: true,

to “useWebRTCVocal”: false,

1 Like

it is set to false but i am using esx_voice and vmenu and they both use voice?