SA-MP Forums Archive
War sys - 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: War sys (/showthread.php?tid=627219)



War sys - Micko123 - 25.01.2017

I am making war system fro gangs.. You know, leader invites leader to war. If both accept then they invite members of their gangs.. And that is where I am stuck now
How can I make that they can invite only members from their gangs and how cna I assign players to team?? Any ideas?


Re: War sys - BiosMarcel - 25.01.2017

PHP код:
if(fraction[playerid] == fraction[inviteplayerid]) 
and a team variable / the implemented team functionallities (https://sampwiki.blast.hk/wiki/SetPlayerTeam)


Re: War sys - Micko123 - 25.01.2017

PHP код:
new WarPlayers[2]; 
I have that declared globally. 0 and 1 are teams. How can I put players in different teams?? How can I know that?


Re: War sys - BiosMarcel - 25.01.2017

PHP код:
#define TEAM_INVALID -1
#define TEAM_ONE 0
#define TEAM_TEAM 1

new playerTeam[MAX_PLAYERS];

onPlayerConnect(id)
{
    
playerTeam[id] = TEAM_ONE//EXAMPLE

    //or

    
SetPlayerTeam(idTEAM_ONE);