moving gate
#6

Hope it will help.. i really not sure.. but try it.. if I did something wrong.. please someone fix me..

pawn Код:
new gate; // at the start of your script

/* put in public OnGameModeInit() */
gate = CreateObject(976, 821.5, 1734.4000244141, 4.1999998092651, 0, 358, 284);

/* put in public OnPlayerCommandText(playerid, cmdtext[]) */
    if(strcmp(cmd, "/opengate", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
            {
                if(IsPlayerInRangeOfPoint(i, 5.0, 821.5, 1734.4000244141, 4.1999998092651))
                {
                    MoveObject(gate, 823.29998779297, 1726.3000488281, 4.19999980926510, 3.5);
                    return 1;
                }
            }
        }
        return 1;
    }
   
    if(strcmp(cmd, "/closegate", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
            {
                if(IsPlayerInRangeOfPoint(i, 5.0, 823.29998779297, 1726.3000488281, 4.1999998092651))
                {
                    MoveObject(gate, 821.5, 1734.4000244141, 4.1999998092651, 3.5);
                    return 1;
                }
            }
        }
        return 1;
    }
Reply


Messages In This Thread
moving gate - by Jordiee - 15.11.2011, 21:38
Re: moving gate - by IceCube! - 15.11.2011, 21:50
Re: moving gate - by Jordiee - 15.11.2011, 21:52
Re: moving gate - by IceCube! - 15.11.2011, 22:32
Re: moving gate - by Jordiee - 16.11.2011, 12:48
Re: moving gate - by Qur - 16.11.2011, 13:17
Re: moving gate - by Jordiee - 16.11.2011, 14:46
Re: moving gate - by CSSI - 16.11.2011, 14:58
Re: moving gate - by Jordiee - 16.11.2011, 15:02
Re: moving gate - by Qur - 16.11.2011, 15:20

Forum Jump:


Users browsing this thread: 4 Guest(s)