28.08.2011, 07:48
i have the problem that when i go up to the toll it goes down and then shoots up straight away, then if i go up to it again it just goes down a little bit and back up again so there is no chance to pass it . any help ?
i did have an idea to use a checkpoint , but i havent got a clue how to add that in as im just learning , and dont really want a checkpoint showing up where the toll is
i did have an idea to use a checkpoint , but i havent got a clue how to add that in as im just learning , and dont really want a checkpoint showing up where the toll is
pawn Code:
#include <a_samp>
#include <streamer>
#include <foreach>
new toll1;
forward Tolls();// The FUNCTION To Make The Tolls Work
forward Timer_TollsClose(playerid, tollid); // The Timer Making The Tolls Close
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Toll script by Bally for Long Haul Trucking");
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, 1651.2354736328, -43.643432617188, 36.139217376709)) // Checking If The Player Is In Range Of Any Of The Tolls
{
MoveDynamicObject(toll1, 1651.2353515625, -43.642578125, 34.464115142822, 2.5); // Moves Toll1
GivePlayerMoney(playerid, -10); // Takes 10 Off Players Money LEAVE THIS AS IT IS
GameTextForPlayer(playerid, "~r~THANK YOU~n~~b~$10", 30000, 3);
SetTimerEx("Timer_TollsClose",18000,true,"ii",playerid, 0);
}
}
}
public Timer_TollsClose(playerid, tollid)
{
switch(tollid)
{
case 0: MoveDynamicObject(toll1, 1651.2354736328, -43.643432617188, 36.139217376709, 2.5); // Moves The Toll Back Cords found On the original CreateDynamicObject function
}
}