07.06.2012, 14:29
It's a know bug I think it happens when you have more then "{" needed or you have missed some.
Try this code (NOT TESTED)
NOT SURE If it will work but you had A lot of "{" open and you never closed them.
Try this code (NOT TESTED)
pawn Код:
forward Toll(playerid);
public Toll(playerid);
{ // Toll going into LV right gate
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1750.2863,518.2169,27.9678))
{
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_DRIVER)
{
new string[48];
format(string, sizeof(string), "You have paid $%i. Have a nice day.", Toll_Price);
MoveObject(LS1xc, 1755.0000000,520.77001953,27.50000001,0.00000001,347.00000000,340.00000000);
GivePlayerMoney(playerid, Toll_Price);
SetTimer("Toll1", 3000, false);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1744.1271,521.0207,27.9283))
{
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_DRIVER)
{
new string[48];
format(string, sizeof(string), "You have paid $%i. Have a nice day.", Toll_Price);
MoveObject(LS2xc, 1741.90002441,525.52502441,27.50000000,0.00000000,15.00000000,340.00000000);
GivePlayerMoney(playerid, Toll_Price);
SetTimer("Toll2", 3000, false);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1727.7854,528.6424,27.8189))
{
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_DRIVER)
{
new string[48];
format(string, sizeof(string), "You have paid $%i. Have a nice day.", Toll_Price);
MoveObject(LS3xc, 1723.80004883,527.18701172,27.85000038,0.00000000,15.00000000,340.00000000);
GivePlayerMoney(playerid, Toll_Price);
SetTimer("Toll3", 3000, false);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1734.1310,526.9026,27.7977))
{
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_DRIVER)
{
new string[48];
format(string, sizeof(string), "You have paid $%i. Have a nice day.", Toll_Price);
MoveObject(LS3xc, 1736.94995117,522.40997314,27.79999924,0.00000000,345.00000000,339.99938965);
GivePlayerMoney(playerid, Toll_Price);
SetTimer("Toll4", 3000, false);
}
}
}
}
}
}
return 1;
}

