SA-MP Forums Archive
[HELP] !IsPlayerConnected <--- Noob Question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] !IsPlayerConnected <--- Noob Question (/showthread.php?tid=197550)



[HELP] !IsPlayerConnected <--- Noob Question - Larsey123IsMe - 09.12.2010

I get 1 ERROR:

pawn Код:
new id = strval(tmp); //<--- Here
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
ERROR:
pawn Код:
undefined symbol "tmp"



Re: [HELP] !IsPlayerConnected <--- Noob Question - __ - 09.12.2010

You haven't defined tmp, so there's no value to it, so you'll have 0 returned every single time.

Take a look at strtok on the SA-MP wiki to gain a better understanding of how it works.


Re: [HELP] !IsPlayerConnected <--- Noob Question - Abraham2nds - 09.12.2010

At the top of script:
Код:
new tmp[128];
And at where ever u doing:
Код:
new id = strval(tmp); //<--- Here
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");



Re: [HELP] !IsPlayerConnected <--- Noob Question - Larsey123IsMe - 09.12.2010

Thaks


Re: [HELP] !IsPlayerConnected <--- Noob Question - Abraham2nds - 09.12.2010

Tell me if it work
BTW contact me (PM) if you would like to be ADMIN on my brand new server

=========================
This forum requires that you wait 120 seconds between posts. Please try again in 21 seconds.