SA-MP Forums Archive
[Ajuda] Como colocar nitro nos carros no samp??? - 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] Como colocar nitro nos carros no samp??? (/showthread.php?tid=493804)



Como colocar nitro nos carros no samp??? - ces123 - 09.02.2014

eu queria colocar nitro no sampalguem sabe colocareu ja procurei mais nao achei na net!!!!


Re: Como colocar nitro nos carros no samp??? - brunox - 09.02.2014

AddVehicleComponent


Re: Como colocar nitro nos carros no samp??? - PT - 09.02.2014

pawn Код:
AddVehicleComponent(vehicle, 1010); // nitro x10



Respuesta: Como colocar nitro nos carros no samp??? - ces123 - 09.02.2014

aonde eu coloco esse codigo??


Re: Como colocar nitro nos carros no samp??? - Leopawno - 09.02.2014

new gTAXI;

public OnGameModeInit()
{
gTAXI = AddStaticVehicle(420, -2482.4937, 2242.3936, 4.6225, 179.3656, 6, 1); // Taxi
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if (GetPlayerVehicleID(playerid) == gTAXI)
{
AddVehicleComponent(gTAXI, 1010); // Nitro
SendClientMessage(playerid, 0xFFFFFFAA, "Nitro added to the Taxi.");
}
}
return 1;
}



Esse й um exemplo do wiki samp


Re: Como colocar nitro nos carros no samp??? - lucas_mdr1235 - 10.02.2014

Exemplo de uso em Comando Strtok
PHP код:
if(strcmp(cmd"/colocarnitro"true) == 0)
{
    if(
IsPlayerInAnyVehicle(playerid))
    {
        if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1"Voce nгo e o motorista ! ! !");
        new 
getcarid;
        
getcarid GetPlayerVehicleID(playerid);
        
AddVehicleComponent(getcarid1010);
        
SendClientMessage(playerid, -1"**** Nitro 10X adicionado ao veiculo ! ! !");
    }
    else
    {
        
SendClientMessage(playerid, -1"**** Voce nao esta no veiculo ! ! !");
    }
    return 
1;

uso da fuзгo "AddVehicleComponent" >> https://sampwiki.blast.hk/wiki/Function:AddVehicleComponent
os componentes que podem ser adicionados aos carros >> https://sampwiki.blast.hk/wiki/Car_Component_ID