07.06.2012, 14:12
(
Последний раз редактировалось Tom1412; 07.06.2012 в 23:38.
)
I don't know why but this code seems to crash pawn complier.
Can anyone help??
pawn Код:
// Toll System, Made by Tom.1412
// Don't remove credits
// If you want more Toll's made, Message me on samp.
#include <a_samp>
#define FILTERSCRIPT
#define Toll_Price -100
#define Message 0xFFFFFFAA
#if defined FILTERSCRIPT
#endif
new Toll1;
new Toll2;
new Toll3;
new Toll4;
forward Toll1();
forward Toll2();
forward Toll3();
forward Toll4();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Toll system, Made by Tom.1412");
print("--------------------------------------\n");
CreateObject(5837,1739.44726562,524.03808594,28.29999924,0.00000000,2.99926758,69.99938965); //object(ci_guardhouse1) (1)
CreateObject(966,1741.94042969,525.51074219,26.75112152,0.00000000,0.00000000,159.99938965); //object(bar_gatebar01) (1)
CreateObject(966,1755.01660156,520.75585938,26.75000000,0.00000000,0.00000000,339.99938965); //object(bar_gatebar01) (2)
CreateObject(5837,1755.92895508,518.25842285,28.35000038,0.00000000,2.99926758,69.99389648); //object(ci_guardhouse1) (2)
CreateObject(996,1746.00866699,515.94378662,27.91415596,0.00000000,3.00000000,71.00000000); //object(lhouse_barrier1) (1)
CreateObject(996,1743.31982422,508.27001953,28.37879181,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (2)
CreateObject(996,1735.51684570,513.28295898,28.22153282,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (4)
CreateObject(996,1732.91406250,505.68289185,28.64999962,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (5)
CreateObject(996,1748.68457031,523.87402344,27.45096207,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (6)
CreateObject(996,1741.04541016,528.30950928,27.37811279,0.00000000,4.00000000,70.99914551); //object(lhouse_barrier1) (8)
CreateObject(996,1743.65527344,535.91204834,26.82599258,0.00000000,4.00000000,70.99914551); //object(lhouse_barrier1) (9)
CreateObject(996,1746.27636719,543.54516602,26.29999924,0.00000000,3.00000000,70.99914551); //object(lhouse_barrier1) (10)
CreateObject(996,1748.87194824,551.19232178,25.84395790,0.00000000,2.99926758,74.00000000); //object(lhouse_barrier1) (11)
CreateObject(5837,1722.62268066,529.69335938,28.35000038,0.00000000,357.00073242,250.00000000); //object(ci_guardhouse1) (1)
CreateObject(966,1723.87158203,527.16284180,26.98099709,0.00000000,0.00000000,159.99938965); //object(bar_gatebar01) (1)
CreateObject(966,1736.96264648,522.40087891,26.99348450,0.00000000,0.00000000,339.99938965); //object(bar_gatebar01) (2)
CreateObject(996,1727.93518066,517.60491943,28.15877914,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (3)
CreateObject(996,1730.69506836,525.46356201,27.68601418,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (3)
CreateObject(996,1733.33239746,533.15216064,27.22461700,0.00000000,2.99926758,70.99914551); //object(lhouse_barrier1) (3)//=================================================================================================================
LS1xc = CreateObject(968,1755.18994141,520.70001221,27.52754784,0.00000000,270.00000000,340.00000000); //object(barrierturn) (1)
LS2xc = CreateObject(968,1741.80004883,525.59997559,27.60000038,0.00000000,90.00000000,340.00000000); //object(barrierturn) (2)
LS3xc = CreateObject(968,1723.69995117,527.22998047,27.85000038,0.00000000,90.00000000,340.00000000); //object(barrierturn) (3)
LS4xc = CreateObject(968,1737.16003418,522.34002686,27.79999924,0.00000000,270.00000000,339.99938965); //object(barrierturn) (4)
SetTimer("Toll", 3000, false);
return 1;
}
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;
}
public Toll1()
{
MoveObject(LS1xc, 1755.18994141,520.70001221,27.52754784,0.00000000,270.00000000,340.00000000);
return 1;
}
public Toll2()
{
MoveObject(LS2xc, 1741.80004883,525.59997559,27.60000038,0.00000000,90.00000000,340.00000000);
return 1;
}
public Toll3()
{
MoveObject(LS3xc, 1723.69995117,527.22998047,27.85000038,0.00000000,90.00000000,340.00000000);
return 1;
}
public Toll4()
{
MoveObject(LS3xc, 1737.16003418,522.34002686,27.79999924,0.00000000,270.00000000,339.99938965);
return 1;
}