04.08.2015, 16:52
Ok , i put some barriers in some places . All works , except one ... All barriers are made in the same way , but that isn't working :
There it's a little part of script , the most 'beautiful' thing it's that there are 2 barriers on 'FBI' and work just one (last of FBI barriers) , the first one don't work . The barrier still remain closed ... I don't know why because both of them are almost the same ..
P.S: The position of objects are right ..
Код HTML:
if(pInfo[playerid][pFaction] == 2) { if(IsPlayerInRangeOfPoint(playerid, 16.0, -1572.19641, 658.80511, 6.96790)) { if(GateClosed[4] == 1) { MoveObject(Gates[4], -1572.19092, 658.80518, 6.96790, 0.00000, 0.00000, 90.00000); GateClosed[4] = 0; if(gTimer[4] == 0) SetTimer("CloseBarrier4", 5000, false); gTimer[4] = 1; } else { MoveObject(Gates[4], -1572.19641, 658.80511, 6.96790, 0.00000, 91.00000, 90.00000); KillTimer(SetTimer("CloseBarrier4", 5000, false)); GateClosed[4] = 1; } } if(IsPlayerInRangeOfPoint(playerid, 16.0, -1701.44690, 687.70752, 24.77590)) { if(GateClosed[5] == 1) { MoveObject(Gates[5], -1701.41699, 687.64569, 24.76790, 1, 0.00000, 0.00000, 89.10000); GateClosed[5] = 0; if(gTimer[5] == 0) SetTimer("CloseBarrier5", 5000, false); gTimer[5] = 1; } else { MoveObject(Gates[5], -1701.44690, 687.70752, 24.77590, 1, 0.00000, 91.00000, -89.94000); KillTimer(SetTimer("CloseBarrier5", 5000, false)); GateClosed[5] = 1; } } } if(pInfo[playerid][pFaction] == 13) { if(IsPlayerInRangeOfPoint(playerid, 16.0, -2528.83203, 345.15271, 19.78130)) { if(GateClosed[6] == 1) { MoveObject(Gates[6], -2528.83203, 345.15271, 19.78130, 1, 0.00000, 0.00000, -4.20000); GateClosed[6] = 0; if(gTimer[6] == 0) SetTimer("CloseBarrier6", 5000, false); gTimer[6] = 1; } else { MoveObject(Gates[6], -2528.83203, 345.15271, 19.78130, 1, 0.00000, 91.00000, -4.20000); KillTimer(SetTimer("CloseBarrier6", 5000, false)); GateClosed[6] = 1; } } if(IsPlayerInRangeOfPoint(playerid, 16.0, -2476.41772, 385.20889, 35.00500)) { if(GateClosed[7] == 1) { MoveObject(Gates[7], -2476.41772, 385.20889, 35.00500, 1, 0.00000, 0.00000, -123.10000); GateClosed[7] = 0; SetTimer("CloseBarrier7", 5000, false); } else { MoveObject(Gates[7], -2476.41772, 385.20889, 35.00500, 1, 0.00000, 91.00000, -123.10000); KillTimer(SetTimer("CloseBarrier7", 5000, false)); GateClosed[7] = 1; } } }
P.S: The position of objects are right ..