29.11.2010, 16:11
(
Последний раз редактировалось [MNC]Azz; 29.11.2010 в 18:17.
)
So yea.... i have a problem with this function...
heres a part on my script im making....
wt im trying to do is to kill every1 when the map changes so that they will spawn in a different place...
but when i test it with my friend.... it works on me... but not on him!... i havent tested it with more than 2 ppl yet...
btw my friend dont cheat so its not him thats the problem....
it would be nice if somebody helped... what have i done wrong in this script?
if a thread similar to this has already been posted plz reply with tha link coz the forum is too big to search for this...
EDIT: posted bigger part of my code...
heres a part on my script im making....
pawn Код:
public TeamsKills()
{
if(TeamREDKills >= 2 && TeamREDKills > TeamBLUEKills)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GameTextForAll("~y~TEAM ~r~RED ~g~WON!!!~n~~y~Switching Map...",5000,3);
SetTimer("MapChange",5000,false);
TeamBLUEKills = 0;
TeamREDKills = 0;
TogglePlayerControllable(i,false);
return 1;
}
return 1;
}
else if(TeamBLUEKills >= 2 && TeamBLUEKills > TeamREDKills)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GameTextForAll("~y~TEAM ~b~BLUE ~g~WON!!!~n~~y~Switching Map...",5000,3);
SetTimer("MapChange",5000,false);
TeamBLUEKills = 0;
TeamREDKills = 0;
TogglePlayerControllable(i,false);
return 1;
}
return 1;
}
return 1;
}
forward MapChange();
public MapChange()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new rand = random(3);
switch (rand)
{
case 0:MArea69 = 1,MBuildyard = 0,MHarbour = 0,SendClientMessageToAll(COLOR_ORANGE,"Map Has Changed to Area69...");
case 1:MBuildyard = 1,MArea69 = 0,MHarbour = 0,SendClientMessageToAll(COLOR_ORANGE,"Map Has Changed to BuildYard...");
case 2:MHarbour = 1,MArea69 = 0,MBuildyard = 0,SendClientMessageToAll(COLOR_ORANGE,"Map Has Changed to Harbour...");
}
SetPlayerScore(i,0);
SetPlayerHealth(i,0.0);
return 1;
}
return 1;
}
but when i test it with my friend.... it works on me... but not on him!... i havent tested it with more than 2 ppl yet...
btw my friend dont cheat so its not him thats the problem....
it would be nice if somebody helped... what have i done wrong in this script?
if a thread similar to this has already been posted plz reply with tha link coz the forum is too big to search for this...
EDIT: posted bigger part of my code...