[edit] here.. i managed to fix all the errors and this is the script:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <engine>
public plugin_precache()
{
precache_model("sprites/plasma.spr")
precache_model("sprites/suicideexplode.spr")
precache_sound("misc/doh7.wav")
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin("Plasmatest","1.00","Haim")
register_clcmd("shoot","myfunc")
register_touch("PlasmaBall","*","plasma_interact")
}
public myfunc(id)
{
new origin[3]
new Float:forigin[3]
forigin[0]=str_to_float(origin[0])
forigin[1]=str_to_float(origin[1])
forigin[2]=str_to_float(origin[2])
get_user_origin(id,origin,1)
new ePlasmaBall = create_entity("info_target")
entity_set_string(ePlasmaBall, EV_SZ_classname, "PlasmaBall")
entity_set_vector(ePlasmaBall, EV_VEC_origin,forigin)
new Float:maxs[3] = {32.0,32.0,64.0}
new Float:mins[3] = {-32.0,-32.0,-64.0}
entity_set_size(ePlasmaBall,mins,maxs)
entity_set_int(ePlasmaBall,EV_INT_solid, SOLID_BBOX)
entity_set_int(ePlasmaBall,EV_INT_movetype,MOVETYPE_TOSS)
entity_set_float(ePlasmaBall,EV_FL_framerate,1.0)
set_rendering(ePlasmaBall, kRenderFxNoDissipation, 255, 255, 255, kRenderGlow, 10)
entity_set_model(ePlasmaBall, "sprites/plasma.spr")
emit_sound(ePlasmaBall, CHAN_STATIC, "misc/doh7.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
public plasma_interact(ePlasmaBall,other) {
new gExplosionModel = precache_model("sprites/suicideexplode.spr")
if(other == 0) {
new Float:fOrigin[3]
new iOrigin[3]
entity_get_vector(ePlasmaBall, EV_VEC_origin, fOrigin)
FVecIVec(fOrigin, iOrigin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(3) // TE_EXPLOSION
write_coord(iOrigin[0])
write_coord(iOrigin[1])
write_coord(iOrigin[2]+50)
write_short(gExplosionModel)
write_byte(100)
write_byte(0)
write_byte(0)
message_end()
RadiusDamage(fOrigin, 30, 120)
remove_entity(ePlasmaBall)
}
else if(is_user_connected(other)) {
user_kill(other, 0)
new origin[3]
get_user_origin(other, origin, 0)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(3) // TE_EXPLOSION
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_short(gExplosionModel)
write_byte(100)
write_byte(0)
write_byte(0)
message_end()
}
}
but it doesnt work in the game... it does runtime error.. please help me to fix it.. make it work.. PLZ