28.09.2010, 17:07
The problem is that you aren't defining what playerid is in the saltitos function, because you can't send any parameter by using SetTimer(). You would need to use SetTimerEx(), but you don't have any playerid in OnFilterScriptInit.
Therefore, the best option I think is looping trough all the players in saltitos.
Something like this should do:
Therefore, the best option I think is looping trough all the players in saltitos.
Something like this should do:
pawn Код:
forward saltitos();
public saltitos()
{
for(new i; i < MAX_PLAYERS; i ++) if(IsPlayerConnected(i))
{
if (PlayerInfo[i][saltos] <= 0)
{
ApplyAnimation(i, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
}
PlayerInfo[i][saltos] = 2;
}
return 1;
}