Onplayerdeath actors
#1

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
        if(!
IsPlayerNPC(playerid))
        {
            new 
name[24], kname[30], string[64];
            new 
gunname[32], playername[MAX_PLAYER_NAME 1], killername[MAX_PLAYER_NAME 1];
            
GetWeaponName(reasongunnamesizeof(gunname));
            
GetPlayerName(playeridname24);
            
GetPlayerName(killeridkname30);
             
format(stringsizeof(string), "%s has wasted %s using a %s."killernameplayernamegunname);
            
SendMessageToAllAdmins(string, -1);
            
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
            
Deathactor CreateActor("%s""%s""%s""%s"), pSkin(playerid), Float:xFloat:yFloat:z);
            
ApplyActorAnimation(Deathactor"WUZI","CS_Dead_Guy",4.1,1,1,1,1,0,1);
        }

Could this work? When player dies, actor spawns with his initial coords and via anim


if yes, how can i remove the actor after 5 seconds ?(5000 ms)
Reply


Messages In This Thread
Onplayerdeath actors - by Zeus666 - 24.09.2018, 16:32
Re: Onplayerdeath actors - by CantBeJohn - 24.09.2018, 16:53
Re: Onplayerdeath actors - by Zeus666 - 24.09.2018, 16:59
Re: Onplayerdeath actors - by VVWVV - 24.09.2018, 17:03
Re: Onplayerdeath actors - by Zeus666 - 24.09.2018, 17:07
Re: Onplayerdeath actors - by VVWVV - 24.09.2018, 17:10
Re: Onplayerdeath actors - by Zeus666 - 24.09.2018, 17:12
Re: Onplayerdeath actors - by Zeus666 - 24.09.2018, 17:30
Re: Onplayerdeath actors - by UFF - 24.09.2018, 17:51
Re: Onplayerdeath actors - by VVWVV - 24.09.2018, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)