Gate help - 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: Gate help (
/showthread.php?tid=244810)
Gate help -
Bob_Raw - 28.03.2011
Can someone help me with this gate.I have made a gate and that and scripted the CMD ,the gate works but I can open the gate from the other side of the map can someone help me please so I can only open it when I'm close to it , also I want to add the gate so only the LSPD can open it, and the lspd faction is ID 1.
Re: Gate help -
omer5198 - 28.03.2011
show the command
Re: Gate help -
Bob_Raw - 28.03.2011
This is the CMD for the gate
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/close", cmdtext, true, 10) == 0)
{
MoveObject(base,2720.10571289,-2409.60424805,12.46093750, 3.0 );
SendClientMessage(playerid,messagecolor,"The Gate is now CLOSED!");
return 1;
}
if (strcmp("/open", cmdtext, true, 10) == 0)
{
MoveObject(base,2720.0986328125,-2401.1477050781,12.4609375, 3.0 );
SendClientMessage(playerid,messagecolor,"The Gate is now OPEN!");
return 1;
}
Re: Gate help -
omer5198 - 28.03.2011
Quote:
Originally Posted by Bob_Raw
This is the CMD for the gate
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/close", cmdtext, true, 10) == 0)
{
MoveObject(base,2720.10571289,-2409.60424805,12.46093750, 3.0 );
SendClientMessage(playerid,messagecolor,"The Gate is now CLOSED!");
return 1;
}
if (strcmp("/open", cmdtext, true, 10) == 0)
{
MoveObject(base,2720.0986328125,-2401.1477050781,12.4609375, 3.0 );
SendClientMessage(playerid,messagecolor,"The Gate is now OPEN!");
return 1;
}
|
show me how you defined the "base"...
like:
base = CreateObject(....)
i just need the cords...
Re: Gate help -
mprofitt - 28.03.2011
Did you try the "Open Says Me" command?