[Ajuda] Como fazer pra pegar danos causados em veiculo
#1

Queria pegar danos causados num veiculo para evitar ataques entre pessoas do msm time

Tipo
Код:
if(motorista[carroantigido] й da ORG 1 && atirador й da org 1) {
	fun_tapa(atirador);
}
Reply
#2

Seria algo mais ou menos assim:

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == BULLET_HIT_TYPE_VEHICLE) {
        foreach(
Player,i) {
            if(
IsPlayerInAnyVehicle(i)) {
                if(
GetPlayerVehicleID(i) == hitid) {
                    if(
GetPlayerState(i) == PLAYER_STATE_DRIVER) {
                        if(
/*var org (i) == var org (playerid)*/) {
                            
fun_tapa(playerid);
                        }
                    }
                }
            }
        }
    }
    return 
1;

Reply
#3

https://sampforum.blast.hk/showthread.php?tid=488223
Reply
#4

Quote:
Originally Posted by Lуs
Посмотреть сообщение
Seria algo mais ou menos assim:

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == BULLET_HIT_TYPE_VEHICLE) {
        foreach(
Player,i) {
            if(
IsPlayerInAnyVehicle(i)) {
                if(
GetPlayerVehicleID(i) == hitid) {
                    if(
GetPlayerState(i) == PLAYER_STATE_DRIVER) {
                        if(
/*var org (i) == var org (playerid)*/) {
                            
fun_tapa(playerid);
                        }
                    }
                }
            }
        }
    }
    return 
1;

Era nessa callback msm, vlw +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)