SA-MP Forums Archive
TEAM problem - 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: TEAM problem (/showthread.php?tid=579229)



TEAM problem - Ugaustin - 25.06.2015

I don't understand the TEAM_GROVE 60

I got a territory system got from tutorial and dosent work..


PHP код:
#define TEAM_CYAN 1
                    #define TEAM_BLUE 2
                    #define TEAM_GREEN 3
                    #define TEAM_ORANGE 4
                    #define TEAM_COR 5
                    #define TEAM_BAR 6
                    #define TEAM_TAT 7
                    #define TEAM_CUN 8
                    #define TEAM_STR 9
                    #define TEAM_HIT 10
                    #define TEAM_ADMIN 11
                    //
                    #define TEAM_GROVE 60
                    #define TEAM_AZTECAS 61
                    #define TEAM_BALLAS 62
                    #define TEAM_VAGOS 63 



Re : TEAM problem - KillerDVX - 25.06.2015

The definition of Teams must be in order.

KillerDVX,



Re: TEAM problem - Ugaustin - 25.06.2015

at onplayerspawn do I need to change something??


PHP код:
if(gTeam[playerid] == 3)
                    {
                    if(
PlayerInfo[playerid][pMember] > || PlayerInfo[playerid][pLeader] > 0)
                    {
                    
//#define TEAM_GROVE 12
                    //#define TEAM_AZTECAS 13
                    //#define TEAM_BALLAS 14
                    //#define TEAM_VAGOS 15
                    
new model PlayerInfo[playerid][pChar];
                    if(
PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid2model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid2model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid2model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2gTeam[playerid] = 2PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid61model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 61gTeam[playerid] = 61PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid63model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 63gTeam[playerid] = 63PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid5model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid10model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10gTeam[playerid] = 10PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid12model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12gTeam[playerid] = 12PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid12model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12gTeam[playerid] = 12PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid60model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 60gTeam[playerid] = 60PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 12) { SetSpawnInfo(playerid62model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 62gTeam[playerid] = 62PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 13) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid14model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 14gTeam[playerid] = 14PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid15model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 15gTeam[playerid] = 15PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid5model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5gTeam[playerid] = 5PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid61model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 61gTeam[playerid] = 61PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid63model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 63gTeam[playerid] = 63PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                      else if(
PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid60model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 60gTeam[playerid] = 60PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 12) { SetSpawnInfo(playerid62model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 62gTeam[playerid] = 62PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 13) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 14) { SetSpawnInfo(playerid14model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 14gTeam[playerid] = 14PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 15) { SetSpawnInfo(playerid15model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 15gTeam[playerid] = 15PlayerInfo[playerid][pModel] = model; }
                    else if(
PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid11model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11gTeam[playerid] = 11PlayerInfo[playerid][pModel] = model; } 



Re: TEAM problem - Ugaustin - 25.06.2015

if hes civilian and kills gang .. gang zone turns white..


Re: TEAM problem - Ugaustin - 26.06.2015

ok but I want only this teams to fight..not all teams..please help, if civilians kills gang members, the gang zone turns white..


PHP код:
if(IsPlayerConnected(killerid) && GetPlayerTeam(playerid) != GetPlayerTeam(killerid) && gTeam[killerid] == TEAM_GROVE && gTeam[killerid] == TEAM_AZTECAS && gTeam[killerid] == TEAM_BALLAS && gTeam[playerid] == TEAM_VAGOS



Re: TEAM problem - Ugaustin - 26.06.2015

anyone knows??