if(strcmp(cmd, "/aduty", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerHealth(playerid, 99999999);
SetPlayerArmour(playerid, 99999999);
SendClientMessage(playerid, COLOR_YELLOW, "You are now an on-duty Administrator!");
format(string, sizeof(string), "%s is now on-duty Administrator. ", sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerColor(playerid, COLOR_WHITE);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 42, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 39, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 38, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 34, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 31, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 29, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 27, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 24, 0x7FFFFFFF);
GivePlayerWeapon(playerid, 40, 1);
GivePlayerWeapon(playerid, 10, 1);
GivePlayerWeapon(playerid, 9, 1);
}
return 1;
new oldskin[MAX_PLAYERS]; // using this aduty can make many things new aduty[MAX_PLAYERS]; #define SCM SendClientMessage // IS FAST and Short :D #define COLOR_HOTPINK 0xFF00FFFF
aduty[playerid] =0; oldskin[playerid] =0;
if(strcmp(cmd, "/aduty", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2) return //any message u want to send if user is not admin
if(aduty[playerid] == 0)
{
new Float:dutyhp;
new Float:dutyarmour;
pDutyHealth[playerid] = GetPlayerHealth(playerid, dutyhp);
pDutyArmour[playerid] = GetPlayerArmour(playerid, dutyarmour);
SCM(playerid, COLOR_HOTPINK,"* You Have Gone On Duty.");
SetPlayerArmour(playerid, 9999999999); // Make 99999999 and it's infinite ammo
SetPlayerHealth(playerid, 999999);
GivePlayerWeapon(playerid, 38, 9999999);
//oldskin[playerid] = GetPlayerSkin(playerid);
//SetPlayerSkin(playerid, 294); // will set the user to wozie skin
aduty[playerid] =1;
}
else
{
SCM(playerid, COLOR_HOTPINK,"* You Have Gone Off Duty.");
SetPlayerHealth(playerid, pDutyHealth[playerid]);
SetPlayerArmour(playerid, pDutyArmour[playerid]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, oldskin[playerid]);
aduty[playerid] =0;
//oldskin[playerid] =0; // will bring the admin back to skin if used
GivePlayerWeapon(playerid, 9, 99999);
GivePlayerWeapon(playerid, 14, 99999);
GivePlayerWeapon(playerid, 16, 99999);
GivePlayerWeapon(playerid, 24, 99999);
GivePlayerWeapon(playerid, 26, 99999);
GivePlayerWeapon(playerid, 28, 99999);
GivePlayerWeapon(playerid, 31, 99999);
GivePlayerWeapon(playerid, 26, 99999);
GivePlayerWeapon(playerid, 34, 99999);
GivePlayerWeapon(playerid, 38, 99999);
GivePlayerWeapon(playerid, 46, 99999);
}
return 1;
}
|
You said "i click save", did you just save or did you compile it?
|