/Usegate // /usedoor
#1

Hey everyone, I'm new to PAWN really and i've just written this as a temporary solution...

pawn Код:
if (strcmp("/opendoor", cmdtext, true, 10) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,4,-2093.3371582031, -843.95068359375, -29.267526626587))
        {

            MoveObject(Gate1,-2091.6669921875, -844.0361328125, -29.267526626587, 1);
            SendClientMessage(playerid,COLOR_GREY,"ID Accepted: Door Opening");
            return 1;

        }
        if (IsPlayerInRangeOfPoint(playerid,4,-2126.1982421875, -868.763671875, -23.452175140381))
        {
            MoveObject(Gate2,-2126.1416015625, -870.2109375, -23.452175140381, 1);
            SendClientMessage(playerid,COLOR_GREY,"ID Accepted: Door Opening");
            return 1;
        }
        else
        {
            SendClientMessage(playerid,COLOR_GREY,"Error: You Are Not Near A Useable Door");
            return 1;
        }
    }
But how would i be able to change it from /opendoor /closedoor to /usedoor where the script knows if it is open or closed. I tried using variables so 1 = open 0 = closed but i had no luck.. So i would be grateful if you guys could help me.

Thanks

Gibson
Reply


Messages In This Thread
/Usegate // /usedoor - by =AV=Gibson - 05.05.2011, 10:11
Re: /Usegate // /usedoor - by [SFA]SpiRRiT - 05.05.2011, 10:18
Re: /Usegate // /usedoor - by =AV=Gibson - 05.05.2011, 10:19
Re: /Usegate // /usedoor - by [SFA]SpiRRiT - 05.05.2011, 10:24

Forum Jump:


Users browsing this thread: 4 Guest(s)