[Ajuda] Velocimetro nao ativa
#1

entro dentro do veiculo creio eu que era pra ativar mass nao sei

Код:
//==============================================================================
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
	TextDrawShowForPlayer(playerid, Velocimetro);
	if(Nitro(vehicleid)) {
		AddVehicleComponent(vehicleid, 1010);
	}
	if(!ispassenger && IsVehicleOccupied(vehicleid))
	{
		AddVehicleComponent(vehicleid, 1010);
	}
	SendClientMessage(playerid, -1, "{3cff00}[CBD]{FFFFFF} Nгo tente roubar veнculos, vocк morrerб automaticamente{FF0000}.");
	if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid,0.0);
	return 1;
}

//==============================================================================
public OnPlayerExitVehicle(playerid, vehicleid)
{
	TextDrawShowForPlayer(playerid, Velocimetro);
	return 1;
}
//==============================================================================
Reply
#2

Faz assim
PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
        if(
newstate == PLAYER_STATE_DRIVER)
        {
            
TextDrawShowForPlayer(playeridVelocimetro);
        }
        return 
1;

PHP код:
public OnPlayerExitVehicle(playeridvehicleid)
{
    
TextDrawShowForPlayer(playeridVelocimetro); // Aqui ta pra mostrar a textdraw... 
        /// correto seria TextDrawHideForPlayer
    
return 1;

Reply
#3

fiz outra coisa no code e agora ta dando esse erro ele ainda naot ava ativando ae peguei outro codigo na net, e mesmo assim nao ta pegando

Код:
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : error 001: expected token: ",", but found "["
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : error 029: invalid expression, assumed zero
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : warning 215: expression has no effect
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : error 001: expected token: ";", but found "]"
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : fatal error 107: too many error messages on one line

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

Quote:
Originally Posted by VinnyScript
Посмотреть сообщение
fiz outra coisa no code e agora ta dando esse erro ele ainda naot ava ativando ae peguei outro codigo na net, e mesmo assim nao ta pegando

Код:
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : error 001: expected token: ",", but found "["
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : error 029: invalid expression, assumed zero
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : warning 215: expression has no effect
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : error 001: expected token: ";", but found "]"
C:\Users\Vinny3D\Desktop\samp03z_svr_R4_win32\samp03z_svr_R4_win32\gamemodes\CBD.pwn(813) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Posta a Linha 813 Jovem..
Reply
#5

Cara, vocк estб criando/modificando sistemas sem nem saber o que estб fazendo? Veja tutoriais, vнdeos aulas - aqui no Fуrum existe muitos.

Velocimetro[playerid] ?
Reply
#6

Vocк deve esta criando uma variбvel e estб atribuindo algo a ela de uma forma errфnea.
Exemplo:

PHP код:
new Vel;

Vel[playerid] = 5
Se vocк estб fazendo algo relacionado relacionado a isso, deverб usar:
PHP код:
new Vel[MAX_PLAYERS];

Vel[playerid] = 5
Espero que tenha entendido, abraзos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)