2022-11-09, 04:51 PM
try this
PHP Code:
new ac_ouvu_js[MAX_PLAYERS], ac_ouvu_vid[MAX_PLAYERS], ac_ouvu_tick[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
ac_ouvu_vid[playerid] = 0;
ac_ouvu_tick[playerid] = 0;
ac_ouvu_js[playerid] = 0;
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
ac_ouvu_js[forplayerid] = gettime();
if(vehicleid == INVALID_VEHICLE_ID) return ac_ouvu_vid[playerid] = INVALID_VEHICLE_ID;
return 1;
}
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
{
if(ac_ouvu_vid[playerid] != vehicleid && GetTickCount()-ac_ouvu_tick[playerid] > 100 && gettime()-ac_ouvu_js[playerid] > 3) Kick(playerid); //99% use troll-hack
ac_ouvu_vid[playerid]=vehicleid;
ac_ouvu_tick[playerid]=GetTickCount();
return 1;
}