[HELP] Moving 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: [HELP] Moving gate! (
/showthread.php?tid=264594)
[HELP] Moving gate! -
FobbanN - 26.06.2011
I need some help with making a gate moving by using /open and /close, i have readed tutorials but it don't work, so i need help of someone.
Please PM me here on forums or add me on MSN.
Tw-robban12@hotmail.com
Re: [HELP] Moving gate! -
Twinki1993 - 26.06.2011
Okay I will send you.
Re: [HELP] Moving gate! -
FobbanN - 26.06.2011
Have you sent? Because im not sure if i can see the pending acceptions...
Re: [HELP] Moving gate! -
=WoR=Varth - 27.06.2011
pawn Код:
new bool:gate
OnGameModeInit()
{
gate = CreateObject(2930,320.940551,312.213470,1000.785278,0,0,0.244628,50);//Create the gate with name "gate"
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,1,321.2952,312.1402,999.1484))//Check if player near the gate
{
if(gate == false)//If the gate is opened, close it.
{
MoveObject(sdmtd[1],320.953125,313.753906,1000.785278,1);//Move the gate
gate = true;//set the bool
return 1;
}
else//If the gate closed, open it.
{
MoveObject(gate,320.940551,312.213470,1000.785278,1)//Move the gate
gate = false;//set the bool
return 1;
}
}
Re: [HELP] Moving gate! -
FobbanN - 27.06.2011
Quote:
Originally Posted by varthshenon
pawn Код:
new bool:gate
OnGameModeInit() { gate = CreateObject(2930,320.940551,312.213470,1000.785278,0,0,0.244628,50);//Create the gate with name "gate" return 1; }
if(IsPlayerInRangeOfPoint(playerid,1,321.2952,312.1402,999.1484))//Check if player near the gate { if(gate == false)//If the gate is opened, close it. { MoveObject(sdmtd[1],320.953125,313.753906,1000.785278,1);//Move the gate gate = true;//set the bool return 1; } else//If the gate closed, open it. { MoveObject(gate,320.940551,312.213470,1000.785278,1)//Move the gate gate = false;//set the bool return 1; } }
|
Can you add me on MSN or something, i get some wierd errors, i think im not sure where to put it, shall i put it on top of my whole script or under the place i add cars and such?
Re: [HELP] Moving gate! -
=WoR=Varth - 27.06.2011
pawn Код:
new bool:gate//On top of your script
gate = CreateObject(2930,320.940551,312.213470,1000.785278,0,0,0.244628,50);//Create the gate with name "gate" ((Inside OnGameModeInit))
if(IsPlayerInRangeOfPoint(playerid,1,321.2952,312.1402,999.1484))//Check if player near the gate((Inside your command ex: /gate))
{
if(gate == false)//If the gate is opened, close it.
{
MoveObject(sdmtd[1],320.953125,313.753906,1000.785278,1);//Move the gate
gate = true;//set the bool
return 1;
}
else//If the gate closed, open it.
{
MoveObject(gate,320.940551,312.213470,1000.785278,1)//Move the gate
gate = false;//set the bool
return 1;
}
}
I'm sorry but I'm busy right now.
Re: [HELP] Moving gate! -
FobbanN - 07.07.2011
Oh, do you mean that i shall make a new scipt file? As i have understunded was i going to write it into my gamemode, or shall i write into my gamemode? :P