Help with a moving gate
#4

Not sure about it at all, haven't even tested it.
Make sure to edit your gate position and everything.


pawn Код:
#include <a_samp>
new
    gate,
    playaName[25],
    gateStatus = 0;


public OnFilterScriptInit()
{
    gate = CreateObject(987, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/gate", true))
    {
        GetPlayerName(playerid, playaName, 24);
        if(!strcmp(playaName,"SAMP_Player",true))
        {
            if(!gateStatus)
            {
                MoveObject(gate, 0.0, 0.0, -3.0, 2.5);
                gateStatus = 1;
                return 1;
            }
            else
            {
                MoveObject(gate, 0.0, 0.0, 0.0, 2.5);
                gateStatus = 0;
                return 1;
            }
           
        }
    }
    return 1;
}
EDIT: Mistaken, it does work as a standalone FS if you fix the coordinates for gate & it's position after /gate.
Reply


Messages In This Thread
Help with a moving gate - by Zach7 - 12.07.2012, 00:56
Re: Help with a moving gate - by CmZxC - 12.07.2012, 00:58
Re: Help with a moving gate - by Zach7 - 12.07.2012, 01:04
Re: Help with a moving gate - by CmZxC - 12.07.2012, 01:20
Re: Help with a moving gate - by Zach7 - 12.07.2012, 01:33
Re: Help with a moving gate - by CmZxC - 12.07.2012, 01:34
Re: Help with a moving gate - by Zach7 - 12.07.2012, 01:36
Re: Help with a moving gate - by clarencecuzz - 12.07.2012, 12:13

Forum Jump:


Users browsing this thread: 4 Guest(s)