suhrab_mujeeb
Unregistered
Quote:
Originally Posted by THE_KNOWN
pawn Код:
new Masked[MAX_PLAYERS]; // must be global array
new oldname[MAX_PLAYERS];// global again
CMD:mask(playerid,params[]) { if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2 && playerVariables[playerid][pGroup] != 0 && Masked[playerid] == 0) { GetPlayerName(playerid,oldname,MAX_PLAYER_NAME); SetPlayerName(playerid,"Masked_Person");//spaces not allowed SendClientMessage(playerid,COLOR_WHITE,"You've put a mask on."); Masked[playerid] = 1; } else if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2 && playerVariables[playerid][pGroup] != 0 && Masked[playerid] == 1) { SetPlayerName(playerid,oldname); Masked[playerid] = 0; } return 1; }
|
Shouldn't it be oldname[MAX_PLAYERS][MAX_PLAYER_NAME];
Example:
https://sampforum.blast.hk/showthread.php?tid=287244