how to make same command at moveable gate - 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: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make same command at moveable gate (
/showthread.php?tid=249551)
how to make same command at moveable gate -
Aizen - 19.04.2011
Hey please help me,how to make same command at moveable gate.i dont know,how to script that,when gate open and when gate close,we use same commaned like /gate
Re: how to make same command at moveable gate -
peterRook - 19.04.2011
some guy posted this somewhere its right but bear in mind you need the co ordinated i have edited it to shopw you where the co ordinates go
Quote:
It is new obj; // Somewhere at the top of your script
public OnGameModeInit()
{
obj = CreateObject(980, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); //coords here
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/moveobject", true) == 0)
{
new string[50];
new movetime = MoveObject(obj, 0, 0, 10, 2.00);
format(string, sizeof(string), "Object will finish moving in %d milliseconds", movetime);
SendClientMessage(playerid, 0xFF000000, string);
return 1;
}
|
Re: how to make same command at moveable gate -
alpha500delta - 19.04.2011
Quote:
Originally Posted by peterRook
some guy posted this somewhere its right but bear in mind you need the co ordinated i have edited it to shopw you where the co ordinates go
|
Read his post. This will make the gate only go up.
You can use something like this:
pawn Код:
new Up = 0;
if(Up == 1)
{
MoveObject(...);
Up = 0;
}
else if(Up == 0)
{
MoveObject(...);
Up = 1;
}
Re: how to make same command at moveable gate -
Aizen - 19.04.2011
I still cant,i already use it your code
Re: how to make same command at moveable gate -
alpha500delta - 19.04.2011
How... Just paste that code inside you're command, fill in the positions, speed and objectname and you're done!
And remember to change the up and down pos, otherwise it won't work for sure -.-
Re: how to make same command at moveable gate -
Aizen - 19.04.2011
I dont understand ,but your code got error