SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 08/12/2013, 10:05 PM   #1
teomakedonija
Banned
 
Join Date: Nov 2011
Posts: 404
Reputation: -46
Default ALT [REP ++]

Hi Scripterz...I need your help.I need anyone to make me that command /otvori and /zatvori that is /open and /close command for gates and barriers and i want now anyone to make that command in KEY_WALK when i press ALT to Open and when i press ALT again to close(if it opened)...REPP !!!!

Otvori (Open)
pawn Code:
//---------------------------------------------------------------------------------//
    if (strcmp("/otvori", cmdtext, true, 10) == 0)
    {
        if(PlayerToPoint(5, playerid,1590.30004883,-1638.00000000,9.50000000))
        {
            if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1)
            {
                MoveObject(pdkapija, 1590.30004883,-1638.00000000,9.50000000, 2.0);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara bazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,1534.90002441,-1451.50000000,14.8000001))
        {
            if(PlayerInfo[playerid][pMember] == 6 ||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(yakuzaskladpd, 1534.90002441,-1451.50000000,9.8000001, 2.0);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte Vratata Na Skladot .");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja Otvara Vratata Na Skladot.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,773.58953857422, -1330.4765625, 12.549243927002))
        {
            if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
            {
                MoveObject(novinarikapija, 765.2412109375, -1330.5197753906, 12.790742874146, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,664.90002441,-1310.90002441,15.19999981))
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(ykapija2, 664.90002441,-1310.90002441,9.60000038, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2720.19995117,-2405.60009766,16.00000000))
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(ykapija3, 787.00000000,-1152.40002441,19.79999924, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2013.09997559,-1272.40002441,19.50000000))
        {
            if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
            {
                MoveObject(lsgkapija, 2013.09997559,-1272.40002441,13.50000000, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2774.45555,-2417.8,14.80000019))
        {
            if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                MoveObject(armgaraza1, 2774.15555,-2417.55050,7.80000019, 2);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara garazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2774.39990234,-2455.911,14.80000019))
        {
            if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                MoveObject(armgaraza2, 2774.39990234,-2456.00000000,7.80000019, 2);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara garazata .", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2774.30004883,-2493.99999,14.89999962))
        {
            if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                MoveObject(armgaraza3, 2774.30004883,-2493.80004883,7.89999962, 2);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara garazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2423.50000000,-1676.30004883,14.39999962))
        {
            if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
            {
                MoveObject(gsfsklad, 2423.50000000,-1676.30004883,10.80000019, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte Vratata Na Skladot.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvori vratata na skladot.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,658.90002441,-1226.80004883,17.39999962))
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(ykapija1, 658.90002441,-1226.80004883,12.30000019, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,1280.0999800,-2056.1001000,60.6000000))
        {
            if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
            {
                MoveObject(lcnkapija, 1280.0999800,-2056.1001000,50.6000000, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvora kapijata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2814.60009766,-1578.80004883,7.09999990))
        {
            if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                MoveObject(mbikapija, 2814.60009766,-1578.80004883,7.09999990, 2.0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara bazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2500.89990234,-1780.80004883,12.00000000))
        {
            if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                MoveObject(GsfSklad3, 2500.89990234,-1780.80004883,6.00000000, 2.0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara bazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2720.19995117,-2405.60009766,5.00000000))
        {
            if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                MoveObject(armkapija, 2720.19995117,-2405.60009766,5.00000000, 2.0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja otvara bazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,1141.90002441,-1295.19995117,13.39999962))
        {
            if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
            {
                MoveObject(bolnicarampa,1141.90002441,-1295.19995117,13.39999962,0.5,0.00000000,359.00000000,0.00000000);
                SetTimer("BolnicaRampa", 5000, 0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja diga rampa.");
                format(string, sizeof(string), "* %s ja diga rampa.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,1544.69995117,-1630.80004883,13.10000038))
        {
            if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
            {
                MoveObject(pdrampa,1544.69995117,-1630.80004883,13.10000038,0.5,0.00000000,357.74978638,270.25003052);
                SetTimer("PDRampa", 5000, 0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja diga rampa.");
                format(string, sizeof(string), "* %s ja diga rampa.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,1404.00000000,-1652.00000000,13.30000019))
        {
            if (PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
            {
                MoveObject(sudnicarampa,1404.00000000,-1652.00000000,13.30000019,0.5,0.00000000,356.99996948,269.99450684);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja diga rampa.");
                format(string, sizeof(string), "* %s ja diga rampa.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        return 1;
    }
Zatvori(Close)
pawn Code:
//------------------------------------------------------------------------------
    if (strcmp("/zatvori", cmdtext, true, 10) == 0)
    {
        if(PlayerToPoint(5, playerid,1590.30004883,-1638.00000000,15.00000000))
        {
            if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1)
            {
                MoveObject(pdkapija, 1590.30004883,-1638.00000000,15.00000000, 2.0);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,1534.90002441,-1451.50000000,14.8000001))
        {
            if(PlayerInfo[playerid][pMember] == 6 ||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(yakuzaskladpd, 1534.90002441,-1451.50000000,14.8000001, 2.0);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja Zatvorivte Vratata Na Skladot .");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s Ja Zatvara Vratata Na Skladot.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2423.50000000,-1676.30004883,14.39999962))
        {
            if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
            {
                MoveObject(gsfsklad, 2423.50000000,-1676.30004883,14.39999962, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte Vratata na Skladot.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori vratata na skladot.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2013.09997559,-1272.40002441,19.50000000))
        {
            if(PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12)
            {
                MoveObject(lsgkapija, 2013.09997559,-1272.40002441,19.50000000, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,773.58953857422, -1330.4765625, 12.549243927002))
        {
            if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
            {
                MoveObject(novinarikapija, 773.58953857422, -1330.4765625, 12.549243927002, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2774.45555,-2417.8,14.80000019))
        {
            if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                MoveObject(armgaraza1,2774.45555,-2417.8,14.80000019, 2);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara garazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,664.90002441,-1310.90002441,15.19999981))
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(ykapija2, 664.90002441,-1310.90002441,15.19999981, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2720.19995117,-2405.60009766,16.00000000))
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(ykapija3, 787.00000000,-1152.40002441,25.39999962, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid, 1280.0999800,-2056.1001000,60.6000000))
        {
            if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
            {
                MoveObject(lcnkapija, 1280.0999800,-2056.1001000,60.6000000, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori kapijata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,658.90002441,-1226.80004883,17.39999962))
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
            {
                MoveObject(ykapija1, 658.90002441,-1226.80004883,17.39999962, 2);
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvori vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
        }
        if(PlayerToPoint(5, playerid,2774.39990234,-2455.911,14.80000019))
        {
            if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                MoveObject(armgaraza2, 2774.39990234,-2455.911,14.80000019, 2);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara garazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2774.30004883,-2493.99999,14.89999962))
        {
            if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                MoveObject(armgaraza3,  2774.30004883,-2493.99999,14.89999962, 2);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara garazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2814.60009766,-1578.80004883,12.60000038))
        {
            if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                MoveObject(mbikapija, 2814.60009766,-1578.80004883,12.60000038, 2.0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara bazata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2500.89990234,-1780.80004883,12.00000000))
        {
            if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                MoveObject(GsfSklad3, 2500.89990234,-1780.80004883,12.00000000, 2.0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,2720.19995117,-2405.60009766,16.00000000))
        {
            if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                MoveObject(armkapija, 2720.19995117,-2405.60009766,16.00000000, 2.0);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s ja zatvara vratata.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        if(PlayerToPoint(5, playerid,1404.00000000,-1652.00000000,13.30000019))
        {
            if (PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
            {
                MoveObject(sudnicarampa,1404.00000000,-1652.00000000,13.30000019,0.5,0.00000000,268.99984741,269.99450684);
                GetPlayerName(playerid, sendername, sizeof(sendername));
                SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja spustivte rampata.");
                format(string, sizeof(string), "* %s ja spusta rampa.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                return 1;
            }
        }
        return 1;
    }
teomakedonija is offline   Reply With Quote
Old 08/12/2013, 10:30 PM   #2
erminpr0
Huge Clucker
 
erminpr0's Avatar
 
Join Date: Jan 2013
Posts: 222
Reputation: 22
Default Re: ALT [REP ++]

((Evo ti primer za 1 rampu, ti ostale sebi postavljaj, i ovo sto sam ti stavio

podignutaRampa[0], za prvu rampu mora da bude 0, za drugu 1, za trecu 2 i tako, jesi skonto hehe ))


Here is ex. for one gate, other do using this form,

podignutaRampa[0], for first ramp it has to be 0, for second use 1, for third 2 etc.. hope you understood

pawn Code:
new bool:podignutaRampa[19] = true;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if(newkeys & KEY_WALK)
   {
      if(PlayerToPoint(5, playerid,1590.30004883,-1638.00000000,9.50000000))
      {
          if(PlayerInfo[playerid][pMember] == 1 ||PlayerInfo[playerid][pLeader] == 1)
          {
              if(!podignutaRampa[0])
              {
                  MoveObject(pdkapija, 1590.30004883,-1638.00000000,9.50000000, 2.0);
                  SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja otvorivte kapijata.");
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), "* %s ja otvara bazata.", sendername);
                  ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  podignutaRampa[0] = true;
                  return 1;
              }
              else if(podignutaRampa[0])
              {
                  MoveObject(pdkapija, 1590.30004883,-1638.00000000,15.50000000, 2.0);
                  SendClientMessage(playerid, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ja zatvorivte kapijata.");
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  format(string, sizeof(string), "* %s ja zatvara vratata.", sendername);
                  ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  podignutaRampa[0] = false;
                  return 1;
              }
          }
      }
   }
   return 1;
}
erminpr0 is offline   Reply With Quote
Old 09/12/2013, 09:38 AM   #3
teomakedonija
Banned
 
Join Date: Nov 2011
Posts: 404
Reputation: -46
Default Re: ALT [REP ++]

Not working helpp please give me all code
teomakedonija is offline   Reply With Quote
Old 09/12/2013, 11:20 AM   #4
teomakedonija
Banned
 
Join Date: Nov 2011
Posts: 404
Reputation: -46
Default Re: ALT [REP ++]

Fixed

EDIT: Erminpr0 thanks REPPED
teomakedonija is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 07:47 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.