01.01.2014, 20:11
pawn Код:
CMD:chiefdoor(playerid, params[])
{
if(PlayerInfo[playerid][pFaction] == 1) || PlayerInfo[playerid][pFaction] == 10) {
if(ChiefStatus == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 222.2000000,69.1000000,1004.0000000))
{
MoveObject(ChiefOffice, 222.2000000,67.3000000,1004.0000000, 5);
SendClientMessage(playerid, 0xEF994300, "The door is opening!");
ChiefStatus = 1;
}
else
{
SendClientMessage(playerid, 0xEF994300, "You are not in range of the door / are not in the LSPD or SASD!");
}
}
else if(ChiefStatus == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 222.2000000,69.1000000,1004.0000000))
{
MoveObject(ChiefOffice, 222.2000000,69.1000000,1004.0000000, 5);
SendClientMessage(playerid, 0xEF994300, "The door is closing!");
ChiefStatus = 0;
}
else
{
SendClientMessage(playerid, 0xEF994300, "You are not in range of a door!");
}
}
return 1;
}
What's wrong with it?
