[Ajuda] Veiculo Para Prof
#1

EAI Pessoal Vim pedir ajuda nessa programaзгo

tipo eu criei um programaзгo para cada veiculo ser de uma prof mais quando o play de outra prof entra no carro de outra num acontece nada

exemplo: Sу Taxisista E entro no veiculo da Pm
quero que seja pm para viatura e taxisista para taxi

programaзгo

PHP код:
new VPMilitar[5];
forward VerificarVeiculo(playerid);
public 
VerificarVeiculo(playerid)
{
    for(new 
0<= 4c++)
    {
    
        if(
IsPlayerInVehicle(playeridVPMilitar[c]) && (PlayerInfo[playerid][Profissao] != Policia_Militar) < 1)//545454
        
{
            
SendClientMessage(playerid, -0"Vocк nгo й da Policia Militar");
            
RemovePlayerFromVehicle(playerid);
            return 
1;
        }
    }
    return 
1;

PHP код:
 VPMilitar[0] = CreateVehicle(596,1535.9000000,-1678.4000000,13.2000000359.5000000, -1, -115); //Veiculo numero 0
    
VPMilitar[1] = CreateVehicle(596,1535.8000000,-1666.9000000,13.2000000,0.0000000,-1,-1,15); //Veiculo numero 1
    
VPMilitar[2] = CreateVehicle(596,1573.2000000,-1611.8000000,13.2000000,180.0000000,-1,-1,15); //Veiculo numero 2
    
VPMilitar[3] = CreateVehicle(596,1568.2000000,-1611.8000000,13.2000000,180.0000000,-1,-1,15); //Veiculo numero 3 
como a prof foi criada

PHP код:
#define Policia_Militar 11 
PHP код:
enum pInfo {
    
Profissao
    

PHP код:
enum pInfo {
    
Profissao
    

qual e o erro obs nem um erro no pawn
Reply
#2

Vocк chama a funзгo VerificarVeiculo alguma vez?
Reply
#3

acho que nгo ta chamando
Reply
#4

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER// Player entered a vehicle as a driver
    
{
        
VerificarVeiculo(playerid);
    }
    return 
1;

Reply
#5

ei mexi nos codico agora deu esse erro ajuda

Quote:

C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(81) : warning 201: redefinition of constant/macro (symbol "pInfo")
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(84) : error 021: symbol already defined: "Profissao"
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(103) : error 001: expected token: ")", but found "["
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(103) : error 029: invalid expression, assumed zero
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(103) : warning 215: expression has no effect
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(103) : error 001: expected token: ";", but found "]"
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(103) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

linha
81 a 84
Quote:

enum pInfo {
Profissao

}

Quote:

if(IsPlayerInVehicle(playerid, VPMilitar[c]) && VPMilitar[playerid][Policia_Militar] < 1)

Reply
#6

Um dos erros й que vocк tem a enum pInfo duas vezes no seu GameMode.

Код:
enum pInfo {
Profissao

}
Apague isso do seu GameMode, e coloque "Profissao" no pInfo jб existente.
Reply
#7

vlw Nixtren
ajudem no errro
linha
Quote:

if(IsPlayerInVehicle(playerid, VPMilitar[c]) && (PlayerInfo[playerid][Profissao] != Policia_Militar) < 1)

erro
Quote:

C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(100) : error 017: undefined symbol "PlayerInfo"
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(100) : fatal error 107: too many error messages on one line

Reply
#8

tem new PlayerInfo[MAX_PLAYERS][pInfo]; apуs a enum?
Reply
#9

nгo tinha mais acabei de botar mais deu esses erro
Quote:

C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(102) : warning 213: tag mismatch
C:\Users\alexandre\Desktop\gm\samp037_svr_R1_win32 \gamemodes\BVR.pwn(407) : error 021: symbol already defined: "OnPlayerStateChange"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#10

Vocк colocou 2 publics OnPlayerStateChange nгo?
Reply


Forum Jump:


Users browsing this thread: