15.02.2012, 12:29
Can someone help me with this, it doesn't change there name back. It switches to a new name:
Say if its Masked_19, If you type /mask again it would switch to Masked_23.
Say if its Masked_19, If you type /mask again it would switch to Masked_23.
Код:
new isMasked[MAX_PLAYERS]; new OldUsername[MAX_PLAYER_NAME][MAX_PLAYERS];
Код:
CMD:mask(playerid, params[]) { if(playerVariables[playerid][pGroup] != 7) { if(isMasked[playerid] == 0) { new randomID = random(200); new string[35]; GetPlayerName(playerid, string, sizeof(string)); strmid(OldUsername[playerid], string, 0, strlen(string), 64); format(string,sizeof(string), "Masked_%d", randomID); SetPlayerName(playerid, string); SendClientMessage(playerid, COLOR_GREY, "You have put on a mask! (/mask to disable)"); } else return SendClientMessage(playerid, COLOR_GREY, "You do now have the right privillages to use this command."); } else { SetPlayerName(playerid, OldUsername[playerid]); isMasked[playerid] = 1; SendClientMessage(playerid, COLOR_GREY, "You have taken off your mask!"); } return 1; }