21.04.2018, 17:21
This might sound sarcastic and blunt but the function you copied already shows it all
just a little bit explaining though
sscanf's u parameter is explained this way.
sscanf's i or d parameter is explained this way.
now your "targetid" is the best explanation I could use as the targetid, it explains itself
Target ID which is the targetted player id on the pm CMD
now you want to target the players phone number
you can either use the Players ID as a Target ID then use it to get the phone number, which is not how phone works, or you can use that Target ID as an integer variable to hold the phone number and use it to send the message to the player
u usage would be
the d usage would be
just a little bit explaining though
sscanf's u parameter is explained this way.
Quote:
u parameter can hold a player id and a playername converting the playername into ID and place it into the variable |
Quote:
d or i parameter can hold a integer and place it into the variable. |
Target ID which is the targetted player id on the pm CMD
now you want to target the players phone number
you can either use the Players ID as a Target ID then use it to get the phone number, which is not how phone works, or you can use that Target ID as an integer variable to hold the phone number and use it to send the message to the player
u usage would be
PHP код:
if(sscanf(params, "us[32]", targetid, string)) return SCM blah blah
SendClientMessage(playerid, -1, string);
PHP код:
if(sscanf(params, "ds[32]", targetid, string)) return SCM blah blah
new phonetarget;
foreach(new i : Player)
{
if(targetid == PlayerData[i][phonenumber]) phonetraget = i; break;
}
SCM(phonetarget, -1, string);