SA-MP Forums Archive
Teamcmds 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Teamcmds command (/showthread.php?tid=174983)



Teamcmds command - Hobod - 07.09.2010

Well basically i currently have 5 teams using gTeams
and i attempted to make a /teamcmds that displayed the different commands for each team, but instead it just decides to show them all at once.
so help please?
Код:
    if (strcmp("/teamcmds", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, COLOR_CYAN, "|- Team Commands -|");
        if(gTeam[playerid] != 0)
        {
        SendClientMessage(playerid, COLOR_GREEN, "Your A Nub who didn't choose any team right?");
        }
        else if(gTeam[playerid] != 1)
        {
        SendClientMessage(playerid, COLOR_GREEN, "Commands: /ps1 , /ps2 , /lvpd1 , /lvpd2 , /pgate");
        }
        else if(gTeam[playerid] != 2)
        {
        SendClientMessage(playerid, COLOR_GREEN, "Commands: /bgate1 , /bgate2 , /bgate3");
        }
        else if(gTeam[playerid] != 3)
        {
        SendClientMessage(playerid, COLOR_GREEN, "Commands: /hobo");
        }
        else if(gTeam[playerid] != 4)
        {
        SendClientMessage(playerid, COLOR_GREEN, "Commands: YOU DON'T GOT NONE YOU GAYBOI");
        }
        return 1;
    }
thanks in advance


Re: Teamcmds command - willsuckformoney - 07.09.2010

pawn Код:
if(gTeam[playerid] == THE TEAMNAME)
{
         //do ya stuff.
}



Re: Teamcmds command - Hobod - 07.09.2010

aha that's perfect dude, cheers