Teams Quick Question - 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: Teams Quick Question (
/showthread.php?tid=325918)
Teams Quick Question -
lordturhan - 15.03.2012
I have 2 teams team 1 and team 2.
But with a command i want to set there team to default so anti team deathmatch would be removed.
I tryed 0 it doesnt work what is default that they can damage each other.
Re: Teams Quick Question -
Richie© - 15.03.2012
if you are using SetPlayerTeam, do this:
pawn Код:
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++) SetPlayerTeam(playerid, playerid);
Here you can read more about SetPlayerTeam:
https://sampwiki.blast.hk/wiki/SetPlayerTeam
Re: Teams Quick Question -
lordturhan - 15.03.2012
Will test that.
Re: Teams Quick Question -
lordturhan - 15.03.2012
C:\Users\Turhan\Desktop\Sa-MP!\filterscripts\AdminSystem.pwn(1137) : warning 219: local variable "playerid" shadows a variable at a preceding level
C:\Users\Turhan\Desktop\Sa-MP!\filterscripts\AdminSystem.pwn(1153) : warning 219: local variable "playerid" shadows a variable at a preceding level
ERROR!
Re: Teams Quick Question -
Richie© - 15.03.2012
use something else in the loop then like:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
and also change the SetPlayerTeam then