Creating a moveable gate - 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: Creating a moveable gate (
/showthread.php?tid=423667)
Creating a moveable gate -
Hussain - 18.03.2013
Hey i need major help for an org on my server i've tried to make gates here
but i just dont get the coords
here's my code
Quote:
CMD:mf(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 10.0,2234,-2215.5,12.5)) { // WHAT DO I CHANGE MY NUMBER 2
if (PlayerOrg[playerid] == 1) {
if(GateOpen == 0) {
MoveDynamicObject(gate, 2238.9382,-2221.0515,12.5, 2); // WHAT DO I CHANGE MY NUMBER 2
MoveDynamicObject(Gate, 2228.8779,-2210.9895,12.5, 2); // WHAT DO I CHANGE NUMBER 2
GateOpen = 1;
}
else {
MoveDynamicObject(Gate, 2234,-2215.5,12.5, 2);
MoveDynamicObject(gate, 2234,-2215.5,12.5, 2); // WHAT DO I CHANGE NUMBER 2
GateOpen = 0;
}
}
else return 0;
}
else {
SendClientMessage(playerid, COLOR_WHITE, "You are not in range of the gate.");
}
return 1;
}
|
here's the picture where i want gates
i just dont get what to change the numbers to if you could replace it please help Thanks!
Re: Creating a moveable gate -
kamzaf - 18.03.2013
those numbers are the X, Y , Z coordinates of the position your in. Now while mapping you should know what positions its at. If you dont then go in game and type /save gate1
then go on to your gta folder and get those x y z coordinates and plugin what its appropriate.
Re: Creating a moveable gate -
freddy smyth - 18.03.2013
Could you put the code in tags rather than ?
Re: Creating a moveable gate -
Hussain - 18.03.2013
Quote:
Originally Posted by kamzaf
those numbers are the X, Y , Z coordinates of the position your in. Now while mapping you should know what positions its at. If you dont then go in game and type /save gate1
then go on to your gta folder and get those x y z coordinates and plugin what its appropriate.
|
Okay yes but the co-ords what parts do i save the coords?
the two ends?
and why are there like 4 of them do i put same coords
Re: Creating a moveable gate -
Hussain - 18.03.2013
Could you get the coords for me
Re: Creating a moveable gate -
kamzaf - 18.03.2013
I would but I dont know where that location is, you have to get it yourself.
Re: Creating a moveable gate -
freddy smyth - 18.03.2013
Here:
https://sampwiki.blast.hk/wiki/YSI:Using_Objects
Take a look at the formats.
Re: Creating a moveable gate -
Hussain - 18.03.2013
Quote:
Originally Posted by kamzaf
I would but I dont know where that location is, you have to get it yourself.
|
In richman, can i do this on MTA get the coords
Re: Creating a moveable gate -
freddy smyth - 18.03.2013
Yeah, but don't use MTA. Get the SAMP map editor.