SA-MP Forums Archive
Do I need IsPlayerConnected in this? - 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: Do I need IsPlayerConnected in this? (/showthread.php?tid=402487)



Do I need IsPlayerConnected in this? - jakejohnsonusa - 26.12.2012

Do I need the server to check:
pawn Code:
if(IsPlayerConnected(playerid))
when someone does /buygun? Like if they do /buygun doesn't that mean the're connected? The GM I'm using had that when I got it so I'm unsure.

Thanks,
jakejohnsonusa


AW: Do I need IsPlayerConnected in this? - Mellnik - 26.12.2012

No, or are not connected players able to use commands?


Re: Do I need IsPlayerConnected in this? - kaisersouse - 26.12.2012

as far as I'm concerned, you don't need IsPlayerConnected in any of the default callbacks....as they wouldn't get called if the player wasnt connected.


Re: Do I need IsPlayerConnected in this? - jakejohnsonusa - 26.12.2012

In this case they wouldn't be able to use it if they aren't connected as it then checks to see if they have a Gun License. So Thanks guys, I'll remove it. That make life way easier!