←  Pytania dotyczące pluginów

AMXX.pl: Support AMX Mod X i SourceMod

»

Error VIP

  • +
  • -
Kureda - zdjęcie Kureda 21.05.2017

Witam serdecznie.

Mam mały problem mianowicie chodzi o error któy spowodował dzisiaj crash na moim serwerze.

Proszę was o pomoc.

L 05/21/2017 - 21:26:49: [FAKEMETA] Invalid entity
L 05/21/2017 - 21:26:49: [AMXX] Displaying debug trace (plugin "vip.amxx")
L 05/21/2017 - 21:26:49: [AMXX] Run time error 10: native error (native "pev")
L 05/21/2017 - 21:26:49: [AMXX]    [0] vip.sma::takeDamage (line 126)
public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) ||
	(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){
		if(damagebits & DMG_BULLET){
			if(get_user_weapon(ioid)==CSW_DEAGLE){
				if(get_user_team(ioid)==2){
					damage*=(100+30)/100;
				}
			}
			if(get_user_weapon(ioid)==CSW_AK47){
				if(get_user_team(ioid)==2){
					damage*=(100+30)/100;
				}
			}
			if(get_user_weapon(ioid)==CSW_M4A1){
				if(get_user_team(ioid)==2){
					damage*=(100+30)/100;
				}
			}
		}
	}
	
	SetHamParamFloat(4, damage);
	return HAM_HANDLED;
}
Odpowiedz

  • +
  • -
d0naciak - zdjęcie d0naciak 22.05.2017

public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
if(((IsPlayer(idattacker) && is_user_connected(idattacker) && g_Vip[idattacker] && (ioid=idattacker)) ||
(pev_valid(idinflictor) && ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid) && g_Vip[ioid]))){
if(damagebits & DMG_BULLET){
if(get_user_weapon(ioid)==CSW_DEAGLE){
if(get_user_team(ioid)==2){
damage*=(100+30)/100;
}
}
if(get_user_weapon(ioid)==CSW_AK47){
if(get_user_team(ioid)==2){
damage*=(100+30)/100;
}
}
if(get_user_weapon(ioid)==CSW_M4A1){
if(get_user_team(ioid)==2){
damage*=(100+30)/100;
}
}
}
}
 
SetHamParamFloat(4, damage);
return HAM_HANDLED;
}
Odpowiedz

  • +
  • -
Kureda - zdjęcie Kureda 22.05.2017

Dzięki wielkie! Zastosuje i zobaczę czy błąd ponownie się pojawi +

Odpowiedz