Help with Gates
#2

Use this on top of your script
pawn Код:
#define PlayerToPoint(%1,%2,%3,%4,%5) IsPlayerInRangeOfPoint(%2,%1,%3,%4,%5)
Or replace playertopoint...
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/opengate", true) == 0)
    {
         if (gTeam[playerid] == Vip)
         {
             if(IsPlayerInRangeOfPoint(playerid, 15.0, 2501.8193359375, 2772.3293457031, 9.9023017883301))
             {
                 MoveObject(hqgate0, 289.919067, -1547.427734, 27.193420, 1.500000);
                 MoveObject(hqgate1, 289.919067, -1547.427734, 27.193420, 1.500000);
             }
        }
        return 1;
    }
    if(strcmp(cmdtext,"/closegate", true) == 0)
    {
        if (gTeam[playerid] == Vip)
        {
            if(IsPlayerInRangeOfPoint(playerid, 15.0, 2501.8193359375, 2772.3293457031, 9.9023017883301))
            {
                MoveObject(hqgate0, 2492.9870605469, 2772.6166992188, 9.9616632461548, 90);
                MoveObject(hqgate1, 2501.8193359375, 2772.3293457031, 9.9023017883301, 90);
            }
        }
        return 1;
    }
    return 0;
 }
Reply


Messages In This Thread
Help with Gates - by trapstar2020 - 12.11.2011, 02:36
Re: Help with Gates - by Pharrel - 12.11.2011, 02:42

Forum Jump:


Users browsing this thread: 1 Guest(s)