question
#2

Heres something i wrote (some from wiki) should work. Unless i missed something
pawn Код:
forward OnObjectStopMoving(objectid);//forward the timer

public OnPlayerCommandText(playerid, cmdtext[])//from the wiki
{
    if(strcmp(cmdtext, "/moveobject", true) == 0)
    {
        new string[50];
        new movetime = MoveObject(obj, 0, 0, 10, 2.00);
        format(string, sizeof(string), "Object will finish moving in %d milliseconds", movetime);
        SendClientMessage(playerid, 0xFF000000, string);
        SetTimerEx("OnObjectStopMoving", movetime, false, "i", objectid);// swap objectid for your gate/moving objects id
        return 1;
    }
    return 0;
}

public OnObjectStopMoving(objectid)//this is called when the object stops moving
{
    //do something with your object id here
    return 1;
}
Reply


Messages In This Thread
question - by iJumbo - 08.11.2010, 10:03
Re: question - by iggy1 - 08.11.2010, 10:15
Re: question - by HireMe - 08.11.2010, 10:37
Re: question - by Bessensap - 08.11.2010, 10:39
Re: question - by iggy1 - 08.11.2010, 11:20
Re: question - by iJumbo - 08.11.2010, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)