Need some help for Gates
#2

Here's a completely different way:

at the start of your script, add this:
pawn Код:
new object;
and
pawn Код:
forward close();
now, under OnGameModeInit add this

pawn Код:
public OnGameModeInit()
{
           object = CreateObject(your gate informations);
           return 1;
}
Now, get the coordinates of the gate when it's opened, and now you need the command..

pawn Код:
if (strcmp("/openmygate", cmdtext, true, 10) == 0)
{
        MoveObject(object, and then type here the new coordinates when it's opened,and now the speed you want the gate to open);
        SetTimer("close", 7000, 0); // 7000 = 7seconds
        return 1;
}
and now, the coordinates of the gate when it closes:
pawn Код:
public close()
{
       MoveObject(object, new coordinates of the gate when it close, speed);
       return 1;
}
Hope I helped..
Reply


Messages In This Thread
Need some help for Gates - by se7evolution - 22.06.2012, 07:30
Re: Need some help for Gates - by Mr.1337 - 22.06.2012, 07:46
Re: Need some help for Gates - by se7evolution - 22.06.2012, 07:48
Re: Need some help for Gates - by Mr.1337 - 22.06.2012, 07:51
Re: Need some help for Gates - by se7evolution - 22.06.2012, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)