27.02.2017, 04:11
Alguйm poderia me ajudar com uma coisa? Outras pessoas podem e deveria usar isso...
Estava querendo fazer como no GTA V dependendo de como vc bate e voa da moto, vc morre (como na vida real XD)
Entгo eu pensei em pegar o dano do splat + velocidade = dano real, mas nгo estб funcionando bem assim:
Someone could help me to a thing? It should make servers more realists...
I was trying to set realists damage when fall to bike
So i tried to take splat + player speed to get a real damage, but is not work well
OnFoot damage is right, but when fall to bike damage return 2, only fucking 2
Why?
Estava querendo fazer como no GTA V dependendo de como vc bate e voa da moto, vc morre (como na vida real XD)
Entгo eu pensei em pegar o dano do splat + velocidade = dano real, mas nгo estб funcionando bem assim:
Someone could help me to a thing? It should make servers more realists...
I was trying to set realists damage when fall to bike
So i tried to take splat + player speed to get a real damage, but is not work well
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(weaponid == 54) { // danoqueda new speed = GetPlayerSpeedGambiarra(playerid); new danoqueda = floatround(amount) + floatround(speed); vida[playerid] -= danoqueda; }
Код:
// caindo de moto stock GetPlayerSpeedGambiarra(playerid) { if(playerid != INVALID_PLAYER_ID) { new Float:Pos[3],Float:PS; GetPlayerVelocity(playerid, Pos[0], Pos[1], Pos[2]); PS = floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200; return floatround(PS,floatround_round); } return INVALID_PLAYER_ID; }
Why?