public CheckPlayerState(){ //by Abhinav
new i,cs;
for(i=0;i<=MAX_PLAYERS;i++){
cs=GetPlayerState(i);
if(DriftMode && cs==PLAYER_STATE_DRIVER && DriftPointsNow>70){
new Float:h;
GetVehicleHealth(GetPlayerVehicleID(i),h);
if(h<HealthInit){
KillTimer(DriftTimer);
DriftExit(i);
GameTextForPlayer(i,\"Utkoztel!\",800,5);
DriftMode=false;
}
}
if(cs==PLAYER_STATE_DRIVER && DriftMode==false){
if(GetVType(GetPlayerVehicleID(i))){
DriftMode=true;
GetVehicleHealth(GetPlayerVehicleID(i),HealthInit);
AutoFixBool=false;
DriftTimer=SetTimerEx(\"Drift\", 200, true, \"i\", i);
}
}
else if(cs!=PLAYER_STATE_DRIVER && DriftMode==true){
KillTimer(DriftTimer);
DriftMode=false;
AutoFixBool=true;
}
else{}
}
return 1;
}