16.03.2014, 07:45
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;
}
}