←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

mam problem z amx_heconc.amxx

Zablokowany

  • +
  • -
bolek_stw - zdjęcie bolek_stw 04.12.2009

L 12/03/2009 - 20:37:27: Start of error session.
L 12/03/2009 - 20:37:27: Info (map "cs_office") (file "addons/amxmodx/logs/error_20091203.log")
L 12/03/2009 - 20:37:27: [ENGINE] Invalid entity 286
L 12/03/2009 - 20:37:27: [AMXX] Displaying debug trace (plugin "amx_heconc.amxx")
L 12/03/2009 - 20:37:27: [AMXX] Run time error 10: native error (native "entity_get_string")
L 12/03/2009 - 20:37:27: [AMXX] [0] 1681.attach::hedamage_event (line 75)
wszysto dobrze wgralem i dopisałem plugin do plugins.ini to wina pluginu ze sa errory?
Odpowiedz

  • +
  • -
Kaskader - zdjęcie Kaskader 04.12.2009

Odznacz wszystkie moduły w modules.ini oprócz mysql i sqlite, powinno pomóc. Jeżeli nie pomoże to plugin nie działa lub jest źle wgrany.
Odpowiedz

  • +
  • -
bolek_stw - zdjęcie bolek_stw 04.12.2009

Wszystkie moduły działają ^^ i dobrze jest wgrany... moze ktos wie o co chodzi z tym:(
Odpowiedz

  • +
  • -
naven - zdjęcie naven 04.12.2009

Tak, to wina pluginu, coś jest po prostu nie w porządku z bytami.
Odpowiedz

  • +
  • -
bolek_stw - zdjęcie bolek_stw 04.12.2009

.sma da sie to naprawic czy nie?




/* AMX Mod script.
*
* HE-CONC 1.0
* by ThantiK
*
*
* Description:
* Remember CONC jumping in TFC? -- This adds the knockback to the HE 'nades
* its great to set higher or lower depending on your wants. But definately
* adds some spunk to the game.
*
* Commands:
* CVAR - he_push, set higher or lower depending on the effect you want.
*
* Special Thanks:
* JGHG for the help with setting velocity, and for the code on getting HE coords.
* Ryan (War3 Expansion guy) for the mathematics and velocity stocks.
*/

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define SPEED 800.0

public plugin_init() {
register_plugin("HE Knockback", "1.0", "ThantiK")
register_event("Damage", "hedamage_event", "b", "2!0", "4!0", "5!0", "6!0")
register_cvar("he_push","20.0")
}

stock get_velocity_from_origin( ent, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3] )
{
new Float:fEntOrigin[3];
entity_get_vector( ent, EV_VEC_origin, fEntOrigin );

// Velocity = Distance / Time

new Float:fDistance[3];
fDistance[0] = fEntOrigin[0] - fOrigin[0];
fDistance[1] = fEntOrigin[1] - fOrigin[1];
fDistance[2] = fEntOrigin[2] - fOrigin[2];

new Float:fTime = ( vector_distance( fEntOrigin,fOrigin ) / fSpeed );

fVelocity[0] = fDistance[0] / fTime;
fVelocity[1] = fDistance[1] / fTime;
fVelocity[2] = fDistance[2] / fTime;

return ( fVelocity[0] && fVelocity[1] && fVelocity[2] );
}


// Sets velocity of an entity (ent) away from origin with speed (speed)

stock set_velocity_from_origin( ent, Float:fOrigin[3], Float:fSpeed )
{
new Float:fVelocity[3];
get_velocity_from_origin( ent, fOrigin, fSpeed, fVelocity )

entity_set_vector( ent, EV_VEC_velocity, fVelocity );

return ( 1 );
}

public hedamage_event(id) {
new MAXPLAYERS
MAXPLAYERS = get_maxplayers()

new inflictor = entity_get_edict(id, EV_ENT_dmg_inflictor)
if (inflictor <= MAXPLAYERS)
return PLUGIN_CONTINUE

new classname2[8]
entity_get_string(inflictor, EV_SZ_classname, classname2, 7)
if (!equal(classname2, "grenade"))
return PLUGIN_CONTINUE

new Float:upVector[3]
upVector[0] = float(read_data(4))
upVector[1] = float(read_data(5))
upVector[2] = float(read_data(6))

new damagerept = read_data(2)
set_velocity_from_origin(id, upVector, get_cvar_float("he_push")*damagerept)

return PLUGIN_CONTINUE
}
Odpowiedz

  • +
  • -
Saper - zdjęcie Saper 05.12.2009

jezeli plugin nie powoduje zadnych bledow to po co sobie tym glowe zawracac... ??
Odpowiedz

  • +
  • -
bolek_stw - zdjęcie bolek_stw 05.12.2009

nie no jak sa w logach te errory to myslałem ze sie robią błedy
Jestem początkujący więc wszystkiego niewiem :]
Odpowiedz
Zablokowany