Advertisement
Guest User

Codigo respawndetran

a guest
Oct 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. CMD:respawndetran(playerid, params[])
  2. {
  3. new string[128];
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(PlayerInfo[playerid][pMembro] != 34 && PlayerInfo[playerid][pLider] != 34)
  7. {
  8. SendClientMessage(playerid, COLOR_GRAD1, "Você não é um Detran!");
  9. return 1;
  10. }
  11. if(!IsPlayerInHQMec(playerid))
  12. {
  13. SendClientMessage(playerid, COLOR_GRAD1, "O carro e você precisam estar na sua HQ!");
  14. return 1;
  15. }
  16. new counter = 0;
  17. new result;
  18. new plyName[MAX_PLAYER_NAME];
  19. GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
  20. for(new i; i != MAX_VEHICLES; i++)
  21. {
  22. new dist = ChecarveiculoBNS(5, playerid, i);
  23. if(dist)
  24. {
  25. result = i;
  26. counter++;
  27. }
  28. }
  29. switch(counter)
  30. {
  31. case 0:
  32. {
  33. SendClientMessage(playerid, COLOR_GREY, "Não há nenhum carro nesse por perto!");
  34. }
  35. case 1:
  36. {
  37. new name[MAX_PLAYER_NAME];
  38. GetPlayerName(playerid, name, sizeof(name));
  39. format(string, sizeof(string), "Você Entregou o carro ID:[%d] A sua HQ!", result);
  40. SendClientMessage(playerid, COLOR_GREY, string);
  41. SetVehicleToRespawn(result);
  42. }
  43. default:
  44. {
  45. SendClientMessage(playerid, COLOR_GREY, "Dois carros estão muito pertos.Afaste-os Mais!");
  46. }
  47. }
  48. }
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement