08.11.2010, 10:15
(
Последний раз редактировалось iggy1; 08.11.2010 в 10:17.
Причина: wrong forward
)
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;
}