public OnPlayerUpdate(playerid)
{
if(GetPlayerSpeed(playerid, false) > 65) //65=sebesség
{
//ide írd mi legyen ha 65-nél gyorsabban mennek
return 1;
}
return 1;
}
return 1;
}
A GetPlayerSpeed-hez szükséged van erre:
stock Float:GetPlayerSpeed(playerid, bool:Z = true)
{
new Float:SpeedX, Float:SpeedY, Float:SpeedZ;
new Float:Speed;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid), SpeedX, SpeedY, SpeedZ);
else GetPlayerVelocity(playerid, SpeedX, SpeedY, SpeedZ);
if(Z) Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatadd(floatpower(SpeedY, 2.0), floatpower(SpeedZ, 2.0))));
else Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatpower(SpeedY, 2.0)));
return floatmul(Speed, 200.0);
}
Remélem tudtam segíteni
}
else
{
http://forum.sa-mp.com/index.php?topic=159610.0