06.04.2009, 15:41
Код:
new HQGateOpen;
pawn Код:
if(strcmp(cmdtext,"/hqo", true) == 0)//Open
{
if(AdminLevel[playerid] >= 5)
{
MoveObject(HQgate, -505.77,2588.21,52.60,1.5000);
format(gatestr, sizeof(gatestr), "%s Has Opened The Headquarter Gate", PlayerName);
SendClientMessageToAll(COLOUR_GREY,gatestr);
HQGateOpen = 1;
return 1;
}else{
SendClientMessage(playerid,COLOUR_RED,"Only Andmins Can Open The Headquarter Gate!");
}
}
if(strcmp(cmdtext,"/hqc", true) == 0)//Close
{
if(AdminLevel[playerid] >= 5)
{
MoveObject(HQgate, -505.91, 2597.04, 52.60, 1.5000);
format(gatestr, sizeof(gatestr), "%s Has Closed The Headquarter Gate", PlayerName);
SendClientMessageToAll(COLOUR_GREY,gatestr);
HQGateOpen = 0;
return 1;
}else{
SendClientMessage(playerid,COLOUR_RED,"Only Andmins Can Close The Headquarter Gate!");
}
}
//------------------------------------------------------------------------------
if(strcmp(cmdtext,"/gates", true) == 0)//Is it open or closed
{
if (HQGateOpen == 0)
{
SendClientMessage(playerid, COLOUR_GREY,"The Headquarter Gate Is CLOSED");
}else{
SendClientMessage(playerid, COLOUR_GREY,"The Headquarter Gate Is OPEN");
//--------------------------------------
if (MainGateOpen == 0)
{
SendClientMessage(playerid, COLOUR_GREY,"The Main Gatea Are CLOSED");
}else{
SendClientMessage(playerid, COLOUR_GREY,"The Main Gates Are OPEN");
return 1;
}
}
}