27.07.2011, 14:28
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;
}
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
