Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Problem z nativem


  • Zamknięty Temat jest zamknięty
Brak odpowiedzi do tego tematu

#1 LucKy_skiLL

    Godlike

  • Power User

Reputacja: 163
Profesjonalista

  • Postów:1 301
  • GG:
  • Lokalizacja:Kraków
Offline

Napisano 03.09.2011 17:43

L 09/02/2011 - 23:34:38: Invalid player id 22
L 09/02/2011 - 23:34:38: [AMXX] Displaying debug trace (plugin "newdiablo.amxx")
L 09/02/2011 - 23:34:38: [AMXX] Run time error 10: native error (native "get_user_weapon")
L 09/02/2011 - 23:34:38: [AMXX]    [0] newdiablo.sma::Damage (line 2073)


Linia z błędem


if(attacker_id<1 || attacker_id>32) return



Cała funkcja

public Damage(id)
{
if (is_user_connected(id))
{
new weapon
new bodypart

if(get_user_attacker(id,weapon,bodypart)!=0)
{
new damage = read_data(2)
new attacker_id = get_user_attacker(id,weapon,bodypart)
if (is_user_connected(attacker_id) && attacker_id != id)
{
if(get_user_team(id) != get_user_team(attacker_id))
{
if(damage>175) player_dmg[attacker_id]+=damage/2
else player_dmg[attacker_id]+=damage
dmg_exp(attacker_id)
}

add_damage_bonus(id,damage,attacker_id)
add_vampire_bonus(id,damage,attacker_id)
add_grenade_bonus(id,attacker_id,weapon)
add_theif_bonus(id,attacker_id)
add_bonus_blind(id,attacker_id,weapon,damage)
add_bonus_redirect(id)
add_bonus_necromancer(attacker_id,id)
add_bonus_scoutdamage(attacker_id,id,weapon)
add_bonus_cawpmasterdamage(attacker_id,id,weapon)
add_bonus_m4masterdamage(attacker_id,id,weapon)
add_bonus_akmasterdamage(attacker_id,id,weapon)
add_bonus_dglmasterdamage(attacker_id,id,weapon)
add_bonus_m3masterdamage(attacker_id,id,weapon)
add_bonus_awpmasterdamage(attacker_id,id,weapon)
add_bonus_darksteel(attacker_id,id,damage)
add_bonus_illusion(attacker_id,id,weapon)
add_bonus_shake(attacker_id,id)
add_bonus_shaked(attacker_id,id)
item_take_damage(id,damage)

if(player_sword[attacker_id] == 1 && weapon==CSW_KNIFE ){
change_health(id,-35,attacker_id,"world")

}
if (HasFlag(attacker_id,Flag_Ignite))
RemoveFlag(attacker_id,Flag_Ignite)

if((HasFlag(id,Flag_Illusion) || HasFlag(id,Flag_Teamshield))&& get_user_health(id) - damage > 0)
{
new weaponname[32]; get_weaponname( weapon, weaponname, 31 ); replace(weaponname, 31, "weapon_", "")
UTIL_Kill(attacker_id,id,weaponname)
}

if (HasFlag(id,Flag_Moneyshield))
{
change_health(id,damage/2,0,"")
}

//Add the agility damage reduction, around 45% the curve flattens
if (damage > 0 && player_agility[id] > 0)
{
new heal = floatround(player_damreduction[id]*damage)
if (is_user_alive(id)) change_health(id,heal,0,"")
}

if (HasFlag(id,Flag_Teamshield_Target))
{
//Find the owner of the shield
new owner = find_owner_by_euser(id,"Effect_Teamshield")
new weaponname[32]; get_weaponname( weapon, weaponname, 31 ); replace(weaponname, 31, "weapon_", "")
if (is_user_alive(owner))
{
change_health(attacker_id,-damage,owner,weaponname)
change_health(id,damage/2,0,"")
}
}
if (player_class[ attacker_id ] == Imp && is_user_alive(id)&&random_num(1,30)==1)
client_cmd(id, "weapon_knife")
}

#if defined CHEAT
new name[32]
get_user_name(id,name,31)
if (equal(name,"Admin"))
{
change_health(id,9999,0,"")
set_user_hitzones(0, id, 0)
}
#endif

if(attacker_id<1 || attacker_id>32) return

new clip,ammo
new weapon = get_user_weapon(attacker_id,clip,ammo)

if((attacker_id!=id)&&player_class[attacker] == Mag)
{
if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN)
{
agi=(BASE_SPEED / 2)
set_speedchange(id)
if(DemageTake[id]==0)
{
DemageTake[id]=1
set_task(11.0, "funcReleaseVic", id)
set_task(11.0, "funcReleaseVic2", id)
set_task(2.0, "funcDemageVic", id+GLUTON)
}
}
}

if(is_user_connected(attacker_id)&&(attacker_id!=id)&&player_class[attacker] == Zabojca)
{
if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN)
{
set_task(1.5, "funcDemageVic3", id)
}
}

if(is_user_connected(attacker_id)&&(attacker_id!=id)&&player_class[attacker] == Hunter)
{
if(weapon == CSW_GLOCK18 || weapon == CSW_USP || weapon == CSW_P228 || weapon == CSW_DEAGLE || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN)
{
new ori[3]
trace_bool[attacker]=id
get_user_origin(id,ori)

new parms[5];

for(new i=0;i<3;i++)
{
parms[i] = ori[i]
}
parms[3]=attacker
parms[4]=id
set_task(0.5,"charge_hunter",attacker,parms,5)
}
}
}
}
}

  • +
  • -
  • 0

Oglądasz seriale typu: The Flash, Arrow, Daredevil, The Walking Dead? Jeśli tak, to zapraszam na mój kanał YouTube





Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych