25.07.2009, 21:17
i think you can't have one command for two PlayertoPoint checks. You're indentationis really bad as well.
Try This: (it's just indented, but i changed the SendClientMessasge. Whn you go to the FBI gat tell me what message you get.
Try This: (it's just indented, but i changed the SendClientMessasge. Whn you go to the FBI gat tell me what message you get.
pawn Код:
if(strcmp(cmdtext,"/gate", true) == 0)
{
if(!PlayerToPoint(15.0,playerid,1598.306885, -1637.804443, 15.260101)) return SendClientMessage(playerid,COLOR_VEH,"You're too far from the LSPD Gate");
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 0)
{
if(Moved == 0)
{
MoveObject(lspdgate, 1598.306885, -1637.804443, 15.260101, 2.0); Moved = 1;
}
else
{
MoveObject(lspdgate, 1590.306885, -1637.804443, 15.260101, 2.0); Moved = 0;
}
return 1;
}
else if(!PlayerToPoint(15.0,playerid,1545.539795, -1451.062866, 15.331202)) return SendClientMessage(playerid,COLOR_VEH,"You're too far from the FBI gate.");
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(Moved == 0)
{
MoveObject(fbigate, 1545.539795, -1451.062866, 15.331202, 2.0); Moved = 1;
}
else
{
MoveObject(fbigate, 1534.842773, -1451.141357, 15.331202, 2.0); Moved = 0;
}
return 1;
}
return 1;
}