Problem - SetPlayerName
#1

I have a command /maskon that changes his name to "(ID) MASKED" but somehow it doesent change the name...
Here is the script:
Код:
YCMD:maskon(playerid,params[],help)
{
    new maskedname[50];
    format(maskedname,sizeof(maskedname),"(%i) MASKED",playerid);
    SetPlayerName(playerid,maskedname);
    SetPlayerColor(playerid,0x3B3B3BFF);
   	new Float:x,Float:y,Float:z;
	GetPlayerPos(playerid,x,y,z);
	new string2[128];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerInRangeOfPoint(i, 20.0, x,y,z))
		{
			format(string2,sizeof(string2),"%s si nadene masko.",pInfo[playerid][Ime]);
			SendClientMessage(i,COLOR_ACTION,string2);
	 	}
 	}
	return 1;
}
Reply
#2

Quote:
Originally Posted by SA-MP Wiki (SetPlayerName)
The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-Z, [], (), $ @ . _ and = only).
You have a space in your name string, that's why it doesn't change your name.
Reply
#3

Ooooh... Didn't saw that Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)