Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Créditos: https://forum.sa-mp.com/showthread.php?t=395339
- //Pergunta: https://forum.sa-mp.com/showthread.php?t=674747
- #define MAX_CARROS_ORG 23//definir o número de carros da org
- new caminhao[MAX_CARROS_ORG];
- new taxi[MAX_CARROS_ORG];
- public OnFilterScriptInit()
- {
- //veiculos taxista
- taxi[0] = CreateVehicle(420, 2778.1956, -2376.8271, 14.1051, 90.0000, 1, 1, 100);
- taxi[1] = CreateVehicle(420, 2759.2173, -2375.7415, 14.1051, -90.1800, 1, 1, 100);
- taxi[2] = CreateVehicle(420, 2759.2842, -2372.0630, 14.1051, -90.0000, 1, 1, 100);
- taxi[3] = CreateVehicle(420, 2759.4177, -2368.5991, 14.1051, -90.0600, 1, 1, 100);
- taxi[4] = CreateVehicle(420, 2759.2805, -2364.9226, 14.1051, -90.0600, 1, 1, 100);
- taxi[5] = CreateVehicle(420, 2759.3254, -2361.0928, 14.1051, -90.0000, 1, 1, 100);
- taxi[6] = CreateVehicle(420, 2759.5269, -2357.4207, 14.1051, -90.0000, 1, 1, 100);
- taxi[7] = CreateVehicle(420, 2759.5083, -2353.4504, 14.1051, -90.2400, 1, 1, 100);
- taxi[8] = CreateVehicle(420, 2759.6807, -2349.3396, 14.1051, -90.0000, 1, 1, 100);
- taxi[9] = CreateVehicle(420, 2759.9221, -2345.4395, 14.1051, -90.0000, 1, 1, 100);
- taxi[10] = CreateVehicle(420, 2759.8955, -2341.3167, 14.1051, -90.0600, 1, 1, 100);
- taxi[11] = CreateVehicle(420, 2760.0535, -2337.0396, 14.1051, -90.0000, 1, 1, 100);
- taxi[12] = CreateVehicle(420, 2759.3333, -2379.2683, 14.1051, -90.0000, 1, 1, 100);
- taxi[13] = CreateVehicle(420, 2778.0913, -2381.0750, 14.1051, 90.0000, 1, 1, 100);
- taxi[14] = CreateVehicle(420, 2777.8953, -2387.4812, 14.1051, 90.0000, 1, 1, 100);
- taxi[15] = CreateVehicle(420, 2777.9941, -2384.3052, 14.1051, 90.0000, 1, 1, 100);
- taxi[16] = CreateVehicle(420, 2777.5559, -2395.3184, 14.1051, 90.0000, 1, 1, 100);
- taxi[17] = CreateVehicle(420, 2777.4539, -2398.8093, 14.1051, 90.0000, 1, 1, 100);
- taxi[18] = CreateVehicle(420, 2777.3525, -2402.2456, 14.1051, 90.0000, 1, 1, 100);
- taxi[19] = CreateVehicle(420, 2777.6592, -2391.8167, 14.1051, 90.0000, 1, 1, 100);
- taxi[20] = CreateVehicle(420, 2775.9270, -2418.2512, 14.1051, 90.0000, 1, 1, 100);
- taxi[21] = CreateVehicle(420, 2774.7324, -2455.2065, 14.1051, 90.0000, 1, 1, 100);
- taxi[22] = CreateVehicle(420, 2774.7046, -2493.5581, 14.1051, 90.0000, 1, 1, 100);
- //veiculos caminhoneiro
- caminhao[0] = CreateVehicle(403, 2778.1956, -2376.8271, 14.1051, 90.0000, 1, 1, 100);
- caminhao[1] = CreateVehicle(403, 2759.2173, -2375.7415, 14.1051, -90.1800, 1, 1, 100);
- caminhao[2] = CreateVehicle(403, 2759.2842, -2372.0630, 14.1051, -90.0000, 1, 1, 100);
- caminhao[3] = CreateVehicle(403, 2759.4177, -2368.5991, 14.1051, -90.0600, 1, 1, 100);
- caminhao[4] = CreateVehicle(403, 2759.2805, -2364.9226, 14.1051, -90.0600, 1, 1, 100);
- caminhao[5] = CreateVehicle(403, 2759.3254, -2361.0928, 14.1051, -90.0000, 1, 1, 100);
- caminhao[6] = CreateVehicle(403, 2759.5269, -2357.4207, 14.1051, -90.0000, 1, 1, 100);
- caminhao[7] = CreateVehicle(403, 2759.5083, -2353.4504, 14.1051, -90.2400, 1, 1, 100);
- caminhao[8] = CreateVehicle(403, 2759.6807, -2349.3396, 14.1051, -90.0000, 1, 1, 100);
- caminhao[9] = CreateVehicle(403, 2759.9221, -2345.4395, 14.1051, -90.0000, 1, 1, 100);
- caminhao[10] = CreateVehicle(403, 2759.8955, -2341.3167, 14.1051, -90.0600, 1, 1, 100);
- caminhao[11] = CreateVehicle(403, 2760.0535, -2337.0396, 14.1051, -90.0000, 1, 1, 100);
- caminhao[12] = CreateVehicle(403, 2759.3333, -2379.2683, 14.1051, -90.0000, 1, 1, 100);
- caminhao[13] = CreateVehicle(403, 2778.0913, -2381.0750, 14.1051, 90.0000, 1, 1, 100);
- caminhao[14] = CreateVehicle(403, 2777.8953, -2387.4812, 14.1051, 90.0000, 1, 1, 100);
- caminhao[15] = CreateVehicle(403, 2777.9941, -2384.3052, 14.1051, 90.0000, 1, 1, 100);
- caminhao[16] = CreateVehicle(403, 2777.5559, -2395.3184, 14.1051, 90.0000, 1, 1, 100);
- caminhao[17] = CreateVehicle(403, 2777.4539, -2398.8093, 14.1051, 90.0000, 1, 1, 100);
- caminhao[18] = CreateVehicle(403, 2777.3525, -2402.2456, 14.1051, 90.0000, 1, 1, 100);
- caminhao[19] = CreateVehicle(403, 2777.6592, -2391.8167, 14.1051, 90.0000, 1, 1, 100);
- caminhao[20] = CreateVehicle(403, 2775.9270, -2418.2512, 14.1051, 90.0000, 1, 1, 100);
- caminhao[21] = CreateVehicle(403, 2774.7324, -2455.2065, 14.1051, 90.0000, 1, 1, 100);
- caminhao[22] = CreateVehicle(403, 2774.7046, -2493.5581, 14.1051, 90.0000, 1, 1, 100);
- return 1
- }
- cmd:darprofissao(playerid){
- ++profissao;
- return 1;
- }
- cmd:removerprofissao(playerid){
- --profissao;
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- for(new c = 0; c <= 23; c++)
- {
- if(IsPlayerInVehicle(playerid, caminhao[c]) && profissao != 1)
- {
- SendClientMessage(playerid, -1, "voce nao e um caminhoneiro");
- RemovePlayerFromVehicle(playerid);
- break;
- }else if(IsPlayerInVehicle(playerid, taxi[c]) && profissao != 2)
- {
- SendClientMessage(playerid, -1, "voce nao e um taxista");
- RemovePlayerFromVehicle(playerid);
- break;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement