SA-MP Forums Archive
setnumber cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: setnumber cmd (/showthread.php?tid=415996)



setnumber cmd - Yako - 15.02.2013

Hello, I making the setnumber command which changes the phone number of player and I want to know how to check if the provided number is already in use. I using y_ini for saving player stats. Thanks


Re: setnumber cmd - Yako - 16.02.2013

bump


Re: setnumber cmd - Da_Noob - 16.02.2013

I don't know if this will work, but try it.

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPhone] == number)
{
SendClientMessage(playerid, COLOR_WHITE, "This phonenumber is already in use.");
}
}
}
Just something quick I made, don't know if it'll work.


Re: setnumber cmd - Yako - 16.02.2013

It works of course, but it checks only online players numbers, I need to check offline players But thanks anyway