Posts: 89
Threads: 26
Joined: Jan 2011
Reputation:
0
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.
Posts: 89
Threads: 26
Joined: Jan 2011
Reputation:
0
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;
}
Posts: 459
Threads: 14
Joined: Jul 2008
Reputation:
0
Did you try the "Open Says Me" command?