help with my toll please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with my toll please (
/showthread.php?tid=408932)
help with my toll please -
[LHT]Bally - 19.01.2013
Hi how can i make it that if i want to add a toll in Its easy and doesnt give errors, So can someone show how to make another after the first, also how can i make it that if a player is wanted lvl below 4 it fines the player when he tries to go through toll.
but if wanted level is over 4 it jails them at the toll.
All help apreciated
pawn Код:
#include <a_samp>
#include <streamer>
#include <foreach>
#define red 0xFF0000AA
new toll1;
forward Tolls();
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()
{
foreach(Player, playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1651.2354736328, -43.643432617188, 36.139217376709))
{
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);
}
}
AW: help with my toll please -
Harry :) - 19.01.2013
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);
}
}