SA-MP Forums Archive
PlayerIsConnected function help - 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: PlayerIsConnected function help (/showthread.php?tid=165301)



PlayerIsConnected function help - BuLLeT[LTU] - 04.08.2010

Hello. How to make this work good? I was trying many things but it don't work

Код:
stock PlayerIsConnected(playerid)
{
if(IsPlayerConnected(playerid) && playerDB[playerid][Authed] == 1 && !IsPlayerNPC(playerid))
return playerid;
}



Re: PlayerIsConnected function help - ikey07 - 04.08.2010

dont use stock, use forward and public, or there cant be this combination


Re: PlayerIsConnected function help - BuLLeT[LTU] - 04.08.2010

warning 209: function "PlayerIsConnected" should return a value




Re: PlayerIsConnected function help - legodude - 04.08.2010

should'nt it return yes or no?(true false)

if so its:

Код:
stock PlayerIsConnected(playerid)
{
if(IsPlayerConnected(playerid) && playerDB[playerid][Authed] == 1 && !IsPlayerNPC(playerid))
{
return 1;
}
return 0;
}



Re: PlayerIsConnected function help - WackoX - 04.08.2010

Quote:
Originally Posted by ikey07
Посмотреть сообщение
dont use stock, use forward and public, or there cant be this combination
Yes there can be, just use nothing and it works fine.


Re: PlayerIsConnected function help - Vince - 04.08.2010

pawn Код:
#define IsPlayerConnected(%0) \
    (IsPlayerConnected(%0) && playerDB[%0][Authed] == 1 && !IsPlayerNPC(%0))
Now use IsPlayerConnected as you normally would, and it should work.


Re: PlayerIsConnected function help - BuLLeT[LTU] - 04.08.2010

Quote:
Originally Posted by legodude
Посмотреть сообщение
should'nt it return yes or no?(true false)

if so its:

Код:
stock PlayerIsConnected(playerid)
{
if(IsPlayerConnected(playerid) && playerDB[playerid][Authed] == 1 && !IsPlayerNPC(playerid))
{
return 1;
}
return 0;
}
Thank you