PDA

View Full Version : Moving Objects help


hhaaoo123
17/01/2015, 12:36 PM
I have got problem with the movable door, it sent me the message but the door isn't moving, any solution?

CMD:poldoor(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACorleone(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an International Police.");
if(IsPlayerInRangeOfPoint(playerid, 3, 1218.29, -1681.61, -40.75))
{
if(!interpollobbystatus) //
{
MoveObject(interpollobby,1495, 1219.57, -1681.61, -40.75, 0.00, 0.00, 0.00);//door1 closed
format(string, sizeof(string), "* %s puts their finger on the scanner and opens the lobby door.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
interpollobbystatus = 1;
}
else if(interpollobbystatus)
{
MoveObject(interpollobby,1495, 1218.29, -1681.61, -40.75, 0.00, 0.00, 0.00);//door1 open
format(string, sizeof(string), "* %s %s puts their finger on the scanner and closes the lobby doors.", RPN(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
interpollobbystatus = 0;
}
}
return 1;
}

HazardouS
17/01/2015, 02:35 PM
Read the Wiki page before using the function:
http://wiki.sa-mp.com/wiki/MoveObject

You're moving the object one unit on the Y axis with the speed of -40.75 units per second.