11.12.2014, 22:12
Evening all, I got a question,
I got a mask system and it change your whole name, even when you go offline its saves your mask name, how can you change that to your normal name,
I hope you understand what i mean
I got a mask system and it change your whole name, even when you go offline its saves your mask name, how can you change that to your normal name,
pawn Код:
CMD:mask(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(Masked[playerid] == false)
{
new pname[24];
new Maskid = random(200);
new string[35];
GetPlayerName(playerid, pname, sizeof(pname));
Masked[playerid] = true;
strmid(OldName[playerid], pname, 0, strlen(pname), 64);
format(string,sizeof(string), "Masked[%d]", Maskid);
SetPlayerName(playerid, string);
SendClientMessage(playerid, COLOR_LIGHTRED, "* You have put on your mask.");
format(string, sizeof(string), "%s is now masked ID %d",pname, Maskid);
SendAdminMessage(COLOR_DARKRED, 1, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
else
{
SetPlayerName(playerid, OldName[playerid]);
Masked[playerid] = false;
SendClientMessage(playerid, COLOR_LIGHTRED, "* You have removed your mask.");
for(new i=0;i<MAX_PLAYERS;i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
}
return 1;
}