SA-MP Forums Archive
making gangshow command - 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: making gangshow command (/showthread.php?tid=544716)



Help with making gangshow command. Code. - Stoyanov - 03.11.2014

I'm trying to make Gangshow command to show the name of the gang in front of the name. If you click/type the command again to hide the name.

I put this on the top of the FS:
Код:
new showhidegang[MAX_PLAYERS];
I made this in the menu:
Код:
case 4:
 {
	if(PGang[playerid] !=0 && GangLvl[playerid] > 0)
	{
	   if(showhidegang[playerid]) 
	    { 
	      showhidegang[playerid] = 0
	      SendClientMessage(playerid, RED, "Hide");
	     }
			else
			{
		          showhidegang[playerid] = 1;
	                  SendClientMessage(playerid, GREEN, "Show");
	                 }
	  }
	     else return SendClientMessage(playerid, RED, "You are not in a gang!");
}
I put this under OnPlayerText();
Код:
if(showhidegang[playerid] == 1)
{
    new gangstringlevel6[256];
	if(PGang[playerid] > 0)
	{
	    GetPlayerColor(playerid);
		format(gangstringlevel6, sizeof(gangstringlevel6), "[%s] %s{00FD00}[ID: %d]{FFFFFF}: %s",GName[PGang[playerid]], PlayerName(playerid), playerid, text);
		SendClientMessageToAll(GetPlayerColor(playerid), gangstringlevel6);
	    return 0;
	}
	else if(PlayerInfo[playerid][pAdmin] == 6)
    	{
    	new adminshesstring[256], adname[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, adname, sizeof(adname));
    	format(adminshesstring, sizeof(adminshesstring), "{0000FF}[{FFFFFF}OWNER{0000FF}]{FF0000}%s: {FFFFFF}%s", adname, text);
    	SendClientMessageToAll(WHITE, adminshesstring);
    	return 0;
		}



Re: making gangshow command - Stoyanov - 03.11.2014

bump


Re: making gangshow command - alekschowee - 02.07.2016

not working