Gates.
#1

Could someone help me? I've tried and can't create a command so when you type /gate1open it opens, and /gate1close it closes.

Here's the gate I'm trying to make do the command if anyone can help.

Код:
CreateObject(971,631.5333,-595.8685,16.3359,0.000000,0.000000,269.105682); //SD3
Reply
#2

do something like this:


// at the top:
new gate1;
// gamemodeinit:
gate1 = CreateObject(971,631.5333,-595.8685,16.3359,0.000000,0.000000,269.105682); //SD3

// command:


if (strcmp( cmdtext, "/gate1open", true) == 0)
{
SendClientMessage(playerid, your color, "Gate 1 Opening!");
MoveObject(gate1, newx, newy, newz, speed);
return 1;
}


-Ethan
Reply
#3

What would be the cords if I wanted it to go into the ground?. Then for /gate1close?.
Reply
#4

Well the closing corrdinates would be the same as where the object is place.

Код:
631.5333,-595.8685,16.3359
Thats the closing one.

The open one you have to do yourself, as it has to open where YOU want it to.
Reply
#5

if you want it to under the ground, change the Z negatively. and for /gateoneclose just do the opposite of /gateoneopen

all samp functions are formatted this way:
Код:
X, Y, Z
so just do -10 on the z to make it go down.
Reply
#6

Thanks, they work now.
Reply
#7

no problem
Reply
#8

Quote:
Originally Posted by <__Ǝthan__>
do something like this:


// at the top:
new gate1;
// gamemodeinit:
gate1 = CreateObject(971,631.5333,-595.8685,16.3359,0.000000,0.000000,269.105682); //SD3

// command:


if (strcmp( cmdtext, "/gate1open", true) == 0)
{
SendClientMessage(playerid, your color, "Gate 1 Opening!");
MoveObject(gate1, newx, newy, newz, speed);
return 1;
}


-Ethan
Hi there,

Lol you lost some time there, don't you think? :P

Have fun scripting.

Kind regards,

Francis Morissette
SA-MP Scripter
http://sa-mp.com
Reply
#9

How would I make the open and close command only work for members of faction 2?.
Reply
#10

Quote:
Originally Posted by -eXo
How would I make the open and close command only work for members of faction 2?.
if gf, it

Quote:
Код:
PlayerInfo[playerid][pMember]
Quote:
Код:
if(PlayerInfo[playerid][pMember] == NUMBER_FACTION)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)