If vehicle hp...
#1

Hi guys,i want do if a player is in a hydra or hunter and the vehicle has -250 hp,it will show a message to all players.

How?
Reply
#2

-250 HP ?
i think it will explode already at 0 HP, what do you mean exactly ?
Reply
#3

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Hi guys,i want do if a player is in a hydra or hunter and the vehicle has -250 hp,it will show a message to all players.

How?
pawn Код:
if(GetVehicleModel(vehicleid) == 520 || if(GetVehicleModel(vehicleid) == 425))
{
    new Float:health;
    new car;
    car = GetPlayerVehicleID(playerid);
    GetVehicleHealth(car, health)
if{health < 250) return SendClientMessageToAll(COLOR, "Text");
}
Not Tested, Should work.
Reply
#4

Quote:
Originally Posted by itachi4x4
Посмотреть сообщение
pawn Код:
if(GetVehicleModel(vehicleid) == 520 || if(GetVehicleModel(vehicleid) == 425))
{
    new Float:health;
    new car;
    car = GetPlayerVehicleID(playerid);
    GetVehicleHealth(car, health)
if{health < 250) return SendClientMessageToAll(COLOR, "Text");
}
Not Tested, Should work.
Thanks,where i can place this code? OnPlayerEnterVehicle?
Reply
#5

If you put it under OnPlayerEnterVehicle the player will see the message when he hops in the vehicle, And i don't think you can have -250 hp the Vehicle will just blow up and respawn.
Reply
#6

if the vehicle has 250 HP when it gets streamed in, it will explode. i presume you want that a player gets his vehicle damaged by another player (250-1000 HP, shot down to <250, then the message)? then
Код:
OnVehicleDamageStatusUpdate
is the callback you need...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)