Team Balancer? - 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: Team Balancer? (
/showthread.php?tid=242406)
Team Balancer? -
sciman001 - 20.03.2011
What is the simplest way to make a SIMPLE auto team balancer? ex... if there is 2 of team 1 and 3 of team 2 and you try to be team 1, it will say, be team 2 to balance the teams or something...
ALSO
How can i make a simple specter in my gamemode where if someone kills you, you spectate them? THANKZ!
Re: Team Balancer? -
Darklom - 20.03.2011
Quote:
Originally Posted by sciman001
What is the simplest way to make a SIMPLE auto team balancer? ex... if there is 2 of team 1 and 3 of team 2 and you try to be team 1, it will say, be team 2 to balance the teams or something...
ALSO How can i make a simple specter in my gamemode where if someone kills you, you spectate them? THANKZ!
|
I could assure you if you "Search" the second thing you will find the answer, for the first one can you give us your code so we can look at it?
Re: Team Balancer? -
sciman001 - 20.03.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, killerid);
gSpectateID[playerid] = playerid;
SetTimer("spec", 5000, false);
return 1;
}
pawn Код:
public spec(playerid)
{
TogglePlayerSpectating(gSpectateID[playerid], 0);
return 1;
}
And yes, i do do new gSpectating(MAX_PLAYERS]; AND forward spec(playerid);
WHAT I DO
??
Re: Team Balancer? -
Darklom - 20.03.2011
I asked about the team balancer, but um for the specating I'd also need the callback or stock for TogglePlayerSpctating
Re: Team Balancer? -
sciman001 - 20.03.2011
what
How would i fix the spectating one?
Re: Team Balancer? -
sciman001 - 20.03.2011
??
?
Re: Team Balancer? -
sciman001 - 20.03.2011
ANYONE
Re: Team Balancer? -
sciman001 - 20.03.2011
ANYONE
??
??PLEASE!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!
Re: Team Balancer? -
antonio112 - 20.03.2011
Ah .. so what`s wrong with your code? It does not stop spectating?
If yes, try using
SetTimerEx, instead of SetTimer.
pawn Код:
SetTimerEx( "spec", 5000, false, "i", playerid );
If that`s not the problem, please give some more informations about your problem.
Re: Team Balancer? -
sciman001 - 20.03.2011
THANK YOU SOOOOOOOOOOOOOOOOOOOOOOO MUCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! I REALLY OWE U MAN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! It works now.