SA-MP Forums Archive
Mask bug :S - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mask bug :S (/showthread.php?tid=326991)



Mask bug :S - viddo - 19.03.2012

Код:
	if(strcmp(cmd, "/maskon", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(PlayerInfo[playerid][pMask] == 0)
	   	 	{
	   		     SendClientMessage(playerid, COLOR_GRAD1, "** You don't have a mask");
	   		     return 1;
	   		}
	   		if(PlayerInfo[playerid][pLevel] < 5)
	    	{
	       		SendClientMessage(playerid, COLOR_GRAD1, "** You are not able to use it.");
	        	return 1;
	    	}
			for(new i = 0; i < MAX_PLAYERS; i++)
	        {
  		    	if(IsPlayerConnected(i))
   		    	{
		   			ShowNameTags(0);
				}
			}
			PlayerInfo[playerid][pMaskuse] = 1;
			SendClientMessage(playerid, COLOR_WHITE, "** You have put your mask on [/maskoff to put it away].");
      		new y, m, d;
			new h,mi,s;
			getdate(y,m,d);
			gettime(h,mi,s);
			format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /maskon",d,m,y,h,mi,s,sendername);
			CommandLog(string);
		}
		return 1;
	}
The name tag still doesn't disappear !! How to fix?


Re: Mask bug :S - Roel - 19.03.2012

Код:
for(new i = 0; i < MAX_PLAYERS; i++)
	        {
  		    	if(IsPlayerConnected(i))
   		    	{
		   	      ShowPlayerNameTagForPlayer(playerid, i, false);
			}
}
Sorry for bad tabsize