21.01.2012, 04:48
Hey, i wanna know, if i pressed <KEY_FIRE> a object should drop back of playerid vehicle.
But the x and y position changes when we make turn, how should i make it the same??
Can't figure out, help pls.
But the x and y position changes when we make turn, how should i make it the same??
Can't figure out, help pls.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(currentveh, vehx, vehy, vehz); //x+0.13 y-5.30 z+0.27
CreateObject(1518,vehx+0.13,vehy-5.30,vehz,0.00000000,0.00000000,0.00000000); //object(barrel4) (1)
}
return 1;
}