Gate help!
#1

Hi,
Can anyone make a automatic gate for me with cmd open and close ? This is the gate code

CreateObject(987, 315.5947265625, -1172.8193359375, 79.9140625, 0.000000, 0.000000, 224.30236816406); //




Regards
candyboy

Reply
#2

Hi candyboy,

It's really easy code really.

This is how I would of tried it.

Код:
//Top of script

new gate;//making the global variable for later use.

//On GameModeInit

gate = CreateObject(987, 315.5947265625, -1172.8193359375, 79.9140625, 0.000000, 0.000000, 224.30236816406); //Assigning a value to the global variable we previously made

//OnPlayerCommandText

if(strcmp(cmd,"/open",true) == 0)
{
  if(IsPlayerInRangeOfPoint(playerid,10.0,315.5947265625, -1172.8193359375, 79.9140625))
  {
    MoveObject(gate,NEWX,NEWY,NEWZ,SPEED);//We are then moving the object, now known as GATE to its new position.
  }
  return 1;
}
Pretty simple stuff. Give it a try.

Cheers,

TJ
Reply
#3

yo TTJJ,
TTJJ i need gate closing command also. Also i need for 0.2x not for 0.3a And you for doing the script for me!!!! And




Regards
candyboy
Reply
#4

Quote:
Originally Posted by candyboy
yo TTJJ,
TTJJ i need gate closing command also. Also i need for 0.2x not for 0.3a And you for doing the script for me!!!! And




Regards
candyboy
Like TTJ said its realy simple


try this

Top of script

Код:
new gate;
Under OnGameModeInit
Код:

gate = CreateObject(987, 315.5947265625, -1172.8193359375, 79.9140625, 0.000000, 0.000000, 224.30236816406); //
Код:
if (strcmp("/opengate", cmdtext, true, 10) == 0)
	{   MoveObject(playerid,987, 315.5947265625, -1172.8193359375, 79.9140625, 0.000000, 0.000000, 224.30236816406.5);
        SendClientMessage(playerid,0xFFFFF,"Gates Open");
		return 1;
	}

Код:
if (strcmp("/closegate", cmdtext, true, 10) == 0)
	{   MoveObject(playerid,COORDS OF YOUR GATE CLOSED");
        SendClientMessage(playerid,0xFFFFF,"Gates Closed");
		return 1;
	}

Simple


Jay.


2.0x Version.
Reply
#5

jay the problem is that i donno how to get closed and open coords...please tell me how to save closed and open cords in one MTA file....if i know means i have done it before iself!!!!!
Reply
#6

Make a gate in mta where you want it create it open then create it closed...
Reply
#7

jay can you make one for me?? with that same model id in my house which i show you from my server, and when i did as you said its showing two gate which i did for closed!!!!!!!!!!!!!!
Reply
#8

Off Topic: No i can't realy i don't know where you want it.
Reply
#9

Ehh candyboy? He told you all what you must know. You are probably to lazy or just donґt know how to do this.
If you donґt gonna do that on your own you donґt learn it.
And it is very easy.
So try to make that on your own. If you have some problem with that ask here. But not now. You are asking for a script.
The right place is at the SCRIPT REQUEST THREAD not here.
Reply
#10

Quote:
Originally Posted by Flashy
Ehh candyboy? He told you all what you must know. You are probably to lazy or just donґt know how to do this.
If you donґt gonna do that on your own you donґt learn it.
And it is very easy.
So try to make that on your own. If you have some problem with that ask here. But not now. You are asking for a script.
The right place is at the SCRIPT REQUEST THREAD not here.
Lol i didn't understand anything about MTA !!!!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)