help gate
#1

Help this, when i do /gate its only open one gate not others! help~!!

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 50.0, 1770.2248500, -1795.9039300, 14.2671600)) { // 9.5364
            if(FDGateStatus == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate1,1770.2248500,-1795.9039300,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate1,1770.2248500,-1795.9039300,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1763.8441200, -1795.9108900, 14.2671600)) { // 9.5364
            if(FDGate2Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate2,1763.8441200,-1795.9108900,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate2,1763.8441200,-1795.9108900,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1757.7834500, -1795.8933100, 14.2671600)) { // 9.5364
            if(FDGate3Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate3,1757.7834500,-1795.8933100,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate3,1757.7834500,-1795.8933100,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
       else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1751.8231200, -1795.9129600, 14.2671600)) { // 9.5364
            if(FDGate4Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate4,1751.8231200,-1795.9129600,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate4,1751.8231200,-1795.9129600,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1752.0776400, -1767.1643100, 14.2671600)) { // 9.5364
            if(FDGate5Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate5,1752.0776400,-1767.1643100,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate5,1752.0776400,-1767.1643100,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1757.7487800, -1767.1731000, 14.2671600)) { // 9.5364
            if(FDGate6Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate6,1757.7487800,-1767.1731000,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate6,1757.7487800,-1767.1731000,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1763.9544700, -1767.2036100, 14.2671600)) { // 9.5364
            if(FDGate7Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate7,1763.9544700,-1767.2036100,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate7,1763.9544700,-1767.2036100,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1769.9494600, -1767.1871300, 14.2671600)) { // 9.5364
            if(FDGate8Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate8,1769.9494600,-1767.1871300,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate8,1769.9494600,-1767.1871300,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
Reply
#2

bump
Reply
#3

do u want all gates to be opened at once even if the player is not in range of its point?
Reply
#4

Bump
Reply
#5

I want it 1 gate 1 open if you know what i mean like

/gate (gate one open)
/gate (gate two open)

with different pos.

but that above i make, its not work properly
Reply
#6

bump topic.
Reply
#7

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 50.0, 1770.2248500, -1795.9039300, 14.2671600)) { // 9.5364
            if(FDGateStatus == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate1,1770.2248500,-1795.9039300,9.5364, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate1,1770.2248500,-1795.9039300,14.2671600, 3);
                FDGateStatus = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1763.8441200, -1795.9108900, 14.2671600)) { // 9.5364
            if(FDGate2Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate2,1763.8441200,-1795.9108900,9.5364, 3);
                FDGate2Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate2,1763.8441200,-1795.9108900,14.2671600, 3);
                FDGate2Status = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1757.7834500, -1795.8933100, 14.2671600)) { // 9.5364
            if(FDGate3Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate3,1757.7834500,-1795.8933100,9.5364, 3);
                FDGate3Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate3,1757.7834500,-1795.8933100,14.2671600, 3);
                FDGate3Status = 0;
            }
        }
       else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1751.8231200, -1795.9129600, 14.2671600)) { // 9.5364
            if(FDGate4Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate4,1751.8231200,-1795.9129600,9.5364, 3);
                FDGate4Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate4,1751.8231200,-1795.9129600,14.2671600, 3);
                FDGate4Status = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1752.0776400, -1767.1643100, 14.2671600)) { // 9.5364
            if(FDGate5Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate5,1752.0776400,-1767.1643100,9.5364, 3);
                FDGate5Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate5,1752.0776400,-1767.1643100,14.2671600, 3);
                FDGate5Status = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1757.7487800, -1767.1731000, 14.2671600)) { // 9.5364
            if(FDGate6Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate6,1757.7487800,-1767.1731000,9.5364, 3);
                FDGate6Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate6,1757.7487800,-1767.1731000,14.2671600, 3);
                FDGate6Status = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1763.9544700, -1767.2036100, 14.2671600)) { // 9.5364
            if(FDGate7Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate7,1763.9544700,-1767.2036100,9.5364, 3);
                FDGate7Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate7,1763.9544700,-1767.2036100,14.2671600, 3);
                FDGate7Status = 0;
            }
        }
        else if(IsPlayerInRangeOfPoint(playerid, 50.0, 1769.9494600, -1767.1871300, 14.2671600)) { // 9.5364
            if(FDGate8Status == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate8,1769.9494600,-1767.1871300,9.5364, 3);
                FDGate8Status = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate8,1769.9494600,-1767.1871300,14.2671600, 3);
                FDGate8Status = 0;
            }
        }
Also decrease those ranges, it may cause all gates to be opened/closed.
Reply
#8

not work, its only work for the gate one and 7 of 8 is not work.
Reply
#9

Quote:
Originally Posted by ajam112
Посмотреть сообщение
not work, its only work for the gate one and 7 of 8 is not work.
Well, have you tried getting the ranges smaller as I said? Like this;

pawn Код:
IsPlayerInRangeOfPoint(playerid, 50.0, 1770.2248500, -1795.9039300, 14.2671600)
to;

pawn Код:
IsPlayerInRangeOfPoint(playerid, 5.0, 1770.2248500, -1795.9039300, 14.2671600)
Apply that to all of them.
Reply
#10

same... this is the first gate before i change like above

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 50.0, 1811.00842285, -1798.89355469, 15.43789959)) {
            if(FDGateStatus == 0) {
                format( string, sizeof( string ), "* %s uses their remote to open the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                MoveDynamicObject(FDGate1,1811.00854492,-1771.53283691,15.43789959, 3);
                MoveDynamicObject(FDGate2,1811.00817871,-1771.53222656,17.54100037, 3);
                MoveDynamicObject(FDGate3,1811.00842285,-1778.89355469,15.43789959, 3);
                MoveDynamicObject(FDGate4,1811.00817871,-1778.89355469,17.54100037, 3);
                MoveDynamicObject(FDGate5,1811.00305176,-1784.99304199,15.43789959, 3);
                MoveDynamicObject(FDGate6,1811.00805664,-1784.99218750,17.54100037, 3);
                FDGateStatus = 1;
            }
            else {
                format( string, sizeof( string ), "* %s uses their remote to close the gates.", GetPlayerNameEx( playerid ) );
                ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);


                FDGateStatus = 0;
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)