Timer !
#4

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;
}
]]
Reply


Messages In This Thread
Timer ! - by seven7een - 12.11.2010, 17:45
Re: Timer ! - by seven7een - 12.11.2010, 18:01
Re: Timer ! - by The_Moddler - 12.11.2010, 18:06
Re: Timer ! - by Mean - 12.11.2010, 18:10
Re: Timer ! - by seven7een - 12.11.2010, 18:14
Re: Timer ! - by seven7een - 12.11.2010, 18:21

Forum Jump:


Users browsing this thread: 1 Guest(s)