15.02.2018, 19:25
Hi all i tried to merge these moveobject codes into one command but i got a lot of errors so i would like to ask for assistance with it...
that is both commands but i would like one command to operate both but not together as they are in separate areas
Код:
CMD:fd(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!IsAFBI(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an FBI Agent."); if(IsPlayerInRangeOfPoint(playerid, 3, 1558.970703125, -1677.9114990234, 1722.1081542969)) { if(!FBILobbyStatus) // SAPD LOBBY { MoveObject(fbidoor1,1558.1387939453, -1677.8883056641, 1722.1081542969,1.50); MoveObject(fbidoor2,1562.7950439453, -1677.8798828125, 1722.1081542969,1.50); format(string, sizeof(string), "* %s puts their finger on the scanner and opens the lobby door.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); FBILobbyStatus = 1; } else if(FBILobbyStatus) { MoveObject(fbidoor1,1558.970703125, -1677.9114990234, 1722.1081542969,1.50); MoveObject(fbidoor2,1561.9755859375, -1677.8798828125, 1722.1081542969,1.50); format(string, sizeof(string), "* %s %s puts their finger on the scanner and closes the lobby doors.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); FBILobbyStatus = 0; } } return 1; } CMD:fd1(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!IsAFBI(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an FBI Agent."); if(IsPlayerInRangeOfPoint(playerid, 3, 1552.7789306641, -1691.4653320313, 1722.1081542969)) { if(!FBILobbyStatus) // SAPD LOBBY { MoveObject(fbidoor3,1549.6147460938, -1691.4772949219, 1722.1081542969,1.50); MoveObject(fbidoor4,1554.2923583984, -1691.4328613281, 1722.1081542969,1.50); format(string, sizeof(string), "* %s puts their finger on the scanner and opens the lobby door.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); FBILobbyStatus = 1; } else if(FBILobbyStatus) { MoveObject(fbidoor3,1550.4266357422, -1691.5009765625, 1722.1081542969,1.50); MoveObject(fbidoor4,1553.4294433594, -1691.4515380859, 1722.1081542969,1.50); format(string, sizeof(string), "* %s %s puts their finger on the scanner and closes the lobby doors.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); FBILobbyStatus = 0; } } return 1; }