09.05.2009, 14:01
Quote:
Originally Posted by Paladin
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; 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) 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"); } } } |