SA-MP Forums Archive
[Ajuda] ao entrar no carro aparecer mensagem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] ao entrar no carro aparecer mensagem (/showthread.php?tid=486631)



ao entrar no carro aparecer mensagem - GustavoG3D - 09.01.2014

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!");
        }
    }
} 



Re: Ajuda ao entrar no carro aparecer mensagem - yNexus - 09.01.2014

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



Re: Ajuda ao entrar no carro aparecer mensagem - GustavoG3D - 09.01.2014

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
. 



Re : Ajuda ao entrar no carro aparecer mensagem - IGp - 09.01.2014

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");



Re: Ajuda ao entrar no carro aparecer mensagem - yNexus - 09.01.2014

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");