//-------------------------------[PDGates]---------------------------------- if(strcmp(cmd, "/gate", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) if (PlayerToPoint(6, playerid,1587.9783,-1634.5509,12.9511) || PlayerToPoint(6,playerid,1589.1770,-1641.0854,12.6643) || PlayerInfo[playerid][pLocal] != 255) { if(pdstatus == 1) { MoveObject(pdgate, 1587.704346, -1638.077759, 14.935915, 1.5000); //replace the coord with the coordinates of the gates when it's open. pdstatus = 0; // 0 is open format(string, sizeof(string), "* %s Pushes the Remote Control button and opens the gate", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); SendClientMessage(playerid, COLOR_GREEN, "The LSPD gate is now OPEN"); } }else if(pdstatus == 0){ MoveObject(pdgate, 1587.704346, -1638.077759, 14.935915, 1.5000); //replace the coord with the coordinates of the gates when it's closed. pdstatus = 1; // 1 is closed format(string, sizeof(string), "* %s Pushes the Remote Control button and closes the gate", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); SendClientMessage(playerid, COLOR_RED, "The LSPD gate is now CLOSED"); } } } //---------barrier-------------------------------- else if(strcmp(cmd, "/gate", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) if (PlayerToPoint(6, playerid,1549.1652,-1627.5720,13.1025) || PlayerToPoint(6,playerid,1539.7178,-1627.7734,13.1008) || PlayerInfo[playerid][pLocal] != 255) { if(pdbstatus == 1) { SetObjectRot(pdbarrier, 0.0000, 0.0000, 91.9597); //replace the coord with the coordinates of the gates when it's open. pdbstatus = 0; // 0 is open format(string, sizeof(string), "* %s Pushes the Remote Control button and opens the barrier", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); SendClientMessage(playerid, COLOR_GREEN, "The LSPD gate is now OPEN"); } }else if(pdbstatus == 0){ SetObjectRot(pdbarrier, 0.0000, 89.3814, 90.2408); //replace the coord with the coordinates of the gates when it's closed. pdbstatus = 1; // 1 is closed format(string, sizeof(string), "* %s Pushes the Remote Control button and closes the barrier", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); SendClientMessage(playerid, COLOR_RED, "The LSPD gate is now CLOSED"); } } } //--------------------------[DMV Gate]---------------------------------------------------- else if(strcmp(cmd, "/gate", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) if (PlayerToPoint(6, playerid,1269.2865,-1839.4691,13.3861) || PlayerToPoint(6,playerid,1269.6172,-1844.7064,13.3976) || PlayerInfo[playerid][pLocal] != 255) { if(dmvbstatus == 1) { MoveObject(dmvgate, 1270.114746, -1842.072754, 9.564041, 1.0000); //replace the coord with the coordinates of the gates dmvbstatus = 0; // 0 is open format(string, sizeof(string), "* %s Raises the DMV Gate", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); SendClientMessage(playerid, COLOR_GREEN, "The DMV Parking gate is now OPEN"); } }else if(dmvbstatus == 0){ MoveObject(dmvgate, 1270.107666, -1842.100708, 11.839067, 1.0000); //replace the coord with the coordinates of the dmvbstatus = 1; // 1 is closed format(string, sizeof(string), "* %s Lowers the DMV Gate", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); SendClientMessage(playerid, COLOR_RED, "The DMV Parking gate is now CLOSED"); } } return 1; }