SA-MP Forums Archive
Moving gates help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Moving gates help. (/showthread.php?tid=349121)



Moving gates help. - tiernantheman - 07.06.2012

Can anybody help me. When I try to open the gate it dosen't open but I get the message saying You have opened Fire Department Bay 1, but it dosen't move. Any help would be much appreciated. Here's the code.

pawn Код:
new firegate;
And under ongamemodeinit

pawn Код:
firegate = CreateDynamicObject(8948, 662.48, 1719.57, 7.95,   0.00, 0.00, 310.79);
pawn Код:
YCMD:fd1o(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 20.0, 652.4600, 1710.8800, 7.9500))
    {
        MoveObject(firegate, 652.4600, 1710.8800, 4.1918, 3.0);
        SendClientMessage(playerid, COLOR_PINK, "You have opened Fire Department Bay 1.");
    }
    return 1;
}



Re: Moving gates help. - JhnzRep - 07.06.2012

Try using MoveDynamicObject()


Re: Moving gates help. - MP2 - 07.06.2012

If you create a dynamic object, you need to move a DYNAMIC object. Use MoveDynamicObject.


Re: Moving gates help. - tiernantheman - 07.06.2012

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
Try using MoveDynamicObject()
Nope that didn't really change anything but thanks for trying anyways.

EDIT:Nevermind got them working forgot to restart the server lol Thanks guys +REP For both of ya.