31.05.2010, 20:15
Hello.
I will try to help you, but, I'm for Mac now, then I do not know if the code is exact.
Dear,
Cookie[NO].
I will try to help you, but, I'm for Mac now, then I do not know if the code is exact.
pawn Code:
#pragma tabsize 0
//Cause from mac cannot tab-code
// Defines
#define Antifreeze_timer_interval 5000
#define foreach(%1,%2) for(new %2; %2 < MAX_PLAYERS; %2++) if(IsPlayerConnected(%2))
//Somewhere (new)
new AFArray[MAX_PLAYERS];
//OnGameModeInit
SetTimer("Antifreeze", Antifreeze_timer_interval, true);
//Somewhere.
public Antifreeze()
{
if(IsPlayerInAnyVehicle(playerid) == 0 && AFArray[playerid] == 1){
ClearAnimations(playerid);
AFArray[playerid] = 0;
}else{
if(IsPlayerInAnyVehicle(playerid) == 1){
AFArray[playerid] = 1;
}
if(IsPlayerInAnyVehicle(playerid) ==0{
AFArray[playerid] = 0;
}
}
}
Cookie[NO].