25.06.2012, 16:28
i made a little thing that protected too, but it's possible to make the bug.
i used:
i used:
pawn Code:
if(ispassenger)
{
new Float:dx,Float:dy,Float:dz,Float:velo;
GetPlayerPos(playerid,dx,dy,dz);
new Float:vx,Float:vy,Float:vz;
GetVehicleVelocity(vehicleid,vx,vy,vz);
velo = floatround(floatsqroot(((vx*vx)+(vy*vy))+(vz*vz))*156.666667);
if(GetDistBetweenVehiclePlayer(vehicleid,playerid) > 3 && velo >= 1.0)
{
SetPlayerPos(playerid, dx,dy,dz);
}
}