Raised This Month: $ Target: $400
 0% 

need help with .spr


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-24-2009 , 12:14   Re: need help with .spr
Reply With Quote #2

Juste change WOW_FIREBALL by a sprite.
Arkshine is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-24-2009 , 12:27   Re: need help with .spr
Reply With Quote #3

do not understand .. Give example
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-24-2009 , 13:02   Re: need help with .spr
Reply With Quote #4

He says that this:
Code:
new const WOW_FIREBALL[][] = { "models/w_paintball.mdl" }
Shows that the entity's model will be a model.
All you have to do is find a sprite you want and use that.

Let's say for the example that you want to use the sprite "sprites/newpaintball.spr".
All you have to do is this:
Code:
new const WOW_FIREBALL[][] = { "sprites/newpaintball.spr" }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-24-2009 , 13:17   Re: need help with .spr
Reply With Quote #5

Don't think that will work good
Sprites will be black
xbatista is offline
Send a message via Skype™ to xbatista
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-24-2009 , 13:30   Re: need help with .spr
Reply With Quote #6

xbatista to remove the black ?
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Reply



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