SA-MP Forums Archive
Need help with team cmds! - 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: Need help with team cmds! (/showthread.php?tid=385736)



Need help with team cmds! - Majava - 17.10.2012

Well, i have this.
PHP код:
#define team_civ   1
#define team_ter   2 
(showplayerdialog selecting)
PHP код:
pTeam[playerid] = team_civ;
pTeam[playerid] = team_ter
And i use this platform on my cmds.
PHP код:
CMD:command(playerid,params[]) 
I need command for team_civ example.


Re: Need help with team cmds! - gtakillerIV - 17.10.2012

Use:

PHP код:
if(GetPlayerTeam(playerid) == team_civ)
{
    
//Rest of the command here!




Re: Need help with team cmds! - Jarnu - 17.10.2012

Example

Код:
CMD:command(playerid, params[])
{
    if(pTeam[playerid] == team_civ)
    {
         //Put your codes here
    }
    else return SendClientMessage(playerid, 0xFF0000FF,"[ERROR]: You are not in team_civ");
    return 1;
}