04.12.2013, 17:52
Can someone please help me modify the following below?
It should be when I use /aduty, my name Zayn_Malik would be now Zayn. So basically when I'm on duty the last name should be removed. When I set back again to /aduty else my name should go back to Zayn_Malik.
It should be when I use /aduty, my name Zayn_Malik would be now Zayn. So basically when I'm on duty the last name should be removed. When I set back again to /aduty else my name should go back to Zayn_Malik.
Код:
CMD:aduty(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!"); if(PlayerInfo[playerid][pAdminDuty] == 0) { SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!"); //SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]); PlayerInfo[playerid][pAdminDuty] = 1; SetPlayerHealth(playerid, 100000); SetPlayerArmour(playerid, 100000); //SetPlayerSkin(playerid, 294); - Commented by Voltage new string[128]; format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/am for assistance)", GetPlayerNameEx(playerid)); SendClientMessageToAllEx(COLOR_YELLOW, string); } else { SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!"); //SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0); //SetPlayerSkin(playerid, 299); - Commented by Voltage PlayerInfo[playerid][pAdminDuty] = 0; } return 1; }