12.11.2010, 18:10
This :
then on top of script
then
anywhere in the script just not under any callback
then
]]
pawn Код:
//on top of script
new moveobjectid;
pawn Код:
//under gamemodeinit
moveobjectid = CreateObject(..... . ...................);
pawn Код:
forward MoveTimer(playerid);
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
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
SetTimerEx("MoveTimer",timeinmiliseconds,0,"d",playerid);
return 1;
}
return 0;
}