making gangshow command
#1

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;
		}
Reply
#2

bump
Reply
#3

not working
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)