[SOLVED] Teams - 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: [SOLVED] Teams (
/showthread.php?tid=155461)
[SOLVED] Teams -
park4bmx - 18.06.2010
Quote:
Originally Posted by FUNExtreme
a is not a team. A is an id
Let me show you how it works:
for(new a = 0; a < MAX_PLAYERS; a ++)
will do
a = 0 (execute code for id 0)
then
a = 1 (execute code for id 1)
then
a = 2 (execute code for id 2)
then
....
Thats how it works, do you understand?
|
Im not sure but if a player with
ID 0 Leaves and someone comes again with
ID 0 would the FUNCTION affect him/her ?
_________________________________________________
EDIT
on'T worry SOLVED i got it THANKS TO ALL
Re: [HELP] Teams (Simple) -
Andy_McKinley - 18.06.2010
Remove the if gTeam == TEAM_GLOBAL.
Re: [HELP] Teams (Simple) -
park4bmx - 18.06.2010
Quote:
Originally Posted by DarkPhoenix
Remove the if gTeam == TEAM_GLOBAL.
|
OK but there is another thing
THE EFFECT ONLY WORK ON THE PLAYER THAT ENTERS THE CHEKPOINT
I WANT THE EFFECT TO WORK ON THE HOLE TEAM
Re: [HELP] Teams (Simple) -
park4bmx - 18.06.2010
Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]
Loop through players then apply it to each ID:
for(new a; a < PLAYERCOUNT; a++)
{
SetCameraPos(a, coords...);
}
- 'a' being the playerid parameter in functions within the braces
- 'PLAYERCOUNT' in the loop declaration being your player slot count
Note: by the first note I mean put 'a' as the playerid parameter in the functions that you want to apply to all players,
don't replace the 'a' in the 'for' loop initiation with 'playerid' if that makes sense :P
|
Yeah it makes sense
Thanks
Re: [1 quastion] Teams -
park4bmx - 18.06.2010
Sorry for doube post but
How do i set a team to be a team
a
Re: [1 question] Teams -
FUNExtreme - 18.06.2010
a is not a team. A is an id
Let me show you how it works:
for(new a = 0; a < MAX_PLAYERS; a ++)
will do
a = 0 (execute code for id 0)
then
a = 1 (execute code for id 1)
then
a = 2 (execute code for id 2)
then
....
Thats how it works, do you understand?
Re: [1 question] Teams -
park4bmx - 18.06.2010
Quote:
Originally Posted by FUNExtreme
a is not a team. A is an id
Let me show you how it works:
for(new a = 0; a < MAX_PLAYERS; a ++)
will do
a = 0 (execute code for id 0)
then
a = 1 (execute code for id 1)
then
a = 2 (execute code for id 2)
then
....
Thats how it works, do you understand?
|
Im not sure but if a player with
ID 0 Leaves and someone comes again with
ID 0 would the FUNCTION affect him/her ?
_________________________________________________
EDIT
on'T worry SOLVED i got it THANKS TO ALL