/Usegate // /usedoor
#2

pawn Код:
new door1;
new door2;
new bool:door1opened;
new bool:door2opened;

OnGameModeInit()
{
    door = CreateObject,---,-2091.6669921875, -844.0361328125, -29.267526626587);
    return 1;
}

if (strcmp("/door1", cmdtext, true, 10) == 0)
{
    if (IsPlayerInRangeOfPoint(playerid,4,-2093.3371582031, -843.95068359375, -29.267526626587) && door1opened == false)
    {
        MoveObject(Gate1,-2091.6669921875, -844.0361328125, -29.267526626587, 1);
        SendClientMessage(playerid,COLOR_GREY,"ID Accepted: Door1 Opening");
        door1opened = true;
        return 1;
    }
    else
    {
        MoveObject(Gate1,-2093.3371582031, -843.95068359375, -29.267526626587, 1);
        SendClientMessage(playerid,COLOR_GREY,"ID Accepted: Door1 Closing");
        door1opened = false;
    }
    return 1;
}
if (strcmp("/door2", cmdtext, true, 10) == 0)
   
    else if (IsPlayerInRangeOfPoint(playerid,4,-2126.1982421875, -868.763671875, -23.452175140381) && door2opened == true)
    {
        MoveObject(Gate2,-2126.1416015625, -870.2109375, -23.452175140381, 1);
        SendClientMessage(playerid,COLOR_GREY,"ID Accepted: Door2 Opening");
        door2opened = false;
        return 1;
    }
    else
    {
        MoveObject(Gate2,-2126.1982421875, -868.763671875, -23.452175140381,1);
        SendClientMessage(playerid,COLOR_GREY,"ID Accepted: Door2 Closing");
        door2opened = false;
        return 1;
    }
    return 1;
}
This works, I've edited it!! This will work
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: 1 Guest(s)