27.06.2013, 18:14
Put on top of the script:
Then put under OnGameModeInIt:
Then make a public:
Code:
new InVehicleTime[MAX_PLAYERS];
Code:
SetTimer("InVehicleCheck", 1000, true);
Code:
forward InVehicleCheck(); public InVehicleCheck() { for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle(i)) { new Float:Velocity[3], output[80]; GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]); if(Velocity[0] == 0 && Velocity[1] == 0 && Velocity[2] == 0) { if(InVehicleTime[playerid] < 10) { InVehicleTime[playerid] = InVehicleTime[playerid]+1; } else { SendClientMessage(playerid, -1, "You are not moving with your vehicle for 10+ seconds!"); } } } } }