Guest User

Carspanw

a guest
Apr 9th, 2012
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. //Please use this at your descretion! -Tut by ShockeyHD
  2. //USe me in your credits!
  3. //Thanks!
  4.  
  5. #include <a_samp>
  6. #include <float>
  7.  
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. print("\n--------------------------------------");
  15. print("Police Car spawner by XphosKill3r");
  16. print("--------------------------------------\n");
  17. return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21.  
  22. return 1;
  23. }
  24.  
  25.  
  26. public OnPlayerCommandText(playerid, cmdtext[])
  27. {
  28. if (!strcmp(cmdtext,"/Carspawner",true))
  29. {
  30. ShowPlayerDialog(playerid,12,DIALOG_STYLE_LIST,"Cars:",,"Police Cars:","PoliceCar-LS\nPoliceCar-LV\nPoliceCar-SF\nFBI_Rancher\nRanger\nWashington\n","Select","Cancel");
  31. return 1;
  32. }
  33. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  34. {
  35. if(dialogid == 12)
  36. {
  37. if(response == 1)
  38. {
  39. if(listitem == 0)
  40. {
  41. new Float:x, Float:y, Float:z, Float:a;
  42. GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
  43. CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
  44. new vehicleid = GetPlayerVehicleID(playerid);
  45. PutPlayerInVehicle(playerid, vehicleid, 0);
  46. }
  47. if(listitem == 1)
  48. {
  49. new Float:x, Float:y, Float:z, Float:a;
  50. GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
  51. CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
  52. new vehicleid = GetPlayerVehicleID(playerid);
  53. PutPlayerInVehicle(playerid, vehicleid, 0);
  54.  
  55. }
  56. if(listitem == 2)
  57. {
  58. new Float:x, Float:y, Float:z, Float:a;
  59. GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
  60. CreateVehicle(400, x+3,y,z, a, -1, -1, -1);
  61. new vehicleid = GetPlayerVehicleID(playerid);
  62. PutPlayerInVehicle(playerid, vehicleid, 0);
  63. }
  64. if(listitem == 3)
  65. {
  66. new Float:x, Float:y, Float:z, Float:a;
  67. GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
  68. CreateVehicle(401, x+3,y,z, a, -1, -1, -1);
  69. new vehicleid = GetPlayerVehicleID(playerid);
  70. PutPlayerInVehicle(playerid, vehicleid, 0);
  71. }
  72. if(listitem == 4)
  73. {
  74. new Float:x, Float:y, Float:z, Float:a;
  75. GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
  76. CreateVehicle(402, x+3,y,z, a, -1, -1, -1);
  77. new vehicleid = GetPlayerVehicleID(playerid);
  78. PutPlayerInVehicle(playerid, vehicleid, 0);
  79. }
  80. if(listitem == 5)
  81. {
  82. new Float:x, Float:y, Float:z, Float:a;
  83. GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
  84. CreateVehicle(403, x+3,y,z, a, -1, -1, -1);
  85. new vehicleid = GetPlayerVehicleID(playerid);
  86. PutPlayerInVehicle(playerid, vehicleid, 0);
  87. if(listitem == 2)
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }
  94. #endif
Advertisement
Add Comment
Please, Sign In to add comment