29.07.2012, 12:39
Use variables to detect that.
EX:
EX:
pawn Код:
new IsPlayerOnWork[MAX_PLAYERS];
// OnPlayerConnect
IsPlayerOnWork[playerid] = 0;
// OnDisconnect
IsPlayerOnWork[playerid] = 0;
// On Command /Work
if(!strcmp("/work",cmdtext))
{
if(IsPlayerOnWork[playerid] == 1)
{
IsPlayerOnWork[playerid] = 0;
SendClientMessage(playerid,-1,"You Are Now Off Duty!");
SetPlayerSkin(playerid, 277);
else
{
IsPlayerOnWork[playerid] = 1;
// More Code Of Yours
return 1;
}