SA-MP Forums Archive
[Tutorial] How to Make Moving Objects - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to Make Moving Objects (/showthread.php?tid=377233)



How to Make Moving Objects - SkullMaster73 - 13.09.2012

Hello guys today i'm gonna teach you how to make Moving Objects.

First add new at the top of your Script.

pawn Код:
new gate;//This will be your gate
Now under OnGameModeInit add your gate

pawn Код:
gate = CreateObject(971,263.59960938,-1333.29980469,55.40000153,0.00000000,0.00000000,215.24975586);//for example
Now for the command

pawn Код:
if (strcmp("/opengate", cmdtext, true, 10) == 0)
    {
    MoveObject(gate,coordinates,Speed,rotation coordinates);//your coordinates when the gate is opened
    return 1;
    }
    if (strcmp("/closegate", cmdtext, true, 10) == 0)
    {
    MoveObject(gate,coordinates,Speed,rotation coordinates);//your coordinates when the gate is closed
    return 1;
    }
And your done.


Re: How to Make Moving Objects - Glint - 13.09.2012

Do you know why no one is commenting ?


Re: How to Make Moving Objects - xMCx - 13.09.2012

its easy , but newbies need more explain to figure this out... ill make new one for it soon with more explanation
2/10 for the effort....


Re: How to Make Moving Objects - xMCx - 13.09.2012

its easy , but newbies need more explain to figure this out... ill make new one for it soon with more explanation
2/10 for the effort....


Re: How to Make Moving Objects - Glint - 13.09.2012

Quote:
Originally Posted by xMCx
Посмотреть сообщение
its easy , but newbies need more explain to figure this out... ill make new one for it soon with more explanation
2/10 for the effort....
Excuse me but where do you see the effort ? He barely wrote some lines of code.


Re: How to Make Moving Objects - xMCx - 13.09.2012

Quote:
Originally Posted by Lexi'
Посмотреть сообщение
Excuse me but where do you see the effort ? He barely wrote some lines of code.
yup , sorry for the 2 posts it might be lag + maybe its his first work he should make more effort next time..


Re: How to Make Moving Objects - Cjgogo - 13.09.2012

Wikipedia explains it better, and you didn't even explain the params of the function, but, for the effort, REP-- for you


Re: How to Make Moving Objects - SkullMaster73 - 13.09.2012

I will make a video so that is easy and simple