17.01.2010, 12:39
you need to use a variable which marks the playerid as jailed
Example (one of the most known)
This should be understandable
Offtopic
This section is for helping not for (so the person learns something)
Wuf, wuf, catch the code and be happy
Offtopic
Example (one of the most known)
pawn Код:
new bool:IsLogged[MAX_PLAYERS]; //a variable marked with the boolean tag can only store false or true
//if nothing is assigned to the variable, it is 0 or false
pawn Код:
dcmd_login(playerid, password[])
{
if("password is correct")
{
IsLogged[playerid] = true; //sets the variable to true
}
}
pawn Код:
dcmd_help(playerid, unused[])
{
#pragma unused unused
if(IsLogged[playerid] == false) //if he isnt logged he gets a the message
return SendClientMessage(playerid, 0xFFFFFFAA, "You arent logged!");
SendClientMessage(playerid, 0xFFFFFFAA, "Help");
return true;
}
Offtopic
This section is for helping not for (so the person learns something)
Wuf, wuf, catch the code and be happy
Offtopic