need help
#1

have anyone a easy code for moving objects (GATES)

thx...alot....
Reply
#2

ON top of your script add on

Код:
new gate1; // name of the gate, change it to whatever you want
Under OnGameModeInit add

Код:
gate1 = CreateObject(id_of_the_gate, coords); // coords of closed gate
On Player Command Text add

Код:
	if (strcmp("/opengate1", cmdtext, true) == 0)
	{
		MoveObject(opengate1, coords_of_the_gate_when_its_opened, 5); //5 is the speed of opening and the coords when the gate is opened
		SendClientMessage(playerid, 0x00F600AA, "GATE OPENED !");
		return 1;
	}
If you're still confused, check out my LSPD & LVPD Gates, and look how it's been made, the link is in my signature
Reply
#3

Quote:
Originally Posted by Toniu_
ON top of your script add on

Код:
new gate1; // name of the gate, change it to whatever you want
Under OnGameModeInit add

Код:
gate1 = CreateObject(id_of_the_gate, coords); // coords of closed gate
On Player Command Text add

Код:
	if (strcmp("/opengate1", cmdtext, true) == 0)
	{
		MoveObject(opengate1, coords_of_the_gate_when_its_opened, 5); //5 is the speed of opening and the coords when the gate is opened
		SendClientMessage(playerid, 0x00F600AA, "GATE OPENED !");
		return 1;
	}
wat do you mean with
pawn Код:
coords_of_the_gate_when_its_opened
?
Reply
#4

Coords when the gate is opened/closed, you need them to make that code

like you have AddPlayerClass(0,[b]323.25,655.31,787.12); <- these are coords
Reply
#5

Quote:
Originally Posted by Toniu_
Coords when the gate is opened/closed, you need them to make that code
is it the same corord as opened or closed?
Reply
#6

how could it be the same ? Think a little bit.

I suggest you to use MTA Map Editor , to place your gate perfectly or In Game Object Editor.

First put it as closed, then put it as you want it to be when its opened
Reply
#7

Quote:
Originally Posted by Toniu_
how could it be the same ? Think a little bit.

I suggest you to use MTA Map Editor , to place your gate perfectly or In Game Object Editor.

First put it as closed, then put it as you want it to be when its opened
i have already coords

pawn Код:
CreateObject(980, 1385.557617, -2688.828857, 272.734619, 0.0000, 0.0000, 270.0000);
CreateObject(980, 1557.510864, -2539.105957, 15.320267, 0.0000, 0.0000, 0.0000);
Reply
#8

so what was your problem ?? LOL well done, now follow the code
Reply
#9

Quote:
Originally Posted by Toniu_
so what was your problem ?? LOL well done, now follow the code
ok i hope it works
Reply
#10

Quote:
Originally Posted by Toniu_
so what was your problem ?? LOL well done, now follow the code
and i can put it in my FS ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)