Guest User

Forum-samp

a guest
Aug 4th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.90 KB | None | 0 0
  1. #include <a_samp>
  2. #include <Pawn.CMD>
  3. #include <sscanf2>
  4.  
  5. new pVeh[MAX_PLAYERS];
  6. new bool:pVehCriado[MAX_PLAYERS];
  7.  
  8. main()
  9. {
  10. print("\n----------------------------------");
  11. print(" Blank Gamemode by your name here");
  12. print("----------------------------------\n");
  13. }
  14.  
  15. public OnGameModeInit()
  16. {
  17. SetGameModeText("Blank Script");
  18. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  19. return 1;
  20. }
  21.  
  22. public OnGameModeExit()
  23. {
  24. return 1;
  25. }
  26.  
  27. public OnPlayerRequestClass(playerid, classid)
  28. {
  29. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  30. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  31. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  32. return 1;
  33. }
  34.  
  35. public OnPlayerConnect(playerid)
  36. {
  37. return 1;
  38. }
  39.  
  40. public OnPlayerDisconnect(playerid, reason)
  41. {
  42. return 1;
  43. }
  44.  
  45. public OnPlayerSpawn(playerid)
  46. {
  47. return 1;
  48. }
  49.  
  50. public OnPlayerDeath(playerid, killerid, reason)
  51. {
  52. return 1;
  53. }
  54.  
  55. public OnVehicleSpawn(vehicleid)
  56. {
  57. return 1;
  58. }
  59.  
  60. public OnVehicleDeath(vehicleid, killerid)
  61. {
  62. return 1;
  63. }
  64.  
  65. public OnPlayerText(playerid, text[])
  66. {
  67. return 1;
  68. }
  69.  
  70. public OnPlayerCommandText(playerid, cmdtext[])
  71. {
  72. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  73. {
  74. // Do something here
  75. return 1;
  76. }
  77. return 0;
  78. }
  79.  
  80. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerExitVehicle(playerid, vehicleid)
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnPlayerStateChange(playerid, newstate, oldstate)
  91. {
  92. return 1;
  93. }
  94.  
  95. public OnPlayerEnterCheckpoint(playerid)
  96. {
  97. return 1;
  98. }
  99.  
  100. public OnPlayerLeaveCheckpoint(playerid)
  101. {
  102. return 1;
  103. }
  104.  
  105. public OnPlayerEnterRaceCheckpoint(playerid)
  106. {
  107. return 1;
  108. }
  109.  
  110. public OnPlayerLeaveRaceCheckpoint(playerid)
  111. {
  112. return 1;
  113. }
  114.  
  115. public OnRconCommand(cmd[])
  116. {
  117. return 1;
  118. }
  119.  
  120. public OnPlayerRequestSpawn(playerid)
  121. {
  122. return 1;
  123. }
  124.  
  125. public OnObjectMoved(objectid)
  126. {
  127. return 1;
  128. }
  129.  
  130. public OnPlayerObjectMoved(playerid, objectid)
  131. {
  132. return 1;
  133. }
  134.  
  135. public OnPlayerPickUpPickup(playerid, pickupid)
  136. {
  137. return 1;
  138. }
  139.  
  140. public OnVehicleMod(playerid, vehicleid, componentid)
  141. {
  142. return 1;
  143. }
  144.  
  145. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  146. {
  147. return 1;
  148. }
  149.  
  150. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  151. {
  152. return 1;
  153. }
  154.  
  155. public OnPlayerSelectedMenuRow(playerid, row)
  156. {
  157. return 1;
  158. }
  159.  
  160. public OnPlayerExitedMenu(playerid)
  161. {
  162. return 1;
  163. }
  164.  
  165. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  166. {
  167. return 1;
  168. }
  169.  
  170. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  171. {
  172. return 1;
  173. }
  174.  
  175. public OnRconLoginAttempt(ip[], password[], success)
  176. {
  177. return 1;
  178. }
  179.  
  180. public OnPlayerUpdate(playerid)
  181. {
  182. return 1;
  183. }
  184.  
  185. public OnPlayerStreamIn(playerid, forplayerid)
  186. {
  187. return 1;
  188. }
  189.  
  190. public OnPlayerStreamOut(playerid, forplayerid)
  191. {
  192. return 1;
  193. }
  194.  
  195. public OnVehicleStreamIn(vehicleid, forplayerid)
  196. {
  197. return 1;
  198. }
  199.  
  200. public OnVehicleStreamOut(vehicleid, forplayerid)
  201. {
  202. return 1;
  203. }
  204.  
  205. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  206. {
  207. return 1;
  208. }
  209.  
  210. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  211. {
  212. return 1;
  213. }
  214.  
  215. CMD:cv(playerid, params[])
  216. {
  217. new Modelo, Color[2], Float:Pos[4]; // modelo - modelo do veiculo 400-611! color[2] são as cores 1 é 2. Pos[4] são as posição do player é o angulo do player!
  218.  
  219. if(!IsPlayerAdmin(playerid))
  220. return SendClientMessage(playerid, -1, "| ERRO | Você não tem permissão!"); // se nao for admin rcon não cria o veículo!
  221.  
  222. if(sscanf(params, "ddd", Modelo, Color[0], Color[1]))
  223. return SendClientMessage(playerid, -1, "| ERRO | Use: /CV [Modelo] [Color1] [Color2]"); // se não colocar os parametros ou digitar sem colocar algum manda uma msg de erro!
  224.  
  225. if(Modelo < 400 || Modelo > 611)
  226. return SendClientMessage(playerid, -1, "| ERRO | Veículo Inválido!"); // se colocar um numero menor que 400 ou maior que 600 manda uma msg de erro! 400-611 são os veículos do samp!
  227.  
  228. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); // Pega a posição do player
  229. GetPlayerFacingAngle(playerid, Pos[3]); // Pega o angulo do player
  230.  
  231. SendClientMessage(playerid, -1, "| INFO | Veículo criado com sucesso!");
  232.  
  233. pVeh[playerid] = CreateVehicle(Modelo, Pos[0], Pos[1], Pos[2], Pos[3], Color[0], Color[1], -1); // Cria o veículo: -1 = tempo de respawn.
  234. PutPlayerInVehicle(playerid, pVeh[playerid], 0); // Colocar o player dentro do veículo
  235. return 1;
  236. }
  237.  
  238. CMD:dcv(playerid)
  239. {
  240. if(!IsPlayerAdmin(playerid))
  241. return SendClientMessage(playerid, -1, "| ERRO | Você não tem permissão!"); // se nao for admin rcon não cria o veículo!
  242.  
  243. if(pVehCriado[playerid] == false)
  244. return SendClientMessage(playerid, -1, "| ERRO | Não existe nenhum veículo criado pelo comando /CV.");
  245.  
  246. DestroyVehicle(pVeh[playerid]); // destroy o veículo pVeh
  247. return 1;
  248. }
Advertisement
Add Comment
Please, Sign In to add comment