Need help with ramp spawning
#1

Im trying to add the function to place a ramp infront of the player using "onplayercommandtext"
heres what i have.

Quote:

if(strcmp(cmdtext, "/putramp", true)==0){
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
CreateObject(1634, X+5, Y, Z, 0.0, 0.0, A);
return 1;
}

Now whats happening is the ramps are being placed, except that when their placed, depending on the angle of the player, they can differ positions.

Can anyone let me know how i can fix this? as im not that good at scripting yet. And cant seem to figure out how to fix it.
Reply
#2

I encountered the same problem it can be fixed using trigonometric functions (floatsin, floatcos) check out the thread I started it's got answers you need.

http://forum.sa-mp.com/index.php?topic=111600.0

You will also need to set a timer to destroy the object afterward
Good luck keep me posted
Reply
#3

http://forum.sa-mp.com/index.php?top...1429#msg671429

Made it ages ago, just use it, credits don't matter.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)