19.01.2013, 21:13
Sorry for the mess, you might correct it in pawno
pawn Код:
#include <a_samp>
#include <streamer>
#include <foreach>
#define red 0xFF0000AA
new toll1;
forward Tolls(playerid);
forward Timer_TollsClose(tollid);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("ToLLz By BaLLy For Et V2 Loaded");
print("--------------------------------------\n");
toll1 = CreateDynamicObject(3578, 1651.2354736328, -43.643432617188, 36.139217376709, 0, 0, 21.5);
SetTimer("Tolls", 1500, true);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public Tolls(playerid)
{
foreach(Player, playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1651.2354736328, -43.643432617188, 36.139217376709))
{
if(GetPlayerWantedLevel(playerid) > 4 && GetPlayerWantedLevel(playerid) =< 1)
{
//Issue a ticket to the player or let him pay some money with GivePlayerMoney(playerid,-amount);
}
else if(GetPlayerWantedLevel(playerid) =< 4)
{
//Send him to Jail, maybe with SetPlayerPos?
}
else if(GetPlayerWantedLevel(playerid) == 0)
{
MoveDynamicObject(toll1, 1651.2353515625, -43.642578125, 34.464115142822, 2.5);
GivePlayerMoney(playerid, -5);
GameTextForPlayer(playerid, "~y~WELL HELLO THERE GOOD SIR~n~THANK YOU~n~~r~$10", 3000, 3);
SetTimerEx("Timer_TollsClose",5000,false,"i", 0);
}
}
}
}
public Timer_TollsClose(tollid)
{
switch(tollid)
{
case 0: MoveDynamicObject(toll1, 1651.2354736328, -43.643432617188, 36.139217376709, 2.5);
}
}