Hello, i have tolls at my server and when i do /payntoll its opening but it stays in the air and when i try's again it says "Toll Guard: A toll is currently opened, please wait!". Please help me!
pawn Код:
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, 40.0, 50.45, -1530.43, 5.30)) // Santa Maria Beach
{
if(tollopen==0)
{
SetObjectRot(tollgate1, 359.99560547,89.49993896-90,88.00000000); // Gate 1
SetObjectRot(tollgate2, 0.00000000,270.25024414+90,85.99548340); // Gate 2
GivePlayerMoney(playerid, -45);
SetTimerEx("santamariabeachtoll", 7000, false, "i", playerid);
SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying, 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, -45);
SetTimerEx("bridge1toll", 7000, false, "i", playerid);
SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying, 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, -45);
SetTimerEx("bridge2toll", 7000, false, "i", playerid);
SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying, 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, 40.0, 1736.79, 516.59, 27.15)) // Highway Bridge
{
if(tollopen==0)
{
SetObjectRot(tollgate5, 0.00000000,87.74780273-90,162.24670410);
SetObjectRot(tollgate6, 0.00338745,89.74209595-90,341.99346924);
GivePlayerMoney(playerid, -45);
SetTimerEx("bridge2toll", 7000, false, "i", playerid);
SendClientMessage(playerid,COLOR_GRAD1," Toll Guard: Thank you for paying, 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;
}
This is bug report and not Scripting Help/Support section. Please post there instead.