name command bugged
#1

Код:
COMMAND:name(playerid, params[])
{
	if(PlayerInfo[playerid][power] || PlayerInfo[playerid][premium] || PlayerInfo[playerid][playerteam]==HITMAN || PlayerInfo[playerid][playerteam]==FBI || PlayerInfo[playerid][playerlvl]>= 15)
	{
		new tmp[5];
		if(sscanf(params, "s", tmp)) return SCP(playerid, "[on/off]");
		if(strcmp(tmp,"on",true)==0)
		{
			PlayerTemp[playerid][hname]=0;
			GameTextForPlayer(playerid,"~g~ShowName ON",1000,1);
			PlayerLoop(i) ShowPlayerNameTagForPlayer(i,playerid,1);
		}
		else if(strcmp(tmp,"off",true)==0)
		{
			PlayerTemp[playerid][hname]=1;
			GameTextForPlayer(playerid,"~r~ShowName OFF",1000,1);
			PlayerLoop(i) if(!PlayerInfo[i][power]) ShowPlayerNameTagForPlayer(i,playerid,0);
		}
		else return SCP(playerid, "[on/off]");
	}
	else return SendClientError(playerid, CANT_USE_CMD);
	return 1;
}
Okay I don't know what is wrong with this but, when I use /name off, it would hide my name under Stranger in the chat. But I still have the name on my head. I want to remove the head name aswell.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)