Door Script - 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)
+--- Thread: Door Script (
/showthread.php?tid=395175)
Door Script -
AarabMoney - 25.11.2012
I need a door script, to place a door en type /open to open it.
I'll pay one dollar in paypal if you find it for me working.
Thanks!
Re: Door Script -
MrMaarud - 25.11.2012
No problem to fix
Add me on skype and i script one for you
Skype : Ben.Pettersen
Re: Door Script -
AarabMoney - 25.11.2012
Added
Re: Door Script -
MrMaarud - 25.11.2012
No problem to fix
Add me on skype and i script one for you
Skype : Ben.Pettersen
AW: Door Script -
Skimmer - 25.11.2012
Well, i can script for you. First of all create a variable top of your script.
pawn Код:
new myGate; // Top of the script
Then create an object below
OnGameModeInit(). Here's an example.
pawn Код:
myGate = CreateObject(974, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
0.0 is the coordinat from x, y, z, rX, rY, rZ Position. You can change it.
CreateObject()
Then go to OnPlayerCommandText(), we'll create a command.
pawn Код:
if (strcmp("/open", cmdtext, true, 10) == 0)
{
MoveObject(myGate, 1.0, 1.0, 1.0, 3.0);
return 1;
}
We created /open command, it opens the gate. 1.0 is the new x, y, z position. Like i said you can change it. 3.0 = Speed. 3 Seconds.
Here's /close command
pawn Код:
if (strcmp("/close", cmdtext, true, 10) == 0)
{
MoveObject(myGate, 0.0, 0.0, 0.0, 3.0);
return 1;
}
0.0 is the old x, y, z Position, you know.