Raised This Month: $ Target: $400
 0% 

need help with .spr


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-24-2009 , 12:00   need help with .spr
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <hamsandwich>
#define CLASS_FIREBALL "wow_fireball"
new const WOW_FIREBALL[][] =
{
"models/w_paintball.mdl"

new 
cvar_fdamagecvar_fsdamagecvar_fforce
new Floatg_LastFthrow[33]
public 
plugin_init() 
{

cvar_fdamage register_cvar("zswarm_fdamage""100")
cvar_fsdamage register_cvar("zswarm_fsdamage","1")
cvar_fforce register_cvar("zswarm_fforce""1500")
register_forward(FM_Touch"fw_Touch")
register_forward(FM_Touch"fw_Touch")
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
}
public 
clcmd_throw(id)
{
static 
FloatOrigin[3], FloatVelocity[3], FloatAngle[3], MinBox[3], MaxBox[3]
pev(idpev_originOrigin)
pev(idpev_velocityVelocity)
pev(idpev_anglesAngle)
static 
HealthFloatdamage
Health 
get_user_health(id)
damage get_pcvar_float(cvar_fsdamage)

if (
Health damage)
{
static 
ent ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))

set_pev(entpev_classnameCLASS_FIREBALL)
engfunc(EngFunc_SetModelentWOW_FIREBALL[random(sizeof WOW_FIREBALL)])
Angle[0] = random_float(1.0360.0)
Angle[1] = random_float(1.0360.0)
MinBox = { -1.0, -1.0, -1.0 }
MaxBox = { 1.01.01.0 }

set_pev(entpev_anglesAngle)
engfunc(EngFunc_SetSizeentMinBoxMaxBox)
engfunc(EngFunc_SetOriginentOrigin)
set_pev(entpev_movetypeMOVETYPE_TOSS)
set_pev(entpev_solidSOLID_TRIGGER)
set_pev(entpev_ownerid)

velocity_by_aim(idget_pcvar_num(cvar_fforce), Velocity)
set_pev(entpev_velocityVelocity)

set_pev(idpev_healthHealth damage)
}
else
{
client_print(idprint_center"%L"LANG_PLAYER"FLESH_HEALTH")
}
}
public 
fw_PlayerPreThink(id)
{
if(!
is_user_alive(id))
return 
FMRES_IGNORED

static FloatTime
static button
button 
pev(idpev_button)
Time get_gametime()

if ( (
button IN_ATTACK) && (button IN_ATTACK2))
{
if(
Time 1.1 g_LastFthrow[id])
{
clcmd_throw(id)
g_LastFthrow[id] = Time
}
}
return 
FMRES_IGNORED

 
public 
fw_Touch(pToucherpTouched)
{
if ( 
pev_valid(pToucher))
{
static 
className[32], className2[32]
pev(pToucherpev_classnameclassName31)
if ( 
pev_valid(pTouched)) pev(pTouchedpev_classnameclassName231)

if ( 
equal(classNameCLASS_FIREBALL))
{
static 
attacker attacker pev(pToucherpev_owner)

if ( 
pev_valid(pTouched))
{
if ( 
equal(className2"player") && is_user_connected(pTouched))
{
static 
origin[3], Floatdamage
get_user_origin
(pTouchedorigin)
damage get_pcvar_float(cvar_fdamage)
static 
CsTeams:team[2]
team[0] = cs_get_user_team(pTouched), team[1] = cs_get_user_team(attacker)

if (
attacker == pTouched)
return 
FMRES_SUPERCEDE

if (!get_cvar_num("mp_friendlyfire") && team[0] == team[1]) 
return 
FMRES_SUPERCEDE
message_begin
(MSG_BROADCASTSVC_TEMPENTITY);
write_byte(TE_BLOOD);
write_coord(origin[0]);
write_coord(origin[1]);
write_coord(origin[2] + 10);
write_coord(random_num(-360360));
write_coord(random_num(-360360));
write_coord(-10);
write_byte(70);
write_byte(random_num(1535));
message_end() 
ExecuteHam(Ham_TakeDamagepTouchedpToucherattackerdamageDMG_GENERIC)
}
else if ( 
equal(className2"func_breakable")) dllfunc(DLLFunc_UsepTouchedattacker
else if ( 
equal(className2CLASS_FIREBALL)) return FMRES_SUPERCEDE 

engfunc(EngFunc_RemoveEntitypToucher)
}
}

return 
FMRES_IGNORED

public 
plugin_precache()

precache_model("models/w_paintball.mdl")

you can make a instead model to .spr? i want to this shoot a fire or flame
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode