Help me about gate commands
#1

Hi,
Can anyone make a automatic gate for me with cmd open and close ? This is the gate code
CreateObject(980, 1263.889526, -2045.712280, 61.069244, 0.0000, 0.0000, 0.0000);

I need it opens and closes. I don't know how to do it, please explain me where to put what..
I'm troubling with that MoveObject many time and I really need it. Thanks you.



Regards
Kfir
Reply
#2

Post the coordinates while the gate is opened.
Reply
#3

Someone gave the information that I gave and a guy gave him a reply with the Code and like.

Can you explain me more? I'm really new at scripting.
Reply
#4

You need to have 2 lines of CreateObject (close and open), you only have 1.
Reply
#5

Okay let me make in the MTA the closed one. Wait please and answer me in 20 minutes after that post been added

Edit:
this is the closed time:
CreateObject(980, 1275.430176, -2045.808960, 61.140751, 0.0000, 0.0000, 0.0000);

It will move to that position. I don't know what's the position in it then you'll know it but this is where it may move to. the location in the line there.
Reply
#6

http://forum.sa-mp.com/index.php?topic=177821.0

It has been done there.
Reply
#7

Quote:
Originally Posted by MadeMan
Yup but maybe can you give me what I may do and the close command too please .
Reply
#8

Top of script:
pawn Код:
new gate;
OnGameModeInit:
pawn Код:
gate = CreateObject(980, 1263.889526, -2045.712280, 61.069244, 0.0000, 0.0000, 0.0000);
OnPlayerCommandText:
pawn Код:
if(strcmp(cmdtext, "/open", true) == 0)
{
  if(IsPlayerInRangeOfPoint(playerid,10.0,1263.889526, -2045.712280, 61.069244))
  {
    MoveObject(gate,1275.430176, -2045.808960, 61.140751,2.0);
  }
  return 1;
}

if(strcmp(cmdtext, "/close", true) == 0)
{
  if(IsPlayerInRangeOfPoint(playerid,10.0,1263.889526, -2045.712280, 61.069244))
  {
    MoveObject(gate,1263.889526, -2045.712280, 61.069244,2.0);
  }
  return 1;
}
Reply
#9

OMG THANK YOU VERY MUCH !

I'm trying !
Reply
#10

Thank's you. But now I'm having troubles with adding objects into the server. I'm putting the objects as I need to, in the place that I have to and no errors. But when I'm uploading the mode to the hosted server and uploading the hosted server, getting inside and guess what? nothing added. No objects. can it happen because of many objects? maybe do you know the problem? thanks you.
Reply
#11

https://sampwiki.blast.hk/wiki/Limits

There is a limit of 254 objects, so it might be the problem if you have more than that.
Reply
#12

Oh. Okay. I have less than. I don't know what the problem is. . Do you know an other problem that won't make it shown
Reply
#13

Make sure its under, OnGameModeInit. and make sure that you compiled, and make sure tha tif you changed the name you changed it in server.cfg also.
Reply
#14

lol im not that idiot ! and oit still un wroks. i really have up to 250 but its CreateDynamicObjectives. It's still the same?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)