/aduty Admin text
#3

When i do off duty it's wont remove.
Код:
CMD:aduty(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
	{
	    new string[256];
        if(GetPVarInt(playerid, "AdminDuty") == 1)
		{
            SendClientMessage(playerid, COLOR_WHITE, "You are now off a-duty.");
            format(string, sizeof(string), "{FFFFFF}Administrator {FF0000}%s {FFFFFF}is now {FF0000}off{FFFFFF} a-duty.", GetPlayerNameEx(playerid));
 	        SendClientMessageToAllEx(COLOR_WHITE, string);
 	        SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid, 100);
			RemovePlayerWeapon(playerid, 38);
            DeletePVar(playerid, "AdminDuty");
        }
        else
		{
            SendClientMessageEx(playerid, COLOR_WHITE, "You are now on a-duty.");
            new Text3D:label = Create3DTextLabel("Admin on duty", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
            Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
            format(string, sizeof(string), "{FFFFFF}Administrator {00FF00}%s {FFFFFF}is now {00FF00}on{FFFFFF} a-duty.", GetPlayerNameEx(playerid));
	        SendClientMessageToAllEx(COLOR_WHITE, string);
        	SetPlayerHealth(playerid, 100000);
			SetPlayerArmour(playerid, 100000);
			GivePlayerValidWeapon(playerid, 38, 66666);
            SetPVarInt(playerid, "AdminDuty", 1);
        }
    }
    else
	{
        SendClientMessageEx(playerid, COLOR_GRAD1, "   You are not a Administrator!");
    }
    return 1;
}
Reply


Messages In This Thread
/aduty Admin text - by Trevor Gin - 29.01.2015, 10:21
Re: /aduty Admin text - by nezo2001 - 29.01.2015, 10:27
Re: /aduty Admin text - by Trevor Gin - 29.01.2015, 10:43
Re: /aduty Admin text - by Luca12 - 29.01.2015, 10:46
Re: /aduty Admin text - by ChandraLouis - 29.01.2015, 10:46
Re: /aduty Admin text - by ATGOggy - 29.01.2015, 10:50
Re: /aduty Admin text - by Trevor Gin - 29.01.2015, 11:30
Re: /aduty Admin text - by AdamsP - 29.01.2015, 12:27
Re: /aduty Admin text - by Trevor Gin - 29.01.2015, 13:14
Re: /aduty Admin text - by HyDrAtIc - 29.01.2015, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)