PlayerIsConnected function help
#1

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;
}
Reply
#2

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

warning 209: function "PlayerIsConnected" should return a value

Reply
#4

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;
}
Reply
#5

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.
Reply
#6

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)