04.04.2011, 11:11
Hey SpiderWalk.
Here is /AdminDutyON and /AdminDutyOFF code:-
I have made by myself.
You must #include <zcmd>
Top of your fs.
And here is the code:-
You must be /Rcon (Password) to use this command, or you can change it to your admin level fs.
Well i hope this works.
Thanks.
Here is /AdminDutyON and /AdminDutyOFF code:-
I have made by myself.
You must #include <zcmd>
Top of your fs.
pawn Код:
new AdminOnDuty[MAX_PLAYERS]
pawn Код:
CMD:admindutyon(playerid, params[])
{
if(IsPlayerAdmin(playerid))
if(AdminOnDuty[playerid] == 1) return SendClientMessage(playerid,0xAA3333AA, "You're already on Adminstrator duty, Type /AdminDutyOff to OFF your duty!");
else
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
new string[128];
AdminOnDuty[playerid] = 1;
format(string,sizeof(string), "Adminstrator %s is now on Admin duty.", pName);
SendClientMessageToAll(0x33CCFFAA, string);
}
else
{
SendClientMessage(playerid, 0xAA3333AA, "You're not an adminstrator to use this cmd");
}
return 1;
}
CMD:admindutyoff(playerid, params[])
{
if(IsPlayerAdmin(playerid))
if(AdminOnDuty[playerid] == 0) return SendClientMessage(playerid,0xAA3333AA, "You're already off Adminstrator Duty, Type /AdminDutyOn to ON your duty!");
else
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
new string[128];
AdminOnDuty[playerid] = 0;
format(string,sizeof(string), "Adminstrator %s is no longer on Adminstrator duty.", pName);
SendClientMessageToAll(0x33CCFFAA, string);
}
else
{
SendClientMessage(playerid, 0xAA3333AA, "You're not an adminstrator to use this cmd");
}
return 1;
}
Well i hope this works.
Thanks.