problem with moveobject
#7

Quote:
Originally Posted by jonesy
i tripple posted because i went onto the 3rd page twice and i would really like to get some help with this, how about you dont post if you cannot help me instead of spamming to raise your post count
Accusing me of trying to increase my post count after triple posting makes you look a bit silly..

Try this.

pawn Код:
#include <a_samp>

new
    Door, DoorOpen; //DoorOpen - 0 = closed, 1 = open, 2 = closing, 3 = opening,

public OnFilterScriptInit()
{
    Door = CreateObject(3113, -2305.1000976563, 2050, 0.9200000166893, 0, 0, 0);//door
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/door", true)==0)
    {
        switch(DoorOpen)
        {
            case 1: //If open, close it
            {
                MoveObject(Door, -2305.1000976563, 2050.0000, 0.9200000166893, 2.00 );
                Door = 2;
            }
            case 0: //If closed, open it
            {
                MoveObject(Door, -2305.1000976563, 2050.0000, 10.920000076294, 2.00 );
                Door = 3;
            }
            case 2,3: //If moving, tell the player.
            {
              SendClientMessage(playerid, 0xAAAAAAAA, "The lift is already moving");
            }
        }
        return 1;
    }
    return 0;
}

public OnObjectMoved(objectid)
{
    if(objectid == Door)
    {
        switch(DoorOpen)
        {
            case 2: DoorOpen = 0;
            case 3: DoorOpen = 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
problem with moveobject - by jonesy - 23.05.2009, 20:00
Re: problem with moveobject - by jonesy - 23.05.2009, 20:59
Re: problem with moveobject - by jonesy - 24.05.2009, 18:18
Re: problem with moveobject - by Hot - 24.05.2009, 18:23
Re: problem with moveobject - by Weirdosport - 24.05.2009, 18:27
Re: problem with moveobject - by jonesy - 24.05.2009, 19:08
Re: problem with moveobject - by Weirdosport - 24.05.2009, 19:39
Re: problem with moveobject - by jonesy - 24.05.2009, 22:06
Re: problem with moveobject - by Weirdosport - 24.05.2009, 22:19
Re: problem with moveobject - by Larry - 24.05.2009, 23:00

Forum Jump:


Users browsing this thread: 1 Guest(s)