28.06.2013, 09:26
Try this:
Put on top of the script:
Then put under OnGameModeInIt:
Then make a public:
Put on top of the script:
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!");
}
}
else
{
InVehicleTime[playerid] = 0;
}
}
}
}

