Problem :S - 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: Problem :S (
/showthread.php?tid=272192)
Problem :S -
FireCat - 27.07.2011
pawn Код:
public MoveCows()
{
new Float:x,Float:y,Float:z;
for(new i = 0; i < MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(inderby[i] == 3)
{
for(new j = 0; j < 5;j++)
{
if(isgettingchased[i] == 0 && IsCowChasing[j] == 0)
{
GetPlayerPos(i,x,y,z);
MoveObject(j,x,y,z+1,7.5);
gettingchasedby[i] = j;
isgettingchased[i] = 1;
IsCowChasing[j] = 1;
CowChasing[i] = SetTimerEx("Cowchasing",500,true,"i",i);
}
}
}
}
}
return 1;
}
Then in GameModeInit i have Cows[0] = createobjec.. till Cows[6].
In that public MoveCows i want like ex: if there are 3 players inderby = 3 then 1 cow moves to 1 player, another cow moves to another and the other cow to the other player. But if im inderby = 3 and my friend too, only 1 cow moves

why?
Re: Problem :S -
ScRaT - 27.07.2011
just posting cuz i wanna know the solution
(bump)