Quote:
Originally Posted by Onfroi
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_SUBMISSION) { new Float:Speed[3],Float:Pos[4]; GetPlayerVelocity(playerid,Speed[0],Speed[1],Speed[2]); GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid,Pos[3]); SetPlayerPos(playerid,Pos[0]+(40*floatcos(90+Pos[3],degrees)),Pos[1]+(40*floatsin(90+Pos[3],degrees)),Pos[2]); SetPlayerFacingAngle(playerid,Pos[3]); SetPlayerVelocity(playerid,Speed[0],Speed[1],Speed[2]); } return 1; }
The only problem with it is that you can go through objects.
|
Itsnot working on foot! when he in the car he just fuck away from it