Posts: 1,504
Threads: 109
Joined: Jan 2012
Quote:
Originally Posted by [MG]Dimi
pawn Код:
#include <a_samp>
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys) { if(newkeys & KEY_SUBMISSION) { if(IsPlayerInAnyVehicle(playerid)) { new Float:Speed[3],Float:Pos[4],id; id = GetPlayerVehicleID(playerid); GetVehicleVelocity(id,Speed[0],Speed[1],Speed[2]); GetVehiclePos(id,Pos[0],Pos[1],Pos[2]); GetVehicleZAngle(id,Pos[3]); SetVehiclePos(id,Pos[0]+(40*floatcos(90+Pos[3],degrees)),Pos[1]+(40*floatsin(90+Pos[3],degrees)),Pos[2]); SetVehicleZAngle(id,Pos[3]); SetVehicleVelocity(id,Speed[0],Speed[1],Speed[2]); } } return 1; }
Use it only while on flat, not while going uphill. I can improve it ofc if you want
|
This is freaking cool, I might edit this code for On-foot and use it, thanks!