Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:akulah220(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] > 1) {
- new
- userID,
- playerNameString[MAX_PLAYER_NAME];
- if(sscanf(params, "us[24]", userID, playerNameString)) {
- return SendClientMessage(playerid, COLOR_GREY, "Tutor: /adminname [playerid] [adminname]");
- }
- else {
- if(!IsPlayerConnected(userID))
- return SendClientMessage(playerid, COLOR_GREY, "The specified player ID is either not connected or has not authenticated.");
- if(PlayerInfo[userID][pAdmin] >= 1) {
- if(PlayerInfo[userID][pAdmin] > PlayerInfo[playerid][pAdmin]) {
- return SendClientMessage(playerid, COLOR_GREY, "You can't change the admin name of a higher level administrator.");
- }
- else {
- new
- messageString[128];
- format(messageString, sizeof(messageString), "You have changed admin name to %s.", playerNameString);
- SendClientMessage(playerid, COLOR_WHITE, messageString);
- format(messageString, sizeof(messageString), "changed your admin name to %s.", playerNameString);
- SendClientMessage(userID, COLOR_WHITE, messageString);
- format(PlayerInfo[userID][pNamaAdmin], MAX_PLAYER_NAME, "%s", playerNameString);
- if(AdminOnDuty[userID] >= 1)
- SetPlayerName(userID, playerNameString);
- return 1;
- }
- }
- else {
- return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!.");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement