Adding Moveable gates - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Adding Moveable gates (
/showthread.php?tid=423849)
Adding Moveable gates -
Hussain - 19.03.2013
Okay so i'm trying to make Moveable gates i wen't on MTA and put the gate down in open and closed postion then i went to here:
http://gtamap.delux-host.com/converter/
and got the closed and open position :
969, delux, 0, 324.89999, -1185.59998, 75.4, 0, 0, 0, 1, -1 CLOSED
969, delux, 0, 318.5, -1190.5, 75.3, 0, 0, 0, 1, -1 OPEN
I then changed my code to :
Код:
CMD:mf(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 10.0,2234,-2215.5,12.5)) {
if (PlayerOrg[playerid] == 1) {
if(GateOpen == 0) {
MoveDynamicObject(gate, 318.5, -1190.5, 75.3, 1, -1);
GateOpen = 1;
}
else {
MoveDynamicObject(Gate, 324.89999, -1185.59998, 75.4, 1, -1);
GateOpen = 0;
}
}
else return 0;
}
else {
SendClientMessage(playerid, COLOR_WHITE, "You are not in range of the gate.");
}
return 1;
}
Then i changed
Код:
Gate = CreateDynamicObject(969, 0, 324.89999, -1185.59998, 75.4, 0, 0, 0, 1, -1); //GATE CLOSED POSITION
But when i go ingame it isn't there?
Second thing is
Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0,2234,-2215.5,12.5)) {
I'm not sure what to change the coords of that to will i go ingame find the position where i want them to be within and /save then i put those coords in?