coordinates admin gate
#2

It is on the Wiki but I cannot find it so I'll explain anyway since I have time.

I will start with a basic /usegate command on you're gate.

Step 1:
At the top of your script under you're color(colour) definitions, forwards and anything else you have, but above all the publics please place:
Код:
new admingate;
Step 2:
Go to the place that you added in all you're objects etc.. make sure you're gate open and closed objects are not there. then type the following:
Код:
admingate = CreateObject(-1643.084106, 681.946533, 8.960892, 2.00)
Step 3:
Now goto your "OnPlayerCommandText" and insert the following:
Код:
	if(strcmp(cmdtext,"/usegate", true) == 0)
{
	if([THIS IS WHERE YOU INSERT YOUR VARIABLE TO CHECK FOR AN ADMIN])
	{
	new gateuse;
	if(gateuse == 0)
	  {
      MoveObject(admingate, -1620.044106, 681.946533, 0.960892, 2.00);
 	  gateuse = 1;
    return 1;
    }
	else if(gateuse == 1)
    {
 	  MoveObject(whgate, -1643.084106, 681.946533, 8.960892, 2.00);
 	  gateuse = 0;
 	  }
	else
		{
		SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot open this gate");
		}
	}
}
and that should be set up... I haven't tested it, but if it doesn't work just tell me. or if you are stuck somewhere just tell me.
Reply


Messages In This Thread
coordinates admin gate - by killer94nl - 09.05.2009, 11:45
Re: coordinates admin gate - by Paladin - 09.05.2009, 12:17
Re: coordinates admin gate - by HB - 09.05.2009, 14:01

Forum Jump:


Users browsing this thread: 1 Guest(s)