[Tutorial] How to create /open /close gates - 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 create /open /close gates (
/showthread.php?tid=520897)
How to create /open /close gates -
JakeHunter1 - 20.06.2014
Hello guys now i will show you how to create a /open /close gates ..
First step you need to do is create your command ..
pawn Код:
if(!strcmp(cmdtext, "/open", true, 3))
{
Now we need to create the gate (Use Mapping Editor )
When we create the gates now we need to define them..
pawn Код:
new tutorialgate; (put your gate name)
Then we add the gate
tutorialgate = CreateObject(cordinates and the gate .. )
Now we need to finish the command
pawn Код:
MoveObject(tutorialgate, cordinates, speed);
tutorialgate - the gate
cordinates - where to move
speed - move speed on the gate ..
Now for the /close we do all the same but we change the cordinates ..
Example command :
pawn Код:
if(strcmp(cmd,"/open",true)==0)
{
MoveObject(tutorialgate, 250.59617614746, 63.366600036621, 997.8391113281, 9.000);
SendClientMessage(playerid, COLOR_YELLOW, "You have opened the gate .");
return 1;
}
Re: How to create /open /close gates -
ReD_DeVi - 22.06.2014
How to find the cordinates?
Re: How to create /open /close gates -
JakeHunter1 - 25.06.2014
Quote:
Originally Posted by ReD_DeVi
How to find the cordinates?
|
on the object ..