Hey,I Writed A Paytoll System And Its Dont Work In Some Cases.
Код:
new Float:ANG = 0.0;
GetPlayerFacingAngle(playerid,ANG);
if (IsPlayerInRangeOfPoint(playerid ,15.0, 57.62556, -1536.51123, 4.8) && (303 > ANG > 225)) {
SendClientMessage(playerid,COLOR_PINK,"Welcome To Tehran,Capital City Of The Grand Iran!");
RotateObject(TN_KJ_Gate_Backward , 0 , 0, -96.54, 2.0);
SetTimerEx("CloseGate",5000,false,"d",TN_KJ_Gate_Backward);
}
if (IsPlayerInRangeOfPoint(playerid ,15.0, 59.81, -1522.54565, 4.8) && (128 > ANG > 55)) {
SendClientMessage(playerid,COLOR_PINK,"You Pay 5$ At The Tehran->Mazandaran Way.");
GivePlayerMoney(playerid,-5);
RotateObject(TN_KJ_Gate_Forward , 0 , 0, -96.54, 2.0);
SetTimerEx("CloseGate",5000,false,"d",TN_KJ_Gate_Forward);
}
Its Dont Work until i remove the '&& (303 > ANG > 225)' and '&& (128 > ANG > 55)'.I Put This Angle Limit For Prevent Players To Go From Left Way,and dont pay any money!