help me - 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: help me (
/showthread.php?tid=275856)
help me -
Davz*|*Criss - 11.08.2011
hey guys i got this code:
pawn Код:
public Dday(playerid)
{
for( new teams; teams < 23; teams++ )
{
if( teams == gTeam[ playerid ] ) continue;
}
for(new i = 0; i < MAX_PLAYERS; i++)
if(WarJoin[i])
{
SetPlayerTeam(i, 0);
SetPlayerColor(i, 0xFF0000FF); // Red
SetPlayerVirtualWorld(i, 3);
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 32, 200);
GivePlayerWeapon(i, 26, 200);
GameTextForPlayer(i,"You're ~r~Attacker. ~g~Go Attack them..",2000,3);
SetPlayerPos(i, -143.5201,2462.7905,16.5642);
}
else
{
SetPlayerTeam(i, 1);
SetPlayerColor(i, 0x00FF00FF); // Green
SetPlayerVirtualWorld(i, 3);
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 32, 200);
GivePlayerWeapon(i, 26, 200);
GameTextForPlayer(i,"You're ~g~Defender. ~g~Go Defend them..",2000,3);
SetPlayerPos(i, -39.8148,2367.1724,23.9401);
}
for(new i = 0; i < MAX_PLAYERS; i++)
WarStarted[i] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
WarJoin[i] = 0;
return 1;
}
oh yeah it works great.
And i have no errors.
and whenever i start war it puts me only one team - attacker team
actually i mean that it will put in attacker or defender team but it always put me in one team.
and problem with my code?
help me please.
thanks.
davz!
Re: help me -
Sascha - 11.08.2011
hm could you explain in a detailed way what you want to happen on this callback?
You are using incredibly many loops whereas 1 could cover them all..
Also could you show where the "WarJoin" player's variable is assigned to a value?
Re: help me -
Vince - 11.08.2011
What's the purpose of the first loop that goes through all the teams? It doesn't do anything.
Re: help me -
Davz*|*Criss - 11.08.2011
Alright, better than explaining is that come to my server ip is: 94.23.146.149:9100
Please.
Re : help me -
jasonnw666 - 11.08.2011
you want a random team?