SA-MP Forums Archive
/Gate open help - 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 open help (/showthread.php?tid=309169)



/Gate open help - BleverCastard - 06.01.2012

Hello,
I Decided to map something for my server and there is a gate on land and one under the top one.
(Gate 2 is under Gate 1)

How would I make it move the object Down?
This is Gate1: (Visible)
Код:
	CreateObject(980, -411.60000610352, 1361.6999511719, 31.200000762939, 0, 0, 18);
This is Gate2Invisible)
Код:
	CreateObject(980, -411.60000610352, 1362, 14.800000190735, 0, 0, 18);
Thanks guys.


Re: /Gate open help - rinori - 06.01.2012

Get the positions of where you want the object be moved to. Then use MoveObject function.


Re: /Gate open help - BleverCastard - 06.01.2012

The positions are above, can you please show me an example or help?


Re: /Gate open help - rinori - 06.01.2012

pawn Код:
new objectname;

public OnGameModeInit();
{
     objectname = CreateObject(980, -411.60000610352, 1361.6999511719, 31.200000762939, 0, 0, 18);
}
Now use MoveObject function.
pawn Код:
MoveObject(objectname, -411.60000610352, 1362, 14.800000190735, speed); // define the speed



Re: /Gate open help - BleverCastard - 06.01.2012

I know this is wrong some how, can you fix it please:
Код:
CMD:sasgate(playerid, params[]) {
	if(playerVariables[playerid][pGroup] == 5) {
	MoveObject(objectname, -411.60000610352, 1362, 14.800000190735, 1);
	{
	else if [pGroup] >= 5) retrun SendClientMessage(playerid, COLOR_RED, "You are not apart of the S.A.S!");
	}
	return 1;
}



Re: /Gate open help - BleverCastard - 06.01.2012

Anyone?