dcmd_aduty(playerid, params[])
{
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
new idx,tmp[256];
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ERROR, "You are Aduty.");
return 1;
}
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid,99999);
GivePlayerWeapon(playerid, 38, 99999);
}else{
SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
}
return 1;
}
dcmd_aduty(playerid, params[])
{
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1) return SendClientMessage(playerid, COLOR_WHITE,"Unknown command: type /cmds to see list of commands.");
{
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid,99999);
GivePlayerWeapon(playerid, 38, 99999);
}
return 1;
}
|
dcmd_aduty(playerid, params[])
{ if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1) return SendClientMessage(playerid, COLOR_WHITE,"Unknown command: type /cmds to see list of commands."); { SetPlayerHealth(playerid, 99999); SetPlayerArmour(playerid,99999); GivePlayerWeapon(playerid, 38, 99999); } return 1; } |
enum dinfo
{
adminduty,
}
new PlayerInfo[playerid][dinfo]
dcmd_aduty(playerid, params[])
{
if (PlayerInfo[playerid][adminduty] == 1) return SendClientMessage(playerid, COLOR_WHITE,"You are already on duty!");
if (IsPlayerAdmin(playerid) return SendClientMessage(playerid, COLOR_WHITE,"Unknown command: type /cmds to see list of commands.");
{
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid,99999);
GivePlayerWeapon(playerid, 38, 99999);
PlayerInfo[playerid][adminduty] = 1;
}
return 1;
}
dcmd_offduty(playerid, params[])
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapon(playerid);
PlayerInfo[playerid][adminduty] = 0;
return 1;
}
enum dinfo
{
adminduty
}
new PlayerInfo[playerid][dinfo];
dcmd_aduty(playerid, params[])
{
if (IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE,"Unknown command: type /cmds to see list of commands.");
{
if (PlayerInfo[playerid][adminduty] == 1) return SendClientMessage(playerid, COLOR_WHITE,"You are already on duty");
{
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid,99999);
GivePlayerWeapon(playerid, 38, 99999);
PlayerInfo[playerid][adminduty] = 1;
}
}
return 1;
}
dcmd_offduty(playerid, params[])
{
if (IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE,"Unknown command: type /cmds to see list of commands.");
{
if (PlayerInfo[playerid][adminduty] == 0) return SendClientMessage(playerid, COLOR_WHITE,"You are already off duty");
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
PlayerInfo[playerid][adminduty] = 0;
}
}
return 1;
}