Advertisement
Guest User

Larceny Speed Radar [FS]

a guest
Oct 22nd, 2010
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. /*
  2. _ ___ _____ _____ _____ __ _ __ __
  3. | | / | | _ \ / ___| | ____| | \ | | \ \ / /
  4. | | / /| | | |_| | | | | |__ | \| | \ \/ /
  5. | | / / | | | _ / | | | __| | |\ | \ /
  6. | |___ / / | | | | \ \ | |___ | |___ | | \ | / /
  7. |_____| /_/ |_| |_| \_\ \_____| |_____| |_| \_| /_/
  8.  
  9. |¯| /¯\ |¯\ /¯\ |¯|
  10. |¯\ |¯| |_/ |¯| |¯\
  11. */
  12.  
  13. //Special Thanks to: ([VGS]PROTIOSO_OC)
  14.  
  15. #include "LSR"
  16. #include "PGD"
  17.  
  18. new radartest;
  19.  
  20. public OnFilterScriptInit()
  21. {
  22. print("[LSR:] Radar Creator Loaded.");
  23. UseFlashRadar();
  24. CreateRadar(1257.644287, -1332.972900, 12.756792, 20, 50, 0, 1);//bugged
  25. radartest = CreateRadar(1194.994995, -1279.451416, 13.152740, 20, 50, 1318, 1);//near general hospital
  26. CreateRadar(1057.763549, -1366.322143, 13.189699, 20, 50, 1318, 1);//behind general hospital
  27. return 1;
  28. }
  29. public OnPlayerEnterRadar(playerid, speed, radarid)
  30. {
  31. new string[128];
  32. if(radarid == radartest){format(string, sizeof(string), "[LSR:] You passed in my radar at %d km/h and lost $500.", speed);}
  33. else {format(string, sizeof(string), "[LSR:] You passed in any radar at %d km/h and lost $500.", speed);}
  34. SendClientMessage(playerid, 0xA9C4E4FF, string);
  35. GivePlayerMoney(playerid, -500);
  36. return 1;
  37. }
  38.  
  39. public OnPlayerCommandText(playerid, cmdtext[])
  40. {
  41. new idx, cmd[MAX_psf_strtok], comment[MAX_psf_strtok];
  42. cmd = psf_strtok(cmdtext, idx);
  43. if(!strcmp(cmd, "/saveradar", true))
  44. {
  45. cmd = psf_strtok(cmdtext, idx);
  46. new speed;
  47. speed = strval(cmd);
  48. cmd = psf_strtok(cmdtext, idx);
  49. new radiation;
  50. radiation = strval(cmd);
  51. comment = psf_strtok(cmdtext, idx);
  52. if(!strlen(cmd)) return SendClientMessage(playerid, 0xAA3333AA, "[LSR:] /saveradar [speed limit] [radiation (default 20)] [comment]");
  53. if(!strlen(cmd)) return SendClientMessage(playerid, 0xAA3333AA, "[LSR:] /saveradar [speed limit] [radiation (default 20)] [comment]");
  54. if(!strlen(cmd)) return SendClientMessage(playerid, 0xAA3333AA, "[LSR:] /saveradar [speed limit] [radiation (default 20)] [comment]");
  55. new Float:X, Float:Y, Float:Z, strf[128];
  56. GetPlayerPos(playerid, X, Y, Z);
  57. format(strf, sizeof(strf), "CreateRadar(%f, %f, %f, %d, %d, 1318, 1);//%s\r\n", X, Y, Z, radiation, cmd, comment);
  58. pgd_EscreverArquivo("saved_radars.txt", strf); // write to the file saved_radars.txt
  59. CreateRadar(X, Y, Z, speed, radiation, 1318, 1); // create a radar
  60. SendClientMessage(playerid, 0x33AA33AA, "[LSR:] Radar saved!");
  61. return 1;
  62. }
  63. if(!strcmp(cmd, "/credits", true))
  64. {
  65. SendClientMessage(playerid, 0x33AA33AA, "Radars script.");
  66. SendClientMessage(playerid, 0x33AA33AA, "Author: Larceny");
  67. SendClientMessage(playerid, 0x33AA33AA, "lcsdegodoy@gmail.com");
  68. return 1;
  69. }
  70. return 0;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement