[Help] How to move object on sa-mp [mta - map]???
#1

Hello guys. i need help with move object 90
i got ramp on server but when i type /open
it dont moves 90 angle..
help meh!
thankya rep+1!!
Reply
#2

pawn Код:
// on the top
new ramp;
https://sampwiki.blast.hk/wiki/CreateObject - to create an object
https://sampwiki.blast.hk/wiki/Samp_objects - For a list of object ids
pawn Код:
// under OnGameModeInit
ramp = CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance) // read the links above
https://sampwiki.blast.hk/wiki/MoveObject

pawn Код:
// Under OnPlayerCommandText
if (strcmp("/openramp", cmdtext, true, 9) == 0)
{
       MoveObject(ramp,NEW X,NEW Y,NEW Z, SPEED); // check the link above
return 1;
}
also if you want it to back again to the original position after moving (AUTOMATICALLY)
pawn Код:
// Under OnObjectMoved
if(objectid == ramp)
{
       MoveObject(ramp, Original X, Original Y , Original Z, SPEED); // the object (ramp) goes back to its original position after it finish moving
return 1;
}
Reply
#3

Thanks but i dont need it now..
Quote:

Default [Help] How to move object 90 angle?! REP+1
Hello guys. i need help with move object 90
i got ramp on server but when i type /open
it dont moves 90 angle..
help meh!
thankya rep+1!!

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)