[Ajuda] Mesma Tecla 2 Funзхes.
#2

Й sу usar Uma variavel

Exemplo
PHP код:

      
if ((newkeys == 256 )) // Q para ligar o carro.
    
{
        if (
IsPlayerInAnyVehicle(playerid) & motor[playerid] == 0)
        {
            new 
motlualarporcappormaob;
            new 
carro GetPlayerVehicleID(playerid);
            if (
carro != INVALID_VEHICLE_ID)
            
GetVehicleParamsEx(carromotlualarporcappormaob);
            
SetVehicleParamsEx(carro1lualarporcappormaob);
            
motor[playerid] = 1;
            
SendClientMessage(playerid, -1"Veiculo {2F991A}Ligado!");
            return 
true;
        }
    }
      if ((
newkeys == 256 )) // Q para ligar o carro.
    
{
        if (
IsPlayerInAnyVehicle(playerid) & motor[playerid] == 1)
        {
            new 
motlualarporcappormaob;
            new 
carro GetPlayerVehicleID(playerid);
            if (
carro != INVALID_VEHICLE_ID)
            
GetVehicleParamsEx(carromotlualarporcappormaob);
            
SetVehicleParamsEx(carro0lualarporcappormaob);
            
motor[playerid] = 0;
            
SendClientMessage(playerid, -1"Veiculo {E31919}Desligado!");
            return 
true;
        }
    }
      if ((
newkeys == 132 )) // Ctrl para Ligar o Farol.
    
{
        if (
IsPlayerInAnyVehicle(playerid) & luz[playerid] == 0)
        {
            new 
motlualarporcappormaob;
            new 
carro GetPlayerVehicleID(playerid);
            if (
carro != INVALID_VEHICLE_ID)
            
GetVehicleParamsEx(carromotlualarporcappormaob);
            
SetVehicleParamsEx(carromot1alarporcappormaob);
            
luz[playerid] = 1;
            
SendClientMessage(playerid, -1"Farol {2F991A}Ligado!");
            return 
true;
        }
    }
      if ((
newkeys == 132 )) // Ctrl para Ligar o Farol.
    
{
        if (
IsPlayerInAnyVehicle(playerid) & luz[playerid] == 1)
        {
            new 
motlualarporcappormaob;
            new 
carro GetPlayerVehicleID(playerid);
            if (
carro != INVALID_VEHICLE_ID)
            
GetVehicleParamsEx(carromotlualarporcappormaob);
            
SetVehicleParamsEx(carromot0alarporcappormaob);
            
luz[playerid] = 0;
            
SendClientMessage(playerid, -1"Farol {E31919}Desligado!");
            return 
true;
        }
    } 
Reply


Messages In This Thread
Mesma Tecla 2 Funзхes. - by Lucas-Fc - 04.12.2012, 22:58
Re: Mesma Tecla 2 Funзхes. - by Schocc - 04.12.2012, 23:07
Re: Mesma Tecla 2 Funзхes. - by Lucas-Fc - 04.12.2012, 23:10
Re: Mesma Tecla 2 Funзхes. - by Dolby - 04.12.2012, 23:12
Re: Mesma Tecla 2 Funзхes. - by Schocc - 04.12.2012, 23:20
Re: Mesma Tecla 2 Funзхes. - by Dolby - 04.12.2012, 23:23
Re: Mesma Tecla 2 Funзхes. - by Lucas-Fc - 04.12.2012, 23:25
Re: Mesma Tecla 2 Funзхes. - by Schocc - 04.12.2012, 23:36
Re: Mesma Tecla 2 Funзхes. - by Lucas-Fc - 04.12.2012, 23:47
Re: Mesma Tecla 2 Funзхes. - by ViniBorn - 05.12.2012, 00:10

Forum Jump:


Users browsing this thread: 5 Guest(s)