[Ajuda] Sistema de HS - nao tira totalmeta a vida.
#1

Bom, eu tenho um sistema de HS e ele nao quer tirar todo o dano.
eu acerto na cabeзa e ele tira apenas 99 de dano.

ele й um FS, eu pensei em mudar os danos no meu GM, porem se eu mexer neles, qualquer tiro vai usar esse valor.

me ajudem?


FS abaixo.

PHP Code:
#include <a_samp>
#define CAMERA_MOVE_TIME    5000
#define BODY_PART_HEAD      101 
PHP Code:
public OnFilterScriptInit()
{
    return 
1;

PHP Code:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponidbodypart)
{
    if(
weaponid == 34 && bodypart == BODY_PART_HEAD)
    {
        
SetPlayerArmedWeapon(playerid0);
        
TogglePlayerControllable(playerid0);
        new
            
Float:fOPos[3],
            
Float:fHPos[3],
            
Float:Angle,
            
Float:Speed,
            
object,
            
time
        
;
        
GetPlayerLastShotVectors(playeridfOPos[0], fOPos[1], fOPos[2], fHPos[0], fHPos[1], fHPos[2]);
        
GetPlayerFacingAngle(playeridAngle);
        
Speed VectorSize(fOPos[0]-fHPos[0], fOPos[1]-fHPos[1], fOPos[2]-fHPos[2]) / ( CAMERA_MOVE_TIME 1000 );
        
object CreatePlayerObject(playerid1636fOPos[0], fOPos[1], fOPos[2], 0.00.00.0);
        
SetObjectFacePoint(playeridobjectfHPos[0], fHPos[1]);
        
MovePlayerObject(playeridobjectfHPos[0], fHPos[1], fHPos[2], Speed);
        
SetTimerEx("CameraEnd"CAMERA_MOVE_TIMEfalse"i"playerid);
        
SetTimerEx("SparkCreate"CAMERA_MOVE_TIME-500false"ifffi",  playeridfHPos[0], fHPos[1], fHPos[2], object);
        
fHPos[0] -= (floatsin(-Angledegrees));
        
fHPos[1] -= (floatcos(-Angledegrees));
        
fOPos[0] += (floatsin(-Angledegrees));
           
fOPos[1] += (floatcos(-Angledegrees));
        
time CAMERA_MOVE_TIME floatround(CAMERA_MOVE_TIME 0.15floatround_round);
        
InterpolateCameraPos(playeridfOPos[0], fOPos[1], fOPos[2], fHPos[0], fHPos[1], fHPos[2], timeCAMERA_MOVE);
    }
    return 
1;

PHP Code:
forward CameraEnd(playerid);
public 
CameraEnd(playerid)
{
    
SetPlayerArmedWeapon(playerid34);
    
TogglePlayerControllable(playerid1);
    
SetCameraBehindPlayer(playerid);
}
forward SparkCreate(playeridFloat:XFloat:YFloat:Zobjectid);
public 
SparkCreate(playeridFloat:XFloat:YFloat:Zobjectid)
{
    
SetTimerEx("Spark"100false"i"CreateObject(18717XY1.60.00.00.0) );
    
DestroyPlayerObject(playeridobjectid);
}
forward Spark(objectid);
public 
Spark(objectidDestroyObject(objectid);
stock SetObjectFacePoint(playeridobjectidFloatXFloatY)
{
    static
        
FloatpX,      FloatoX,
        
FloatpY,      FloatoY,
        
FloatoZ
    
;
    
GetPlayerObjectRot(playeridobjectidoXoYoZ);
    
GetPlayerObjectPos(playeridobjectidpXpYoZ);
    
oZ = ( floatadd(atan2(floatsub(YpY), floatsub(XpX)), 270.0) );
    
SetPlayerObjectRot(playeridobjectidoXoYoZ);

quem puder, obrigado ai
Reply
#2

Ja tentou "matar" vc o player?

SetPlayerHealth(playerid, 0.0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)