03.02.2017, 14:21
The problem is I can use the cmd 2 times insted of 1 time then in the second try it Should say You're already on duty(Vec si na duћnosti!). It's says that on the 3rd try. Help!
PHP код:
COMMAND:offduty(playerid)
{
new string[100], name[MAX_PLAYER_NAME];
if (APlayerData[playerid][LoggedIn] == true && APlayerData[playerid][PlayerLevel] > 1)
{
if(APlayerData[playerid][cmdoffduty] >= 1) return SendClientMessage(playerid, 0xFF0000FF, "Nisi na duznosti");
JBC_SetPlayerHealth(playerid, 99.0);
SetPlayerArmour(playerid, 0);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "(( Administrator {00CCFF}%s {FFFFFF}nije vise na duznosti! ))", name);
SendClientMessageToAll(-1, string);
APlayerData[playerid][cmdoffduty]++;
if(APlayerData[playerid][cmdoffduty] == 1)
{APlayerData[playerid][cmdduty]--;}
SetPVarInt(playerid, "Izbegavanje", 0);
}
return 1;
}