How to move gates in filterscript? - 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 move gates in filterscript? (
/showthread.php?tid=112744)
How to move gates in filterscript? -
turky - 09.12.2009
How can i move gates in filter script?
Re: How to move gates in filterscript? -
miokie - 09.12.2009
Quote:
Originally Posted by turky
How can i move gates in filter script?
|
http://forum.sa-mp.com/index.php?topic=66575.0
You see that Little search box at the top of your Sa-mp forum page? It has a little magnifying glass on the left side of it. Search for your problem first before making a new thread, 9/10 times it has been answered before.
Re: How to move gates in filterscript? -
xxjackoxx - 22.02.2010
Something like this
Код:
Top of script-
new gate1;
OnPlayerCommandText-
if(strcmp(cmdtext, "/open1", true) == 0)//open gates
{
MoveObject(gate1,X,Y,Z, GATE SPEED);//cordinates open gate
SendClientMessage(playerid,COLOR_WHITE," Gate Opening!");
return 1;
}
if(strcmp(cmdtext,"/close1",true)==0)//close gates
{
MoveObject(gate1, X,Y,Z, GATE SPEED);//cordinates open gate
SendClientMessage(playerid,COLOR_WHITE," Gate Closed");
return 1;
}
Make sure under create objects you put
OnGameModeInt
gate1 = CreateObject(id,cords,etc) note that this has to be your closed gate