Advertisement
Hatiro

PAWN SAMP VEICULO DE PROFISSÃO/ORGANIZAÇÃO

Apr 26th, 2020
791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.08 KB | None | 0 0
  1. //Créditos: https://forum.sa-mp.com/showthread.php?t=395339
  2. //Pergunta: https://forum.sa-mp.com/showthread.php?t=674747
  3.  
  4. #define MAX_CARROS_ORG 23//definir o número de carros da org
  5. new caminhao[MAX_CARROS_ORG];
  6. new taxi[MAX_CARROS_ORG];
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.     //veiculos taxista
  11.     taxi[0] = CreateVehicle(420, 2778.1956, -2376.8271, 14.1051, 90.0000, 1, 1, 100);
  12.     taxi[1] = CreateVehicle(420, 2759.2173, -2375.7415, 14.1051, -90.1800, 1, 1, 100);
  13.     taxi[2] = CreateVehicle(420, 2759.2842, -2372.0630, 14.1051, -90.0000, 1, 1, 100);
  14.     taxi[3] = CreateVehicle(420, 2759.4177, -2368.5991, 14.1051, -90.0600, 1, 1, 100);
  15.     taxi[4] = CreateVehicle(420, 2759.2805, -2364.9226, 14.1051, -90.0600, 1, 1, 100);
  16.     taxi[5] = CreateVehicle(420, 2759.3254, -2361.0928, 14.1051, -90.0000, 1, 1, 100);
  17.     taxi[6] = CreateVehicle(420, 2759.5269, -2357.4207, 14.1051, -90.0000, 1, 1, 100);
  18.     taxi[7] = CreateVehicle(420, 2759.5083, -2353.4504, 14.1051, -90.2400, 1, 1, 100);
  19.     taxi[8] = CreateVehicle(420, 2759.6807, -2349.3396, 14.1051, -90.0000, 1, 1, 100);
  20.     taxi[9] = CreateVehicle(420, 2759.9221, -2345.4395, 14.1051, -90.0000, 1, 1, 100);
  21.     taxi[10] = CreateVehicle(420, 2759.8955, -2341.3167, 14.1051, -90.0600, 1, 1, 100);
  22.     taxi[11] = CreateVehicle(420, 2760.0535, -2337.0396, 14.1051, -90.0000, 1, 1, 100);
  23.     taxi[12] = CreateVehicle(420, 2759.3333, -2379.2683, 14.1051, -90.0000, 1, 1, 100);
  24.     taxi[13] = CreateVehicle(420, 2778.0913, -2381.0750, 14.1051, 90.0000, 1, 1, 100);
  25.     taxi[14] = CreateVehicle(420, 2777.8953, -2387.4812, 14.1051, 90.0000, 1, 1, 100);
  26.     taxi[15] = CreateVehicle(420, 2777.9941, -2384.3052, 14.1051, 90.0000, 1, 1, 100);
  27.     taxi[16] = CreateVehicle(420, 2777.5559, -2395.3184, 14.1051, 90.0000, 1, 1, 100);
  28.     taxi[17] = CreateVehicle(420, 2777.4539, -2398.8093, 14.1051, 90.0000, 1, 1, 100);
  29.     taxi[18] = CreateVehicle(420, 2777.3525, -2402.2456, 14.1051, 90.0000, 1, 1, 100);
  30.     taxi[19] = CreateVehicle(420, 2777.6592, -2391.8167, 14.1051, 90.0000, 1, 1, 100);
  31.     taxi[20] = CreateVehicle(420, 2775.9270, -2418.2512, 14.1051, 90.0000, 1, 1, 100);
  32.     taxi[21] = CreateVehicle(420, 2774.7324, -2455.2065, 14.1051, 90.0000, 1, 1, 100);
  33.     taxi[22] = CreateVehicle(420, 2774.7046, -2493.5581, 14.1051, 90.0000, 1, 1, 100);
  34.     //veiculos caminhoneiro
  35.     caminhao[0] = CreateVehicle(403, 2778.1956, -2376.8271, 14.1051, 90.0000, 1, 1, 100);
  36.     caminhao[1] = CreateVehicle(403, 2759.2173, -2375.7415, 14.1051, -90.1800, 1, 1, 100);
  37.     caminhao[2] = CreateVehicle(403, 2759.2842, -2372.0630, 14.1051, -90.0000, 1, 1, 100);
  38.     caminhao[3] = CreateVehicle(403, 2759.4177, -2368.5991, 14.1051, -90.0600, 1, 1, 100);
  39.     caminhao[4] = CreateVehicle(403, 2759.2805, -2364.9226, 14.1051, -90.0600, 1, 1, 100);
  40.     caminhao[5] = CreateVehicle(403, 2759.3254, -2361.0928, 14.1051, -90.0000, 1, 1, 100);
  41.     caminhao[6] = CreateVehicle(403, 2759.5269, -2357.4207, 14.1051, -90.0000, 1, 1, 100);
  42.     caminhao[7] = CreateVehicle(403, 2759.5083, -2353.4504, 14.1051, -90.2400, 1, 1, 100);
  43.     caminhao[8] = CreateVehicle(403, 2759.6807, -2349.3396, 14.1051, -90.0000, 1, 1, 100);
  44.     caminhao[9] = CreateVehicle(403, 2759.9221, -2345.4395, 14.1051, -90.0000, 1, 1, 100);
  45.     caminhao[10] = CreateVehicle(403, 2759.8955, -2341.3167, 14.1051, -90.0600, 1, 1, 100);
  46.     caminhao[11] = CreateVehicle(403, 2760.0535, -2337.0396, 14.1051, -90.0000, 1, 1, 100);
  47.     caminhao[12] = CreateVehicle(403, 2759.3333, -2379.2683, 14.1051, -90.0000, 1, 1, 100);
  48.     caminhao[13] = CreateVehicle(403, 2778.0913, -2381.0750, 14.1051, 90.0000, 1, 1, 100);
  49.     caminhao[14] = CreateVehicle(403, 2777.8953, -2387.4812, 14.1051, 90.0000, 1, 1, 100);
  50.     caminhao[15] = CreateVehicle(403, 2777.9941, -2384.3052, 14.1051, 90.0000, 1, 1, 100);
  51.     caminhao[16] = CreateVehicle(403, 2777.5559, -2395.3184, 14.1051, 90.0000, 1, 1, 100);
  52.     caminhao[17] = CreateVehicle(403, 2777.4539, -2398.8093, 14.1051, 90.0000, 1, 1, 100);
  53.     caminhao[18] = CreateVehicle(403, 2777.3525, -2402.2456, 14.1051, 90.0000, 1, 1, 100);
  54.     caminhao[19] = CreateVehicle(403, 2777.6592, -2391.8167, 14.1051, 90.0000, 1, 1, 100);
  55.     caminhao[20] = CreateVehicle(403, 2775.9270, -2418.2512, 14.1051, 90.0000, 1, 1, 100);
  56.     caminhao[21] = CreateVehicle(403, 2774.7324, -2455.2065, 14.1051, 90.0000, 1, 1, 100);
  57.     caminhao[22] = CreateVehicle(403, 2774.7046, -2493.5581, 14.1051, 90.0000, 1, 1, 100);
  58. return 1
  59. }
  60. cmd:darprofissao(playerid){
  61.   ++profissao;
  62.   return 1;
  63. }
  64. cmd:removerprofissao(playerid){
  65.   --profissao;
  66.   return 1;
  67. }
  68. public OnPlayerStateChange(playerid, newstate, oldstate)
  69. {
  70.   for(new c = 0; c <= 23; c++)
  71.     {
  72.         if(IsPlayerInVehicle(playerid, caminhao[c]) && profissao != 1)
  73.         {
  74.             SendClientMessage(playerid, -1, "voce nao e um caminhoneiro");
  75.             RemovePlayerFromVehicle(playerid);
  76.             break;
  77.         }else if(IsPlayerInVehicle(playerid, taxi[c]) && profissao != 2)
  78.         {
  79.             SendClientMessage(playerid, -1, "voce nao e um taxista");
  80.             RemovePlayerFromVehicle(playerid);
  81.             break;
  82.         }
  83.     }
  84.   return 1;
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement