11.06.2014, 06:49
This is the Code i used to make the Payntoll Service!
All things workfine except the Payntoll Gate Dosent Open or Rotate after i have paid!
Please Help me really need help!
All things workfine except the Payntoll Gate Dosent Open or Rotate after i have paid!
Please Help me really need help!
Код:
CMD:payntoll(playerid, params[]) { if(tollstatus==0) { SendClientMessage(playerid,COLOR_GRAD1,"Usage of Toll's has been DEAUTHORIZED by the LSPD"); return 1; } if(GetPlayerMoney(playerid) < 45) { SendClientMessage(playerid,COLOR_GRAD1," You don't have enough cash to pay for the Toll Fee"); return 1; } if(IsPlayerInRangeOfPoint(playerid, 12.0, 37.74, -1520.81, 5.22)) // Santa Maria Beach 2 { if(tollopen==0) { SetObjectRot(tollgate1, 359.99560547,89.49993896-90,88.00000000); // Gate 1 GivePlayerMoney(playerid, -100); SetTimerEx("santamariabeachtoll", 7000, false, "i", playerid); SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying 100$, drive safe!"); SendClientMessage(playerid,COLOR_GRAD1," (( The toll gate will close in 8 seconds, don't get trapped down! ))"); tollopen = 1; } else { SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: A Toll is currently open, please wait"); } } else if(IsPlayerInRangeOfPoint(playerid, 12.0, 65.34, -1541.46, 5.05)) // Santa Maria Beach 1 { if(tollopen==0) { SetObjectRot(tollgate2, 0.00000000,270.25024414+90,85.99548340); // Gate 2 GivePlayerMoney(playerid, -100); SetTimerEx("santamariabeachtoll", 7000, false, "i", playerid); SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying 100$, drive safe!"); SendClientMessage(playerid,COLOR_GRAD1," (( The toll gate will close in 8 seconds, don't get trapped down! ))"); tollopen = 1; } else { SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: A Toll is currently open, please wait"); } } else if(IsPlayerInRangeOfPoint(playerid, 15.0, -194.01, 253.57, 12.08)) // Left Bridge { if(tollopen==0) { SetObjectRot(tollgate3, 0.06979370,88.00122070-90,343.75128174); GivePlayerMoney(playerid, -100); SetTimerEx("bridge1toll", 7000, false, "i", playerid); SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying 100$, drive safe!"); SendClientMessage(playerid,COLOR_GRAD1," (( The toll gate will close in 8 seconds, don't get trapped down! ))"); tollopen = 1; } else { SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: A Toll is currently open, please wait"); } } else if(IsPlayerInRangeOfPoint(playerid, 15.0, 610.81, 349.13, 18.93)) // Middle Bridge { if(tollopen==0) { SetObjectRot(tollgate4, 0.00000000,87.74996948-90,36.00000000); GivePlayerMoney(playerid, -100); SetTimerEx("bridge2toll", 7000, false, "i", playerid); SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying 100$, drive safe!"); SendClientMessage(playerid,COLOR_GRAD1," (( The toll gate will close in 8 seconds, don't get trapped down! ))"); tollopen = 1; } else { SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: A Toll is currently open, please wait"); } } else { SendClientMessage(playerid,COLOR_GRAD1," You are not in-range of any toll"); return 1; } return 1; }