death bug
#9

not working.it maybe from OnPlayerDamage from weapon config.because i have animation death

PHP код:
public OnPlayerDamage(&PID, &Float:amount, &issuerid, &weapon, &bodypart)
{
        if(
god_mode[PID])
            return 
0;
        if(
issuerid != INVALID_PLAYER_ID && bodypart == && !IsPlayerAdmin(PID))// I recommend defining bodyparts.
        
{
            if(
IsPlayerConnected(issuerid))
            {
                new 
string[100], pname[24];
                
GetPlayerName(PIDheadshotsizeof(headshot));
                
GetPlayerName(issueridpnamesizeof(pname));
                
format(stringsizeof(string), "%s(%i) was shot in the head by %s(%i)"headshot,PIDpnameissuerid);
                
scms(0x800000AA,string);
                
GameTextForPlayer(issuerid,"~r~HeadShot",2000,1);
                
//PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);// There is already a ding sound that you can play when someone gets shot.
                
GameTextForPlayer(PID,"~r~HeadShot",2000,1);
                
//ClearAnimations(PID);
                //ApplyAnimation(PID, "PED", "ko2", 4.1, 1, 1, 1, 1, 1, 1);// Redundant? People already play a custom animation when getting shot in the head and falling down in weapon-config.
                //PlayerPlaySound(PID, 17802, 0.0, 0.0, 0.0);// There is already a ding sound that you can play when someone gets shot.
                
GivePlayerMoney(issuerid1000);
                
GameTextForPlayer(PID,"~w~Wasted",500,2);
                
amount 0.0;// If you set the amount of damage to 0.0, it means that it kills the player. As is documented here: https://github.com/oscar-broman/samp-wea...1.66094754
                
return 1;//Returning 1 to make sure that the damage gets applied right away.
            
}
        }
        return 
1;

Reply


Messages In This Thread
death bug - by crukk11 - 05.08.2017, 04:30
Re: death bug - by MiyuUchiha - 05.08.2017, 04:32
Re: death bug - by crukk11 - 05.08.2017, 04:35
Re: death bug - by Sew_Sumi - 05.08.2017, 04:40
Re: death bug - by crukk11 - 05.08.2017, 04:45
Re: death bug - by MiyuUchiha - 05.08.2017, 04:53
Re: death bug - by crukk11 - 05.08.2017, 06:41
Re: death bug - by FailerZ - 05.08.2017, 07:09
Re: death bug - by crukk11 - 05.08.2017, 07:12
Re: death bug - by FailerZ - 05.08.2017, 07:17

Forum Jump:


Users browsing this thread: 1 Guest(s)