OnPlayerDeath Glitch (+rep)
#3

Try this o.o
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
SetPVarInt(playerid"Delay"GetCount()+5000);
    new 
string[128],sendername[MAX_PLAYER_NAME],Float:X,Float:Y,Float:Z;
    
GetPlayerPos(playerid,X,Y,Z);
    
DeletePVar(playerid,"CrackTime"), DeletePVar(playerid,"Wound");
    
DeletePVar(playerid,"RamHouse"), DeletePVar(playerid,"RamVehicle");
    
DeletePVar(playerid,"Bomb");
    if(
GetPVarInt(playerid,"HavingBall") != 0Baller 999SetPlayerWorldBounds(playerid4507.66, -2989.5362989.536, -4274.103), DeletePVar(playerid,"HavingBall"), DeletePVar(playerid,"BallAnim");
    if(
GetPVarInt(playerid"Tut") == 0)
    {
        if(
IsPlayerConnected(killerid))
        {
            
format(stringsizeof(string), "KILL: %s has killed %s with a %s in the tutorial area."PlayerName(killerid), PlayerName(playerid), GunNames[reason]);
            
SendAdminMessage(0xAA3333AA,string);
            
KillLog(string);
        }
        return 
1;
    }
    if(
GetPVarInt(playerid"Mobile") != 501)
    {
        if(
IsPlayerConnected(GetPVarInt(playerid"Mobile")) && GetPVarInt(GetPVarInt(playerid"Mobile"), "Mobile") == playerid)
        {
            
SendClientMessage(GetPVarInt(playerid"Mobile"),COLOR_GREY,"The phone line went dead...");
            if(
GetPlayerSpecialAction(GetPVarInt(playerid"Mobile")) == SPECIAL_ACTION_USECELLPHONESetPlayerSpecialAction(GetPVarInt(playerid"Mobile"), SPECIAL_ACTION_STOPUSECELLPHONE);
            
SetPVarInt(GetPVarInt(playerid"Mobile"), "Mobile"501);
        }
        
SetPVarInt(playerid"Mobile"501);
    }
    
SetPVarInt(playerid"Drag"501); DeletePVar(playerid,"RamHouse"); DeletePVar(playerid,"RamHouseID");
    if(
GetPVarInt(playerid"AFK") == 1)
    {
        
format(stringsizeof(string), "AdmCmd: %s was admin jailed by Admin Project-Bot Reason:[Deathmatch]."PlayerName(killerid));
        
SendClientMessageToAll(COLOR_LIGHTREDstring);
        
SetPVarInt(killerid"Jailed"2);
        
SetPVarInt(killerid"JailTime"60*60);
        
strmid(PlayerInfo[killerid][pJailReason], "Deathmatch"0strlen("Deathmatch"), 255);
        
SendClientMessage(killeridCOLOR_WHITE"You are jailed for 60 minutes.");
        
SetPlayerPos(killerid,2523.9197,-1673.8944,14.8589);
        
TogglePlayerControllableEx(killeridfalse);
        
SetPlayerInterior(killerid0);
        
SetPlayerVirtualWorld(killeridkillerid);
        
SetPVarInt(killerid"Jails"GetPVarInt(killerid"Jails")+1);
        
SetPVarInt(killerid"Mute"1);
        return 
1;
    }
    if(
killerid != 501)
    {
        if(
IsPlayerConnected(killerid))
        {
            
format(stringsizeof(string), "KILL: %s has killed %s with a %s."PlayerName(killerid), PlayerName(playerid), GunNames[reason]);
            
SendAdminMessage(0xAA3333AA,string); //printf(string);
            
if(GetPVarInt(killerid"IntEnter") != 1000 && GetPlayerInterior(killerid) == IntInfo[GetPVarInt(killerid"IntEnter")][iInt] || GetPVarInt(killerid"Int") != 90 && GetPVarInt(killerid"World") != 1)
            {
                switch(
IntInfo[GetPVarInt(killerid"IntEnter")][iType])
                {
                    case 
CHECKPOINT_STORECHECKPOINT_BARCHECKPOINT_RESTCHECKPOINT_BANKCHECKPOINT_CLUCKCHECKPOINT_PIZZACHECKPOINT_BURGER:
                    {
                        if(
reason >= && reason <= 34)
                        {
                            switch(
reason)
                            {
                                case 
.. 810 .. 15:
                                {
                                
format(stringsizeof(string), "HQ: All Units - HQ: (%s Appearance) was involved in a assault recorded from a CCTV camera."PlayerNameEx(killerid));
                                
SendFactionMessage(7COLOR_BLUEstring);
                                
format(stringsizeof(string), "HQ: Location: %s",GetPlayerArea(killerid));
                                
SendFactionMessage(7COLOR_BLUEstring);
                                }
                                       case 
22 .. 34:
                                       {
                                    
format(stringsizeof(string), "HQ: All Units - HQ: (%s Appearance) was involved in a shooting recorded from a CCTV camera."PlayerNameEx(killerid));
                                    
SendFactionMessage(7COLOR_BLUEstring);
                                       
format(stringsizeof(string), "HQ: Location: %s",GetPlayerArea(killerid));
                                       
SendFactionMessage(7COLOR_BLUEstring);
                                    }
                                }
                            }
                        }
                    }
                    if(
GetPVarInt(killerid"BizzEnter") != 1000 && GetPlayerInterior(killerid) == BizzInfo[GetPVarInt(killerid"BizzEnter")][bInterior] || GetPVarInt(killerid"Int") != 90 && GetPVarInt(killerid"World") != 1)
                    {
                        switch(
BizzInfo[GetPVarInt(killerid"BizzEnter")][bType])
                        {
                            case 
CHECKPOINT_STORECHECKPOINT_BARCHECKPOINT_RESTCHECKPOINT_BANKCHECKPOINT_CLUCKCHECKPOINT_PIZZACHECKPOINT_BURGER:
                            {
                                if(
reason >= && reason <= 34)
                                {
                                    switch(
reason)
                                    {
                                        case 
.. 810 .. 15:
                                        {
                                            
format(stringsizeof(string), "HQ: All Units - HQ: (%s Appearance) was involved in a assault recorded from a CCTV camera."PlayerNameEx(killerid));
                                            
SendFactionMessage(7COLOR_BLUEstring);
                                            
format(stringsizeof(string), "HQ: Location: %s",GetPlayerArea(killerid));
                                            
SendFactionMessage(7COLOR_BLUEstring);
                                        }
                                        case 
22 .. 34:
                                        {
                                            
format(stringsizeof(string), "HQ: All Units - HQ: (%s Appearance) was involved in a shooting recorded from a CCTV camera."PlayerNameEx(killerid));
                                            
SendFactionMessage(7COLOR_BLUEstring);
                                            
format(stringsizeof(string), "HQ: Location: %s",GetPlayerArea(killerid));
                                            
SendFactionMessage(7COLOR_BLUEstring);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if(
GetPVarInt(killerid"Member") == && GetPVarInt(playerid"Contract") > 0)
            {
                
format(stringsizeof(string), "HITMAN: %s has fofilled the contract on %s worth $%d."PlayerName(killerid), PlayerName(playerid), GetPVarInt(playerid"Contract"));
                
SendFactionMessage(8,COLOR_LIGHTBLUE,string);
                
SetPVarInt(killerid"Bank"GetPVarInt(killerid"Bank")+GetPVarInt(playerid"Contract"));
                
format(stringsizeof(string), "HITMAN: $%d has been wire-transferd to your account."GetPVarInt(playerid"Contract"));
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                
SetPVarInt(playerid"Contract"0);
            }
            if(
strcmp(PlayerInfo[killerid][pTaunt], "None"true) == 0) {}
            else
            {
                
format(sendernamesizeof(sendername), "%s"PlayerNameEx(killerid));
                
GiveNameSpace(sendername);
                
format(stringsizeof(string), "%s shouts: %s!"sendernamePlayerInfo[killerid][pTaunt]);
                
ProxDetector(50.0killeridstringCOLOR_FADE);
            }
        }
    if(
GetPVarInt(playerid"Jailed") == 0)
    {
        
SetPVarInt(playerid"Dead"1);
        
OnPlayerDataSave(playerid);
        
SetPVarInt(playerid"Checkpoint"CHECKPOINT_NONE);
     }
    return 
1;

Reply


Messages In This Thread
OnPlayerDeath Glitch (+rep) - by NickMirra - 08.08.2015, 16:36
Re: OnPlayerDeath Glitch (+rep) - by xVIP3Rx - 08.08.2015, 16:47
Re: OnPlayerDeath Glitch (+rep) - by jlalt - 08.08.2015, 17:43
Re: OnPlayerDeath Glitch (+rep) - by xVIP3Rx - 09.08.2015, 11:11

Forum Jump:


Users browsing this thread: 1 Guest(s)