28.11.2011, 19:14
Hey dudes, well I'm creating a roleplay server but I noticed that players could /request to join an org despite the leader not being on.. They couldn't join it but it sends a message to everyone saying "Playername is requesting to join the San Andreas Police Department".
So I thought I would make it so if the leader is not online it would send them a message saying "The leader is not online"... but I can't seem to get it working, heres the code.
Yes I use dini & I feel its something to do with the "IsPlayerConnected", Thanks in advanced.
So I thought I would make it so if the leader is not online it would send them a message saying "The leader is not online"... but I can't seem to get it working, heres the code.
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))
{
if(PlayerInfo[i][Leader] == (( ORG ID )) )
{
SendClientMessage(playerid, COLOR, "The leader of this organization is currently not online");
return 1;
}
}
}