help me with this code
#6

Try using this but use your own variables / values
pawn Code:
if (strcmp("/gate", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 10, 1275.58, -1270.28, 14.32))
        {
            if(Open == false)
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "The gate is now opening!");
                MoveObject(gate, 1275.58, -1270.28, 4.32, 2.0);
                Open = true;
                return 1;
            }
            if(Open == true)
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "The gate is now closing!");
                MoveObject(gate, 1275.58, -1270.28, 14.32, 2.0);
                Open = false;
                return 1;
            }
            return 1;
        }
        else return SendClientMessage(playerid, COLOR_RED, "You are not near the impound lot!");
    }
you will need to create the variable Open so use this
pawn Code:
new bool:Open;
Reply


Messages In This Thread
help me with this code - by Wonderweiss - 13.10.2012, 16:58
Re: help me with this code - by Wonderweiss - 13.10.2012, 17:13
Re: help me with this code - by Ghost_Boii - 13.10.2012, 17:15
Re: help me with this code - by Wonderweiss - 13.10.2012, 17:18
Re: help me with this code - by Ghost_Boii - 13.10.2012, 17:20
Re: help me with this code - by NewerthRoleplay - 13.10.2012, 17:25
Re: help me with this code - by Ghost_Boii - 13.10.2012, 17:27
Re: help me with this code - by Wonderweiss - 13.10.2012, 17:30
Re: help me with this code - by KevinPRINCE - 13.10.2012, 17:30
Re: help me with this code - by NewerthRoleplay - 13.10.2012, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)