Quick 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: Quick Question (
/showthread.php?tid=109001)
Quick Question -
Zeromanster - 17.11.2009
Do i need to use IsPlayerConnected at the begining of every command ? Like this:
pawn Код:
cmd(somecommand, playerid, params[])
{
if(IsPlayerConnected(playerid))
{
// code
}
return 1;
}
Somebody pointed out to me that there's no need for that, so i would just like to confirm ?
Thanks.
Re: Quick Question -
Peter_Corneile - 17.11.2009
Its not necessary but i recommend to use it ..
Btw next time make a better
subject for your topic
Re: Quick Question -
Zeromanster - 17.11.2009
Quote:
Originally Posted by ►Peter Corneile◄
Its not necessary but i recommend to use it ..
Btw next time make a better subject for your topic
|
Okay, thanks.
Re: Quick Question -
Peter_Corneile - 17.11.2009
Quote:
Originally Posted by zєяσмαиѕтєя
Quote:
Originally Posted by ►Peter Corneile◄
Its not necessary but i recommend to use it ..
Btw next time make a better subject for your topic
|
Okay, thanks.
|
No problem
Re: Quick Question -
woot - 17.11.2009
Not really, it is totally unneeded, it only was required in 0.1 to avoid disconnected / kicked players still using commands.
The only cases where you might wanna use IsPlayerConnected are loops and commands with a playerid as parameter.