Command mask bugged [help pleasee]
#1

hey guys.
i got an command mask which allows player to put off their name and avoid name taging and shits like this but the problem is that when player writes example /maks then types anything that contains alot of number/letters like /mask aisofhasfoihaskofhasfkh - and he types it like 5-6 times then other commands wont work for anyone. i dont know what causes this problem btw maybe you may help me out

Код:
COMMAND:mask(playerid, params[])
{
	if(PlayerInfo[playerid][admin] || PlayerInfo[playerid][premiumgold] || PlayerInfo[playerid][playerfaction]==FBI || PlayerInfo[playerid][playerlvl]>= 15)
	{
		new tmp[3];
		if(sscanf(params, "s", tmp)) return SCP(playerid, "[on/off]");

		if(strcmp(tmp,"on",true)==0)
		{
			PlayerTemp[playerid][mask]=0;
			GameTextForPlayer(playerid,"~g~mask On",1000,1);
			PlayerLoop(i) ShowPlayerNameTagForPlayer(i,playerid,1);
			RemovePlayerAttachedObject(playerid, 9);
		}
		else if(strcmp(tmp,"off",true)==0)
		{
			PlayerTemp[playerid][mask]=1;
			GameTextForPlayer(playerid,"~r~mask Off",1000,1);
			SetPlayerAttachedObject(playerid,9,19036,2,0.093999,0.026000,-0.004999,93.800018,82.199951,-3.300001,1.098000,1.139999,1.173000);
			PlayerLoop(i)
			{
				if(!PlayerInfo[i][admin])
				{
					ShowPlayerNameTagForPlayer(i,playerid,0);
				}
				if(PlayerInfo[playerid][playerteam] != CIV)
				{
					if(PlayerInfo[playerid][playerteam] == PlayerInfo[i][playerteam])
					{
					    ShowPlayerNameTagForPlayer(i,playerid,0);
					}
				}
			}
		}
		else return SCP(playerid, "[on/off]");
	}
	else return SendClientError(playerid, CANT_USE_CMD);
	return 1;
}
Reply


Messages In This Thread
Command mask bugged [help pleasee] - by ThatFag - 05.03.2016, 21:41
Re: Command mask bugged [help pleasee] - by iKevin - 05.03.2016, 21:50

Forum Jump:


Users browsing this thread: 1 Guest(s)