PDA

View Full Version : Need help with moveobject


mmostafa
10/08/2017, 10:48 PM
new elevator;
elevator = CreateDynamicObject(18755, -1861.10339, 780.87714, 94.24943, 0.00000, 0.00000, 359.81296);

forward elevatordown();
public elevatordown()
{
MoveObject(elevator, -1861.10339, 780.87714, 94.24943, 2.0);
SendClientMessageToAll(-1, "{AFAFAF}[SERVER] {FFFF00}The V.I.P elevator is now ready, go ahead!");
}
COMMAND:elevator(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 50.0, -1861.10339, 780.87714, 94.24943))
{
if(playerData[playerid][playerVIPLevel] >= 2)
{
MoveObject(elevator, -1861.10339, 780.87714, 113.66203, 2.0);
SendClientMessage(playerid, -1, "{AFAFAF}[SERVER]{FFFFFF} You've called the elevator, please wait it to arrive.");
SetTimer("elevatordown", 60000, false);
}
else
{
SendClientMessage(playerid, -1, "{FF0000}[ERROR] {FFFFFF}You must be at least Silver V.I.P to use this command!");
}
}
else
{
SendClientMessage(playerid, -1, "{AFAFAF}[SERVER] {FFFFFF}How do you want to call the elevator while you're not near him? ROFL wireless?");
}
return 1;
}
I have it like this and when i do /elevator it doesnt move why?

Kane
10/08/2017, 11:09 PM
You have a dynamic object. You're using MoveObject().

Use MoveDynamicObject.