[Ajuda] ao entrar no carro aparecer mensagem
#1

Bem alguem me ajuda? a entrar no carro e o carro ta desligado
e aparecer uma mensagem

/ligar para ligar o veiculo
alguem ajuda?

comandos
PHP код:
if(!strcmp("/ligar", cmdtext, true, 10)) {
    new 
Params[7], Veh = GetPlayerVehicleID(playerid);
    if(
Veh) {
        if(!
CarOff[Veh]) {
            
CarOff[Veh] = true;
            
GetVehicleParamsEx(Veh, Params[0], Params[1], Params[2], Params[3], Params[4], Params[5], Params[6]);
            
SetVehicleParamsEx(Veh, VEHICLE_PARAMS_ON, Params[1], Params[2], Params[3], Params[4], Params[5], Params[6]);
            
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
        }
    }
} 
Reply
#2

Vai nessa public
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) 
e poem essa linha
PHP код:
SendClientMessage(playerid, -1 "Para ligar seu veiculo utilize /ligar"); 
Reply
#3

Deu esses erros
PHP код:
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\pawno\include\servermoneyGM.inc(84) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : error 001: expected token: ",", but found "-string-"
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : warning 215: expression has no effect
C
:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : error 001: expected token: ";", but found ")"
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : error 029: invalid expression, assumed zero
C
:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : 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
. 
Reply
#4

Procure no CTRL+F por:
pawn Код:
public OnPlayerEnterVehicle
E coloque isto depois da primeira chave :
pawn Код:
SendClientMessage(playerid, -1, "Para ligar seu veнculo, digite /ligar");
Reply
#5

Quote:
Originally Posted by GustavoG3D
Посмотреть сообщение
Deu esses erros
PHP код:
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\pawno\include\servermoneyGM.inc(84) : warning 201: redefinition of constant/macro (symbol "OnGameModeInit")
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : error 001: expected token: ",", but found "-string-"
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : warning 215: expression has no effect
C
:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : error 001: expected token: ";", but found ")"
C:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : error 029: invalid expression, assumed zero
C
:\Users\Gustavo3-Samsung\Desktop\SPS LS\gamemodes\SPSLS.pwn(6238) : 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
. 
A sim, desculpa escrevi errado, primeiramente atualize sua include
PHP код:
servermoneyGM 
e troque a mensagem que te mandei por essa
PHP код:
SendClientMessage(playerid, -1, "Para ligar o veiculo utilize /ligar"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)