12.12.2011, 13:17
Hey, i'v never created a mask system before and heres my code.
And the SetPlayerName(playerid,oldname); says like
So How would I get their name, before the do /mask, and reuse there name under SetPlayerName(playerid,oldname); again
PHP код:
CMD:mask(playerid,params[])
{
new pName[MAX_PLAYER_NAME],Masked;
new oldname = GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2 && playerVariables[playerid][pGroup] != 0 && Masked == 0)
{
SetPlayerName(playerid,"Masked Person");
SendClientMessage(playerid,COLOR_WHITE,"You've put a mask on.");
Masked = 1;
}
else if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2 && playerVariables[playerid][pGroup] != 0 && Masked == 1)
{
SetPlayerName(playerid,oldname);
Masked = 0;
}
return 1;
}
Код:
C:\Documents and Settings\Customer\Desktop\Linux-Server\gamemodes\vx-rp.pwn(9339) : error 035: argument type mismatch (argument 2)