#1

Hey guys,me with another question...

My question this time is almost impossible for me to figure out...

How can i get co-ordinates to create fences and gates. I want to create like gates which open when i write "/open" or summin, but i cant get the co-ordinates or where to move the gates. Plz tell me how i can get the co-ordinates...

Thank u!!!!!

Here is my other part of the script but i dont know how to get the co-ordinates:
Код:
if (strcmp("/opengate", cmdtext, true, 10) == 0)
	{
	 	if(IsPlayerLAdmin(playerid))
		{
		  new pName[MAX_PLAYER_NAME];
  		new string[48];
	 		GetPlayerName(playerid, pName, sizeof(pName));
  		format(string, sizeof(string), "%s has opened the admin gate", pName);
  		print(string);
  		//-------------------------------------------------------------------------------------
			SendClientMessage(playerid, COLOR_RED,"*** Opening admin gate remember to /closegate ***");
			MoveObject(admingate, ............................................ );
		}
		else
		{
		  new pName[MAX_PLAYER_NAME];
  		new string[48];
	 		GetPlayerName(playerid, pName, sizeof(pName));
  		format(string, sizeof(string), "%s hasnt opened the admin gate", pName);
  		print(string);
			SendClientMessage(playerid, COLOR_RED,"ERROR: You cant open the admin gate Sorry");
		}
		return 1;
I hope u understand... and plz reply

Reply
#2

Download MTA Race/Map Editor and a converter

That allows you to easily make maps or place gates and get cords
Reply
#3

Quote:

Download MTA Race/Map Editor and a converter

That allows you to easily make maps or place gates and get cords
Posted on: Today at 07:46:13 am Posted by: Tigerbeast11

I did that! I used the co-ordinates, but it just didnt work nothing happened when i did /opengate
Reply
#4

Quote:
Originally Posted by Tigerbeast11
Quote:

Download MTA Race/Map Editor and a converter

That allows you to easily make maps or place gates and get cords
Posted on: Today at 07:46:13 am Posted by: Tigerbeast11

I did that! I used the co-ordinates, but it just didnt work nothing happened when i did /opengate
You posted the wrong coordinates?
Reply
#5

Do you mean,you want the new cords of the OPEND gate?so i know what.
built the whole admin city or whatever you want with gates.
than in the end,put two gates.first is the one which you using,and the second is the opend form of the gate.
then,after you converted,you know that the last two lines are for the two gates.so copy all the lines,exept the last one,which is the
opened form.so,just get the X,Y,Z cords of the last line,and paste it after the "MoveObject",but CreateObject the second gate.anyway,if you didnt got it,it should look something like this:
On the top:
pawn Код:
new YourGateName;
OnGamemodeInit:
pawn Код:
YourGateName = CreateObject(X,Y,Z,rotx,roty,rotz);//This is the closed form of the gate
CreateObject(X,Y,Z,rotX,rotY,rotZ);//this is the opened form==DELETE IT!
now onPlayerCommandText....
pawn Код:
...
..
..
..
..
..
..
MoveObject(YourGateName,X,Y,Z,speed);//the X,Y,Z are from the opend form.speed means the speed you want the gate to go to the new pos.
I hope this is what you meant,maybe there are easier ways,but this is how im doing it
Reply
#6

Heres a example of a working gate

Код:
new gate;

public OnGameModeInit()
{
	gate = CreateObject(0,0,0,0,0,0,0);
	return 1;
	}

public OnPlayerCommandText(playerid,cmdtext[])
{
	dcmd(open,4,cmdtext);
	return 0;
}
dcmd_open(playerid,params[])
{
	#pragma unused params
	MoveObject(gate,1,1,1,2);
	return 1;
}
MoveObject moves the "gate" til cord 1,1,1 with 2 in speed pretty simple
Reply
#7

Use my script, and Toad's Auto Gates INC. http://forum.sa-mp.com/index.php?topic=73014.0
My script (only maked for you):

Extract to your server's folder.
Reply
#8

Great suggestions guys! Keep 'em commin' cuz i think there must be an easier way!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)