Advertisement
lhtbally

speed control/toll

Sep 14th, 2011
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. // by bally for tlf
  2.  
  3. #include <a_samp>
  4. #include <streamer>
  5. #include <foreach>
  6. #define red 0xFF0000AA
  7.  
  8. new toll1;
  9.  
  10. forward Tolls();
  11. forward Timer_TollsClose(tollid);
  12.  
  13. public OnFilterScriptInit()
  14. {
  15. print("\n--------------------------------------");
  16. print("ToLLz By BaLLy For TLF");
  17. print("--------------------------------------\n");
  18.  
  19. toll1 = CreateDynamicObject(3578, 1651.2354736328, -43.643432617188, 36.139217376709, 0, 0, 21.5);
  20. CreateDynamicObject(3881, 1657.2738037109, -38.72607421875, 37.266929626465, 0, 0, 20.5);//lv toll start
  21. CreateDynamicObject(3881, 1645.2979736328, -48.711246490479, 37.266929626465, 0, 0, 201.24499511719);
  22. CreateDynamicObject(978, 1644.5096435547, -58.167507171631, 35.972015380859, 0, 0, 272);
  23. CreateDynamicObject(979, 1663.5103759766, -44.451171875, 35.936042785645, 0, 0, 129.75);
  24. CreateDynamicObject(978, 1656.4311523438, -30.885402679443, 35.939228057861, 0, 0, 74);
  25. CreateDynamicObject(979, 1638.6834716797, -43.446388244629, 35.924705505371, 0, 0, 315);//lv toll end
  26. SetTimer("Tolls", 1500, true);
  27. return 1;
  28. }
  29.  
  30.  
  31.  
  32. public OnFilterScriptExit()
  33. {
  34. return 1;
  35. }
  36.  
  37. public Tolls()
  38. {
  39. foreach(Player, playerid)
  40. {
  41. if(IsPlayerInRangeOfPoint(playerid, 15.0, 1651.2354736328, -43.643432617188, 36.139217376709))
  42. {
  43. MoveDynamicObject(toll1, 1651.2353515625, -43.642578125, 34.464115142822, 2.5);
  44. GivePlayerMoney(playerid, -5);
  45. GameTextForPlayer(playerid, "~y~THANK YOU~n~~r~$10", 3000, 3);
  46. SetTimerEx("Timer_TollsClose",5000,false,"i", 0);
  47.  
  48. }
  49.  
  50.  
  51.  
  52. }
  53. }
  54.  
  55. public Timer_TollsClose(tollid)
  56. {
  57. switch(tollid)
  58. {
  59. case 0: MoveDynamicObject(toll1, 1651.2354736328, -43.643432617188, 36.139217376709, 2.5);
  60.  
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement