SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/02/2012, 03:22 PM   #1
ProdrifterX
Huge Clucker
 
ProdrifterX's Avatar
 
Join Date: Aug 2011
Location: drift-generation.co.cc
Posts: 211
Reputation: 4
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!!

Last edited by ProdrifterX; 02/02/2012 at 05:37 PM.
ProdrifterX is offline   Reply With Quote
Old 02/02/2012, 03:49 PM   #2
[KHK]Khalid
Gangsta
 
[KHK]Khalid's Avatar
 
Join Date: Jan 2012
Location: Alexandria, Egypt
Posts: 855
Reputation: 136
Default Re: [Help] How to move object on sa-mp [mta - map]???

pawn Code:
// on the top
new ramp;
http://wiki.sa-mp.com/wiki/CreateObject - to create an object
http://wiki.sa-mp.com/wiki/Samp_objects - For a list of object ids
pawn Code:
// under OnGameModeInit
ramp = CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance) // read the links above
http://wiki.sa-mp.com/wiki/MoveObject

pawn Code:
// 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 Code:
// 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;
}
[KHK]Khalid is offline   Reply With Quote
Old 02/02/2012, 05:40 PM   #3
ProdrifterX
Huge Clucker
 
ProdrifterX's Avatar
 
Join Date: Aug 2011
Location: drift-generation.co.cc
Posts: 211
Reputation: 4
Default Re: [Help] How to move object on sa-mp [mta - map]???

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!!
ProdrifterX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move Object ! dorperez Scripting Help 3 18/11/2011 04:55 PM
move object wiht command then auto move back slymatt Help Archive 8 25/07/2011 01:27 AM
Move Object Help tzeny Help Archive 4 09/02/2011 12:22 PM
Object move billiout Help Archive 2 24/08/2010 11:51 AM


All times are GMT. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.