SA-MP Forums Archive
Gate messed up after coordinates change - 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: Gate messed up after coordinates change (/showthread.php?tid=380367)



Gate messed up after coordinates change - MrSnapp - 25.09.2012

Here is a pic:




and here are the codes:
pawn Код:
else if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7, 1263.7299,-1601.2197,8.4360)) // SAPD Gate
    {
        if(!SAPDGateStatus)
        {
            SAPDGateStatus = 1;
            MoveDynamicObject(SAPDGate, 1588.6501464844, -1638.0750732422, 6.2343215942383, 3);
        }
        else
        {
            SAPDGateStatus = 0;
            MoveDynamicObject(SAPDGate, 1588.6428222656, -1638.02734375, 15.240161895752, 3);
        }
        return 1;
    }
Could anyone please help?


Re: Gate messed up after coordinates change - Niko_boy - 25.09.2012

it is obvious to mess up as rotation x y z and angles might be wrong
so you need to retake coordinates with perfect coordinates


Re: Gate messed up after coordinates change - MrSnapp - 25.09.2012

Is there any easier or better way then typing /save?


Re: Gate messed up after coordinates change - Marricio - 25.09.2012

Map the gate again, the Z rotation coordenate is not right.


Re: Gate messed up after coordinates change - razor steven - 25.09.2012

I think you should startover, with correct coordinates.


Re: Gate messed up after coordinates change - MrSnapp - 26.09.2012

But if this area is custom and I map the gate again in MTA the building will not be there...


Re: Gate messed up after coordinates change - MrSnapp - 26.09.2012

I got the perfect coordinates from an in game gate editor except I want the gate to be faction restricted. here are the coords:

pawn Код:
971|1273.845703|-1606.285278|10.986078|0.900001|0.700001|-29.700014|1267.072021|-1602.421264|11.081331|0.900001|0.700001|150.899963||2.000000
Where should I put these in the code I listed?


Re: Gate messed up after coordinates change - ikbenremco - 26.09.2012

pawn Код:
else if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7, 1273.845703,-1606.285278,10.986078)) // SAPD Gate
    {
        if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
        if(!SAPDGateStatus)
        {
            SAPDGateStatus = 1;
            MoveDynamicObject(SAPDGate, 1273.845703,-1606.285278,-5.986078, 3);
        }
        else
        {
            SAPDGateStatus = 0;
            MoveDynamicObject(SAPDGate, 1273.845703,-1606.285278,10.986078, 3);
        }
        return 1;
    }



Re: Gate messed up after coordinates change - BlackBank - 26.09.2012

I don't know exactly where you want the gate pos, but you can just change the Z position.
So that means that the Z(you can also call it height) is the same position when you close and open the door.