05.05.2010, 10:06
So, i have 2 gates for my Clan base in my server but they only work for 1 player (the last TT member or the first that joins the server)
Can anyone please help me? i want them to open for ALL TT members if they are in a range of 10 [meters] and i have no idea how to fix it...
if you need more info, just say
Ofcourse i defined everything as it shud be, i have no warnings/errors in my filterscript [yes its a filterscript]
Код:
public gatefront() { for(new i=0;i<MAX_PLAYERS; i++) { new PlayerName[24]; GetPlayerName(i, PlayerName, sizeof(PlayerName)); if(strfind(PlayerName[i], "[TT]", false) != -1) { if (PlayerToPoint(10.0, i,1970.0643,1764.3062,12.7157 ) && FrontGate_status == 0) { MoveObject(gatefront1, 1969.4080810547, 1761.0424804688, 17.521432876587,3); MoveObject(gatefront2, 1969.4031982422, 1767.6744384766, 17.521432876587,3); FrontGate_status = 1; } else if (!PlayerToPoint(10.0, i,1970.0643,1764.3062,12.7157 ) && FrontGate_status == 1) { MoveObject(gatefront1, 1969.4080810547, 1761.0424804688, 14.521432876587,3); MoveObject(gatefront2, 1969.4031982422, 1767.6744384766, 14.521432876587,3); FrontGate_status = 0; } } } } public gateback() { for(new i=0;i<MAX_PLAYERS; i++) { new PlayerName[24]; GetPlayerName(i, PlayerName, sizeof(PlayerName)); if(strfind(PlayerName[i], "[TT]", false) != -1) { if (PlayerToPoint(10.0, i,1918.0104,1969.7140,7.5938) && BackGate_status == 0) { MoveObject(gateback1,1917.3553466797, 1973.0606689453, 12.3714904785156,3); MoveObject(gateback2,1917.3598632813, 1966.2652587891, 12.3723287582397,3); BackGate_status = 1; } else if (!PlayerToPoint(10.0, i,1918.0104,1969.7140,7.5938) && BackGate_status == 1) { MoveObject(gateback1,1917.3553466797, 1973.0606689453, 9.3714904785156,3); MoveObject(gateback2,1917.3598632813, 1966.2652587891, 9.3723287582397,3); BackGate_status = 0; } } } }
if you need more info, just say
Ofcourse i defined everything as it shud be, i have no warnings/errors in my filterscript [yes its a filterscript]