Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock GetPlayerSpeed(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid)) break;
- new Float:ST[4];
- GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3;
- return floatround(ST[3]);
- }
- stock GetVehicleSpeed(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid)) continue;
- new Float:ST[4];
- GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3;
- return floatround(ST[3]);
- }
Advertisement
Add Comment
Please, Sign In to add comment