[Ajuda] Bug no ESC muito estranho
#1

Olб este й o meu primeiro post (= sou novo aqui, estudei PAWN com vнdeos no ******* e consegui fazer meu primeiro GM do zero.

Atй ae tudo bem mas agora eu descobri um bug muito estranho que ainda que nem um scripter conseguiu desvendar.

Fiz um vнdeo para facilitar.

https://www.youtube.com/watch?featur...&v=tRZGSChgAtw

Descrevendo bug:

Quando um jogador da ESC e outro jogador vai atira nele quando ele sai do ESC ele ta morto!

Alguйm pode me ajudar por favor ?
Reply
#2

Isso aн sу pode ser devido ao script (GameMode ou FilterScript). Vocк deve ter algum anti-cheat de vida. Verifica as funзхes OnPlayerTakeDamage e OnPlayerGiveDamage. E vк tambйm a funзгo OnPlayerUpdate, deve ter lб algum SetPlayerHealth.
Reply
#3

Quote:
Originally Posted by Nixtren
Посмотреть сообщение
Isso aн sу pode ser devido ao script (GameMode ou FilterScript). Vocк deve ter algum anti-cheat de vida. Verifica as funзхes OnPlayerTakeDamage e OnPlayerGiveDamage. E vк tambйm a funзгo OnPlayerUpdate, deve ter lб algum SetPlayerHealth.
Nгo tem eu jб tirei todas fs e includes e o bug persiste

aqui eu tenho sу isso

Код HTML:
//DAR HS
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
	if(playerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
    {
        SetPlayerHealth(damagedid, 0.0);
        TextDrawShowForPlayer(playerid, TextdrawHS);
        TextDrawShowForPlayer(playerid, TextdrawHS2);
		TimerHS[playerid] = SetTimerEx("EsconderHS",3000,0, "i", playerid);
		return 1;
	}
	return 1;
}

e

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
	//Anti Drive By
	if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER || GetPlayerState(issuerid) == PLAYER_STATE_PASSENGER)
	{
		GameTextForPlayer(issuerid,"~r~VOCE FOI EJETADO~n~ POR TENTAR MATAR~n~ USANDO UM VEICULO!",8000,3);
        PlayerPlaySound(issuerid,1085,0.0,0.0,0.0);
        RemovePlayerFromVehicle(issuerid);
	    if(IsPlayerNPC(issuerid))
	return 1;
}

OnPlayerUpdate eu n usei e as settimer nгo tem nada
Reply
#4

Por favor alguйm pode me ajudar ?
Reply
#5

Isso nгo й bug, й padrгo do samp os players morrem apуs receberem packets de dano enquanto estavam afk, o que acontece й que eles ficam invulnerбveis enquanto afk e ao voltarem recebem o dano. Isso й bom pra evitar combatlog, em servidores como o uL DayZ o player que tomar dano de qualquer modo enquanto estiver de esc й morto pelo prуprio script, nгo adianta procurar no seu cуdigo, isso й padrгo do samp.
Reply
#6

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Isso nгo й bug, й padrгo do samp os players morrem apуs receberem packets de dano enquanto estavam afk, o que acontece й que eles ficam invulnerбveis enquanto afk e ao voltarem recebem o dano. Isso й bom pra evitar combatlog, em servidores como o uL DayZ o player que tomar dano de qualquer modo enquanto estiver de esc й morto pelo prуprio script, nгo adianta procurar no seu cуdigo, isso й padrгo do samp.
E o que eu posso fazer para resolver isso ?
Reply
#7

Quote:
Originally Posted by RafaelMau
Посмотреть сообщение
E o que eu posso fazer para resolver isso ?
Acho que nada. Ficou de ESC morre tambйm.
Reply
#8

OnPlayerGiveDamage -> verifica se o player que recebeu dano estб de ESC (existem includes pra isso) -> caso esteja use alguma funзгo como SetplayerHealth pra matar instantaneamente
Reply
#9

Mas na versгo 0.3z nгo dava isso.

Porque agora no 0.3.7 tб dando achei muito chato.

O player da ESC e mesmo assim morre quando voltar.
Reply
#10

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
OnPlayerGiveDamage -> verifica se o player que recebeu dano estб de ESC (existem includes pra isso) -> caso esteja use alguma funзгo como SetplayerHealth pra matar instantaneamente
Unica coisa que tem й isso

Quote:

public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
if(playerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
setHealth(damagedid, 0.0);
TextDrawShowForPlayer(playerid, TextdrawHS);
TextDrawShowForPlayer(playerid, TextdrawHS2);
TimerHS[playerid] = SetTimerEx("EsconderHS",3000,0, "i", playerid);
return 1;
}
return 1;
}

Jб tirei todas INCLUDES,FS e plugins deixei sу o GM e ainda ta dando isso
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)