19.02.2012, 15:01
when i try to add a new toll to my system it dont work or show up :S
im sure i have missed something
also how do i use the is player in range of point twicew because the tolls are in diffrent placesz
im sure i have missed something
also how do i use the is player in range of point twicew because the tolls are in diffrent placesz
pawn Код:
#include <a_samp>
#include <streamer>
#include <foreach>
#define red 0xFF0000AA
new toll1;
new toll2;
forward Tolls();
forward Timer_TollsClose(tollid);
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("ToLLz By BaLLy For TLF [V1.0] Loaded");
print("--------------------------------------\n");
toll1 = CreateDynamicObject(3578, 1792.5, 663.29998779297, 16.89999961853, 9.4991760253906, 359.23846435547, 169.36804199219);
toll2 = CreateDynamicObject(3578, 1768.9000244141, 669, 17.10000038147, 9.4976806640625, 359.23645019531, 169.365234375);
SetTimer("Tolls", 1500, true);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public Tolls()
{
foreach(Player, playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1792.5, 663.29998779297, 16.89999961853))
{
MoveDynamicObject(toll1, 1792.5, 663.29998779297, 15.699999809265, 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, 1792.5, 663.29998779297, 16.89999961853, 9.4991760253906, 2.5);
case 1: MoveDynamicObject(toll2, 1768.9000244141, 669, 17.10000038147, 9.4976806640625, 2.5);
}
}