Shooting X Crash . Difference
#1

Hi. I have a problem. Some cars have 'Airbag' when the player hits something, the player does not lose life if you have this equipment. And now I think of doing shielding shots for cars. I have not found a way to differentiate because the weapons fire has different value depending of the distance. I need find a way to life the player loses if the car being crashs even shielded.

Thanks

Reply
#2

Please i need assistance
Reply
#3

not possible to make, YET, cause it all uses colision, and we dont have callback OnVehicleDamage(vehicleid,colision_type)
Reply
#4

Get this
http://forum.sa-mp.com/index.php?topic=82583.0
and edit the OnPlayerHealthChange to work with vehicles
pawn Код:
OnVehicleHealthChange(veh, newhealth, oldhealth)
{
  loop thorugh players
  {
    if(isplayerinspecificcar)
    {
      SetPlayerHealth(playerid, 100);
    }
  }
}
Reply
#5

Quote:
Originally Posted by dice7
Get this
http://forum.sa-mp.com/index.php?topic=82583.0
and edit the OnPlayerHealthChange to work with vehicles
pawn Код:
OnVehicleHealthChange(veh, newhealth, oldhealth)
{
  loop thorugh players
  {
    if(isplayerinspecificcar)
    {
     SetPlayerHealth(playerid, 100);
   }
  }
}
The specification is not valid because the value changes with the distance and gun. Believe it would be like Tmastersa said, a OnVehicleDamage differentiating. Someone might have more suggestions?
Reply
#6

the bottom line is this

You can't really make anything bullet proof, the reason being is because the sync between the player, the vehicle, the other player, and the server differentiate between the distance to the player, the ping, and the server's connection.

If this was able to be made, there would be alot of lag within your gamemode / filterscript or maybe even your server.

But then again, they way dice7 said it, there would be a problem, theres no way to detect if someone is on the car and pressing the fire key to damage it, other than seeing if the person shot it.

- Just a few thoughts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)