SA-MP Forums Archive
Timer ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Timer ! (/showthread.php?tid=189642)



Timer ! - seven7een - 12.11.2010

how do timer moving objects?

can explain me ?


Re: Timer ! - seven7een - 12.11.2010

can help me ?


Re: Timer ! - The_Moddler - 12.11.2010

No.. and stop bumping crazy noob.


Re: Timer ! - Mean - 12.11.2010

This :



pawn Код:
//on top of script
new moveobjectid;
pawn Код:
//under gamemodeinit

moveobjectid = CreateObject(..... . ...................);
then on top of script


pawn Код:
forward MoveTimer(playerid);
then
anywhere in the script just not under any callback
pawn Код:
public MoveTimer(playerid);
{
       MovePlayerObject(playerid, moveobjectid,Float:X, Float:Y, Float:Z, 10.0);//10.0 is speed in milisecs
}
then
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        SetTimerEx("MoveTimer",timeinmiliseconds,0,"d",playerid);
        return 1;
    }
    return 0;
}
]]


Re: Timer ! - seven7een - 12.11.2010

but I was wondering how to make the object move to two places! for example up and down!


Re: Timer ! - seven7een - 12.11.2010

can help me aguen ?