new obj; // Somewhere at the top of your script
Code: Select all
public OnGameModeInit()
{
obj = CreateObject(980, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
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);
return 1;
}
return 0;
}
Gribu lai objekts kustās uz augšu un ar to pašu komandu uz leju,
vienīgais kas man sanāca ir visparastākais kods, bet ar to pašu viņš nekustējās bet gan pārkopēja objektu galapunktā.