Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock GetVehicleRotation(vehicleid, &Float:x, &Float:y, &Float:z)
- {
- new Float:quat_w, Float:quat_x, Float:quat_y, Float:quat_z;
- GetVehicleRotationQuat(vehicleid, quat_w, quat_x, quat_y, quat_z);
- x = atan2(2*((quat_x*quat_y)+(quat_w+quat_z)), (quat_w*quat_w)+(quat_x*quat_x)-(quat_y*quat_y)-(quat_z*quat_z));
- y = atan2(2*((quat_y*quat_z)+(quat_w*quat_x)), (quat_w*quat_w)-(quat_x*quat_x)-(quat_y*quat_y)+(quat_z*quat_z));
- z = asin(-2*((quat_x*quat_z)+(quat_w*quat_y)));
- }
- stock IsVehicleWheelie(vehicleid)
- {
- new Float:rot[3];
- GetVehicleRotation(vehicleid, rot[0], rot[1], rot[2]);
- if((rot[1] >= 30.0 && rot[1] < 90.0) || (rot[1] <= -30.0 && rot[1] > -90.0)) return 1;
- return 0;
- }
- stock IsPlayerWheelie(playerid)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return 0;
- return IsVehicleWheelie(GetPlayerVehicleID(playerid));
- }
Advertisement
Add Comment
Please, Sign In to add comment