[Ajuda] Danificar carro desocupado!
#1

Precisava saber como detectar um player atirando no carro para tirar vida deste carro, se alguйm puder ajudar
E tambйm, sу que mais difнcil, detectar o assassino do player que estava no veiculo e morreu com a explosгo do veнculo causada pelo assassino.
Reply
#2

tenta usar OnPlayerWeaponShot para tirar vida do carro ao tomar tiro sem ninguйm dentro.
https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot
Reply
#3

Ah, boa, nгo sabia que dava pra detectar se atirou em veнculo! Vlw!
Reply
#4

igual o amigo acima falou , use: https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot , uma base ficara assim !

PHP код:
public OnPlayerWeaponShotplayeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ )
{
        if(
hittype BULLET_HIT_TYPE_VEHICLE// Ao acertar qualquer veiculo com tiro
        
{
            
SetVehicleHealth(hitid7); // ele irб comeзar a pegar FOGO.
        
}
        return 
1;

Reply
#5

igual o amigo acima falou , use: https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot , uma base ficara assim !

PHP код:
public OnPlayerWeaponShotplayeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ )
{
        if(
hittype BULLET_HIT_TYPE_VEHICLE// Ao acertar qualquer veiculo com tiro
        
{
            
SetVehicleHealth(hitid7); // ele irб comeзar a pegar FOGO.
        
}
        return 
1;

Reply
#6

Quote:
Originally Posted by Coringa_Vilao
Посмотреть сообщение
igual o amigo acima falou , use: https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot , uma base ficara assim !

PHP код:
public OnPlayerWeaponShotplayeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ )
{
        if(
hittype BULLET_HIT_TYPE_VEHICLE// Ao acertar qualquer veiculo com tiro
        
{
            
SetVehicleHealth(hitid7); // ele irб comeзar a pegar FOGO.
        
}
        return 
1;

Tem como fazer o veiculo ficar pegando fogo, tipo a vida do veiculo parar em 7 ?
Reply
#7

Quote:
Originally Posted by WKhalifa
Посмотреть сообщение
Tem como fazer o veiculo ficar pegando fogo, tipo a vida do veiculo parar em 7 ?
vocк testou a base acima ?
Reply
#8

Erros
Код:
C:\Los Angeles CRP\gamemodes\LA.pwn(773) : warning 235: public function lacks forward declaration (symbol "OnPlayerWeaponShot")
C:\Los Angeles CRP\gamemodes\LA.pwn(775) : warning 211: possibly unintended assignment
C:\Los Angeles CRP\gamemodes\LA.pwn(775) : error 017: undefined symbol "BULLET_HIT_TYPE_VEHICLE"
Reply
#9

includes atualizadas ?
Reply
#10

ARRUMADO
Carro feiz Kabum
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)