Moveable gate.
#5

ok first you need to put this under your defines
pawn Код:
new gatenamehere;
then under OnGameModeInit
pawn Код:
gatenamehere = CreateObject(11102, 1208.1774902344, -1475.3129882813, 18.008708953857, 0, 0, 0);
pawn Код:
if(strcmp(cmdtext,"/opengate", true) == 0)
            {
                if(IsPlayerInRangeOfPoint(playerid, 15, 1208.1774902344, -1475.3129882813, 18.008708953857))
            {
                MoveObject(gatenamehere, 1208.1774902344, -1475.3129882813, 18.008708953857, 15);//how fast it moves is speed
                return 1;
        }
}

if(strcmp(cmdtext,"/closegate", true) == 0)
        {
            if(IsPlayerInRangeOfPoint(playerid, 15, 1208.1774902344, -1475.3129882813, 18.008708953857))
            {
                MoveObject(gatenamehere, 1208.1774902344, -1475.3129882813, 18.008708953857, 0, 0, 0, 15);
                    }
                        return 1;
                }
CreateObject(11102, 1208.1774902344, -1475.3129882813, 18.008708953857, 0, 0, 0);//opened gate
CreateObject(11102, 1208.1774902344, -1475.3129882813, 14.548282623291, 0, 0, 0);//closed gate
Reply


Messages In This Thread
Moveable gate. - by Kyle. - 06.02.2011, 11:36
Re: Moveable gate. - by Kyle. - 06.02.2011, 11:43
Re: Moveable gate. - by HyperZ - 06.02.2011, 11:50
Re: Moveable gate. - by Kyle. - 06.02.2011, 11:52
Re: Moveable gate. - by fangoth1 - 06.02.2011, 11:54
Re: Moveable gate. - by Kyle. - 06.02.2011, 12:02
Re: Moveable gate. - by fangoth1 - 06.02.2011, 12:04
Re: Moveable gate. - by Kyle. - 06.02.2011, 12:05
Re: Moveable gate. - by fangoth1 - 06.02.2011, 12:08
Re: Moveable gate. - by Kyle. - 06.02.2011, 12:20

Forum Jump:


Users browsing this thread: 2 Guest(s)