24.02.2009, 15:03
I've got something like this in my script:
Just adjust it like you want it.
Quote:
if(Vehhp <= 400) { if(IsPlayerInAnyVehicle(i)) { TweakCooldown[i] = 3; if(TweakCooldown[i] == 3) { TweakCooldownT[i]++; CarRunning[VID] = 0; new newstate; newstate = GetPlayerState(i); if(newstate == PLAYER_STATE_DRIVER) { TogglePlayerControllable(i,0); if(TweakCooldownT[i] == 1) { SendClientMessage(i, COLOR_RED, " Your car gives out and stops running !"); SendClientMessage(i, COLOR_GREY, " /crack ) "); TogglePlayerControllable(i,0); } if(TweakCooldownT[i] == 10) { SendClientMessage(i, COLOR_RED, " Your car gives out and stops running !"); SendClientMessage(i, COLOR_GREY, " /crack ) "); } if(TweakCooldownT[i] == 20) { SendClientMessage(i, COLOR_RED, " Your car gives out and stops running !"); SendClientMessage(i, COLOR_GREY, " /crack ) "); TogglePlayerControllable(i,0); } } } } } |