13.06.2012, 21:25
Heres my code
any player can use /aduty help please rep+
Код:
}
CMD:aduty(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] == 2 && PlayerInfo[playerid][pAdmin] == 3 && PlayerInfo[playerid][pAdmin] == 4 && PlayerInfo[playerid][pAdmin] == 1337 && PlayerInfo[playerid][pAdmin] == 1558 && PlayerInfo[playerid][pAdmin] == 99997 && PlayerInfo[playerid][pAdmin] == 99999)
{
SendClientMessage(playerid,-1,"SERVER: Unknown Command!");
return 1;
}
if(IsOnAdminDuty[playerid] == false)
{
IsOnAdminDuty[playerid] = true;
new pname[24],dstring[124];
GetPlayerName(playerid,pname,sizeof(pname));
format(dstring,sizeof(dstring),"Administrator %s is now on duty.",pname);
SendClientMessageToAll(-1,dstring);
SetPlayerColor(playerid, COLOR_REALRED);
SetPlayerHealth(playerid,99999);
SetPlayerArmour(playerid,99999);
SetPlayerSkin(playerid,294);
}
return 1;
}
CMD:adutyoff(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] == 2 && PlayerInfo[playerid][pAdmin] == 3 && PlayerInfo[playerid][pAdmin] == 4 && PlayerInfo[playerid][pAdmin] == 1337 && PlayerInfo[playerid][pAdmin] == 1558 && PlayerInfo[playerid][pAdmin] == 99997 && PlayerInfo[playerid][pAdmin] == 99999)
{
SendClientMessage(playerid,-1,"SERVER: Unknown Command!");
return 1;
}
if(IsOnAdminDuty[playerid] == true)
{
IsOnAdminDuty[playerid] = false;
new name[24],ostring[124];
GetPlayerName(playerid,name,sizeof(name));
format(ostring,sizeof(ostring),"Administrator %s is now off duty.",name);
SendClientMessageToAll(-1,ostring);
SetPlayerColor(playerid, COLOR_GREY);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,0);
}
return 1;
}

