Creating a moveable gate
#1

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!
Reply
#2

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.
Reply
#3

Could you put the code in tags rather than ?
Reply
#4

Quote:
Originally Posted by kamzaf
View Post
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
Reply
#5

Could you get the coords for me
Reply
#6

I would but I dont know where that location is, you have to get it yourself.
Reply
#7

Here:

https://sampwiki.blast.hk/wiki/YSI:Using_Objects

Take a look at the formats.
Reply
#8

Quote:
Originally Posted by kamzaf
View Post
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
Reply
#9

Yeah, but don't use MTA. Get the SAMP map editor.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)