Death Bug .
#3

Here is the part of the death system , What should I fix in it to fix that problem ?



Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	if(IsPlayerConnected(killerid))
	{
		new hour,minute,second, weaponname[32];
		gettime(hour,minute,second);
		FixHour(hour);
		hour = shifthour;
		GetWeaponName(reason, weaponname, sizeof(weaponname));
		format(PlayerInfo[playerid][pKillLog9], 256, "%s", PlayerInfo[playerid][pKillLog8]);
		format(PlayerInfo[playerid][pKillLog8], 256, "%s", PlayerInfo[playerid][pKillLog7]);
		format(PlayerInfo[playerid][pKillLog7], 256, "%s", PlayerInfo[playerid][pKillLog6]);
		format(PlayerInfo[playerid][pKillLog6], 256, "%s", PlayerInfo[playerid][pKillLog5]);
		format(PlayerInfo[playerid][pKillLog5], 256, "%s", PlayerInfo[playerid][pKillLog4]);
		format(PlayerInfo[playerid][pKillLog4], 256, "%s", PlayerInfo[playerid][pKillLog3]);
		format(PlayerInfo[playerid][pKillLog3], 256, "%s", PlayerInfo[playerid][pKillLog2]);
		format(PlayerInfo[playerid][pKillLog2], 256, "%s", PlayerInfo[playerid][pKillLog1]);
		format(PlayerInfo[playerid][pKillLog1], 256, "%s", PlayerInfo[playerid][pKillLog0]);
		format(PlayerInfo[playerid][pKillLog0], 256, "(%d:%d:%d) %s killed me with %s", hour,minute,second,GetPlayerNameEx(killerid), weaponname);

		format(PlayerInfo[killerid][pKillLog9], 256, "%s", PlayerInfo[killerid][pKillLog8]);
		format(PlayerInfo[killerid][pKillLog8], 256, "%s", PlayerInfo[killerid][pKillLog7]);
		format(PlayerInfo[killerid][pKillLog7], 256, "%s", PlayerInfo[killerid][pKillLog6]);
		format(PlayerInfo[killerid][pKillLog6], 256, "%s", PlayerInfo[killerid][pKillLog5]);
		format(PlayerInfo[killerid][pKillLog5], 256, "%s", PlayerInfo[killerid][pKillLog4]);
		format(PlayerInfo[killerid][pKillLog4], 256, "%s", PlayerInfo[killerid][pKillLog3]);
		format(PlayerInfo[killerid][pKillLog3], 256, "%s", PlayerInfo[killerid][pKillLog2]);
		format(PlayerInfo[killerid][pKillLog2], 256, "%s", PlayerInfo[killerid][pKillLog1]);
		format(PlayerInfo[killerid][pKillLog1], 256, "%s", PlayerInfo[killerid][pKillLog0]);
		format(PlayerInfo[killerid][pKillLog0], 256, "(%d:%d:%d) Killed %s with %s", hour,minute,second,GetPlayerNameEx(playerid), weaponname);
		if(GetPVarInt(killerid, "IsInArena") == 0) PlayerInfo[killerid][pDMKills]++;
	}

	new string[128];
	pTazer[playerid] = 0;
	InsideShamal[playerid] = INVALID_VEHICLE_ID;
	DeletePVar(playerid, "SpeedRadar");
	DeletePVar(playerid, "UsingSprunk");
	KillTimer(GetPVarInt(playerid, "firstaid5"));
	DeletePVar(playerid, "usingfirstaid");
	if(GetPVarInt(playerid, "MovingStretcher") != -1)
	{
		KillTimer(GetPVarInt(playerid, "TickEMSMove"));
		DeletePVar(GetPVarInt(playerid, "MovingStretcher"), "OnStretcher");
		SetPVarInt(playerid, "MovingStretcher", -1);
	}

	new caller = Mobile[playerid];
	if(IsPlayerConnected(Mobile[playerid]))
	{
		SendClientMessageEx(caller,  COLOR_GRAD2, "The line went dead.");
		format(string, sizeof(string), "* %s puts away their cellphone.", GetPlayerNameEx(caller));
		ProxDetector(30.0, caller, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		CellTime[caller] = 0;
		Mobile[caller] = INVALID_PLAYER_ID;
	}
	Mobile[playerid] = INVALID_PLAYER_ID;
	CellTime[playerid] = 0;
	RingTone[playerid] = 0;

	foreach(Player, i)
	{
		if(EMSAccepted[i] < 999)
		{
			if(EMSAccepted[i] == playerid)
			{
				EMSAccepted[i] = 999;
				GameTextForPlayer(i, "~w~EMS Caller~n~~r~Has Died", 5000, 1);
				EMSCallTime[i] = 0;
				DisablePlayerCheckpoint(i);
			}
		}
	}

	if( GetPVarInt(playerid, "SpecOff" ) == 1 )
	{
		SpawnPlayer(playerid);
		return 1;
	}

	if(GetPVarInt(playerid, "s") == 1)
	{
		SendClientMessageEx(playerid, COLOR_WHITE, "You appear to be stuck in limbo, medics are trying to revive you.");
		KillEMSQueue(playerid);
		ResetPlayerWeaponsEx(playerid);
Reply


Messages In This Thread
Death Bug . - by OmarT2 - 12.09.2013, 18:42
Re: Death Bug . - by Roko_foko - 12.09.2013, 18:45
Re: Death Bug . - by OmarT2 - 12.09.2013, 19:17
Re: Death Bug . - by Wizza - 12.09.2013, 19:17
Re: Death Bug . - by OmarT2 - 12.09.2013, 19:27
Re: Death Bug . - by Omar55555 - 12.09.2013, 19:38
Re: Death Bug . - by knackworst - 12.09.2013, 19:38
Re: Death Bug . - by OmarT2 - 12.09.2013, 19:42
Re: Death Bug . - by OmarT2 - 12.09.2013, 19:55
Re: Death Bug . - by OmarT2 - 14.09.2013, 01:05

Forum Jump:


Users browsing this thread: 1 Guest(s)