SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 27/04/2020, 01:31 AM   #1
pjfPedro
Big Clucker
 
Join Date: Apr 2020
Location: Santa Catarina
Posts: 85
Reputation: 0
Default veiculo profissao

como faço para ver se o player que esta entrando no veiculo de uma profissao é dessa profissao?

eu fiz isso:
PHP Code:
if (GetPlayerVehicleID(playerid) == caminhao[0])
    {
        if(
GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
            {
            if(
Player[playerid][Profissao]!=1)
                {
                
ClearAnimations playerid ) ;
                 
RemovePlayerFromVehicle(playerid);
                 
SendClientMessage(playerid,COR_VERMELHO,"Você não é um Caminhoneiro");
                }
            }
    } 
PHP Code:
new caminhao[23];

//////////vaiculos
public OnFilterScriptInit()
{
    
caminhao[0] = CreateVehicle(4032778.1956, -2376.827114.105190.000011100);
    
caminhao[1] = CreateVehicle(4032759.2173, -2375.741514.1051, -90.180011100);
    
caminhao[2] = CreateVehicle(4032759.2842, -2372.063014.1051, -90.000011100);
    
caminhao[3] = CreateVehicle(4032759.4177, -2368.599114.1051, -90.060011100);
    
caminhao[4] = CreateVehicle(4032759.2805, -2364.922614.1051, -90.060011100);
    
caminhao[5] = CreateVehicle(4032759.3254, -2361.092814.1051, -90.000011100);
    
caminhao[6] = CreateVehicle(4032759.5269, -2357.420714.1051, -90.000011100);
    
caminhao[7] = CreateVehicle(4032759.5083, -2353.450414.1051, -90.240011100);
    
caminhao[8] = CreateVehicle(4032759.6807, -2349.339614.1051, -90.000011100);
    
caminhao[9] = CreateVehicle(4032759.9221, -2345.439514.1051, -90.000011100);
    
caminhao[10] = CreateVehicle(4032759.8955, -2341.316714.1051, -90.060011100);
    
caminhao[11] = CreateVehicle(4032760.0535, -2337.039614.1051, -90.000011100);
    
caminhao[12] = CreateVehicle(4032759.3333, -2379.268314.1051, -90.000011100);
    
caminhao[13] = CreateVehicle(4032778.0913, -2381.075014.105190.000011100);
    
caminhao[14] = CreateVehicle(4032777.8953, -2387.481214.105190.000011100);
    
caminhao[15] = CreateVehicle(4032777.9941, -2384.305214.105190.000011100);
    
caminhao[16] = CreateVehicle(4032777.5559, -2395.318414.105190.000011100);
    
caminhao[17] = CreateVehicle(4032777.4539, -2398.809314.105190.000011100);
    
caminhao[18] = CreateVehicle(4032777.3525, -2402.245614.105190.000011100);
    
caminhao[19] = CreateVehicle(4032777.6592, -2391.816714.105190.000011100);
    
caminhao[20] = CreateVehicle(4032775.9270, -2418.251214.105190.000011100);
    
caminhao[21] = CreateVehicle(4032774.7324, -2455.206514.105190.000011100);
    
caminhao[22] = CreateVehicle(4032774.7046, -2493.558114.105190.000011100); 
da esses erros
Code:
E:\sampser\gamemodes\rpgm.pwn(500) : error 017: undefined symbol "caminhao"
E:\sampser\gamemodes\rpgm.pwn(500) : warning 215: expression has no effect
E:\sampser\gamemodes\rpgm.pwn(500) : error 001: expected token: ";", but found "]"
E:\sampser\gamemodes\rpgm.pwn(500) : error 029: invalid expression, assumed zero
E:\sampser\gamemodes\rpgm.pwn(500) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
desculpa por estar postando muitos threads no forum é que é a parte que mais tenho dificuldade
__________________
BRASIL RPG:
https://forum.sa-mp.com/showthread.php?t=674651

Last edited by JonathanFeitosa; 28/04/2020 at 01:33 PM.
pjfPedro is offline   Reply With Quote
Old 27/04/2020, 01:41 AM   #2
pjfPedro
Big Clucker
 
Join Date: Apr 2020
Location: Santa Catarina
Posts: 85
Reputation: 0
Default Re: veiculo profissao

Quote:
Originally Posted by RayanSanty View Post
No topo da sua gamemode coloque:

PHP Code:
new caminhao[24]; 
eu coloquei já
__________________
BRASIL RPG:
https://forum.sa-mp.com/showthread.php?t=674651
pjfPedro is offline   Reply With Quote
Old 27/04/2020, 01:44 AM   #3
RayanSanty
Big Clucker
 
RayanSanty's Avatar
 
Join Date: Aug 2018
Location: Brazil
Posts: 146
Reputation: 1
Default Re: veiculo profissao

Tente usar isto

PHP Code:
forward IsACaminhao(playerid);
public 
IsACaminhao(carid)
{
    if((
carid >= caminhao[0]) && (carid <= caminhao[sizeof(caminhao)-1]))
    {
        return 
true;
    }
    return 
0;

__________________
Fatal Life Roleplay
RayanSanty is offline   Reply With Quote
Old 27/04/2020, 01:45 AM   #4
Hatiro
Huge Clucker
 
Hatiro's Avatar
 
Join Date: Mar 2019
Posts: 383
Reputation: 10
Default Re: veiculo profissao

pjfPedro uma duvida ta faltando uma chave nessa parte do código '}'
Code:
new caminhao[23];

//////////vaiculos
public OnFilterScriptInit()
{
    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); 
//aqui
Hatiro is offline   Reply With Quote
Old 27/04/2020, 01:47 AM   #5
RayanSanty
Big Clucker
 
RayanSanty's Avatar
 
Join Date: Aug 2018
Location: Brazil
Posts: 146
Reputation: 1
Default Re: veiculo profissao

Quote:
Originally Posted by Hatiro View Post
pjfPedro uma duvida ta faltando uma chave nessa parte do código '}'
Code:
new caminhao[23];

//////////vaiculos
public OnFilterScriptInit()
{
    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); 
//aqui
Acho que não, ele não deve ter postado o código completo, senão os erros seriam outros...
__________________
Fatal Life Roleplay
RayanSanty is offline   Reply With Quote
Old 27/04/2020, 01:48 AM   #6
pjfPedro
Big Clucker
 
Join Date: Apr 2020
Location: Santa Catarina
Posts: 85
Reputation: 0
Default Re: veiculo profissao

Quote:
Originally Posted by Hatiro View Post
pjfPedro uma duvida ta faltando uma chave nessa parte do código '}'
Code:
new caminhao[23];

//////////vaiculos
public OnFilterScriptInit()
{
    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); 
//aqui
não
é que temmais coisas depois
__________________
BRASIL RPG:
https://forum.sa-mp.com/showthread.php?t=674651
pjfPedro is offline   Reply With Quote
Old 27/04/2020, 01:54 AM   #7
pjfPedro
Big Clucker
 
Join Date: Apr 2020
Location: Santa Catarina
Posts: 85
Reputation: 0
Default Re: veiculo profissao

Quote:
Originally Posted by RayanSanty View Post
Tente usar isto

PHP Code:
forward IsACaminhao(playerid);
public 
IsACaminhao(carid)
{
    if((
carid >= caminhao[0]) && (carid <= caminhao[sizeof(caminhao)-1]))
    {
        return 
true;
    }
    return 
0;

não entendi é tipo isso?

Code:
stock IsABike(carid)
{
    if(carid==522||carid==521||carid==468||carid==581||carid==461||carid==463||carid==586||carid==523||carid==462)
    {
        return 1;
    }

    return 0;
}
__________________
BRASIL RPG:
https://forum.sa-mp.com/showthread.php?t=674651
pjfPedro is offline   Reply With Quote
Old 27/04/2020, 02:14 AM   #8
pjfPedro
Big Clucker
 
Join Date: Apr 2020
Location: Santa Catarina
Posts: 85
Reputation: 0
Default Re: veiculo profissao

eu troque do onplayerenterveicle para onplayerstatechange
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate==PLAYER_STATE_DRIVER)
    {
        if (GetPlayerVehicleID(playerid) == caminhao[0])
        {
            if(Player[playerid][Profissao]!=1)
            {
                ClearAnimations ( playerid ) ;
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid,COR_VERMELHO,"Você não é um Caminhoneiro");
            }
        }

    }

    return 1;
}
__________________
BRASIL RPG:
https://forum.sa-mp.com/showthread.php?t=674651
pjfPedro is offline   Reply With Quote
Old 27/04/2020, 02:52 AM   #9
Hatiro
Huge Clucker
 
Hatiro's Avatar
 
Join Date: Mar 2019
Posts: 383
Reputation: 10
Default Re: veiculo profissao

pjfPedro faz assim
Code:
#define MAX_CARROS_ORG 23//definir o número de carros da org
new caminhao[MAX_CARROS_ORG];
Code:
public OnFilterScriptInit()
{
    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;
}
proximo
Code:
new profissao = 0; // fiz isso para simular o PlayerInfo[playerid][IdDaOrg]
Code:
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;
        }
    }
  return 1;
}
edit: se quiser adicionar mais organização/profissão segui o exemplo https://pastebin.com/0e27tER1
creditos: https://forum.sa-mp.com/showthread.php?t=395339
Hatiro is offline   Reply With Quote
Old 27/04/2020, 11:27 AM   #10
pjfPedro
Big Clucker
 
Join Date: Apr 2020
Location: Santa Catarina
Posts: 85
Reputation: 0
Default Re: veiculo profissao

Quote:
Originally Posted by Hatiro View Post
pjfPedro faz assim
Code:
#define MAX_CARROS_ORG 23//definir o número de carros da org
new caminhao[MAX_CARROS_ORG];
Code:
public OnFilterScriptInit()
{
    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;
}
proximo
Code:
new profissao = 0; // fiz isso para simular o PlayerInfo[playerid][IdDaOrg]
Code:
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;
        }
    }
  return 1;
}
edit: se quiser adicionar mais organização/profissão segui o exemplo https://pastebin.com/0e27tER1
creditos: https://forum.sa-mp.com/showthread.php?t=395339

ele ainda da um erro
Code:
undefined symbol "caminhao"
__________________
BRASIL RPG:
https://forum.sa-mp.com/showthread.php?t=674651
pjfPedro is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Salvar veiculo setado para profissao Bigdk Português/Portuguese 0 22/04/2015 03:47 AM
[Ajuda] Setar veiculo para profissao Bigdk Português/Portuguese 9 20/04/2015 05:16 PM
[Ajuda] Veículo Privado de Profissão Fodinha102030 Português/Portuguese 5 06/09/2013 11:38 PM
[PEDIDO] Criar veiculo exclusivo para tal profissão Chis Português/Portuguese 6 26/01/2012 09:56 PM


All times are GMT. The time now is 09:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.