Raised This Month: $ Target: $400
 0% 

mdl change to spr


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 10-30-2009 , 05:19   mdl change to spr
Reply With Quote #1

I wanna change mdl to sprite but i need help ;/



PHP Code:
#include <amxmodx>#include <fakemeta> #define CLASS_FIREBALL "Fireball" new const FIREBALL_MODEL[] = "models/fireball.mdl" new Float: g_LastFthrow[33] new cvar_damage, cvar_xdamage, cvar_xforce public plugin_precache(){        engfunc(EngFunc_PrecacheModel, FIREBALL_MODEL);} public plugin_init(){        register_plugin("Skill Fireball", "1.0", "Frostas")         cvar_xforce = register_cvar("fb_xforce", "1500")        cvar_damage = register_cvar("fb_damage", "200")        cvar_xdamage = register_cvar("fb_xdamage","1")         register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")} public clcmd_throw(id){        static Float: Origin[3], Float: Velocity[3], Float: Angle[3], MinBox[3], MaxBox[3]        pev(id, pev_origin, Origin)        pev(id, pev_velocity, Velocity)        pev(id, pev_angles, Angle)        static Health, Float: damage        Health = get_user_health(id)        damage = get_pcvar_float(cvar_xdamage)                if (Health > damage)        {                static ent ; ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))                                set_pev(ent, pev_classname, CLASS_FIREBALL)                engfunc(EngFunc_SetModel, ent, FIREBALL_MODEL)                Angle[0] = random_float(1.0, 360.0)                Angle[1] = random_float(1.0, 360.0)                MinBox = { -1.0, -1.0, -1.0 }                MaxBox = { 1.0, 1.0, 1.0 }                                set_pev(ent, pev_angles, Angle)                engfunc(EngFunc_SetSize, ent, MinBox, MaxBox)                engfunc(EngFunc_SetOrigin, ent, Origin)                set_pev(ent, pev_movetype, MOVETYPE_TOSS)                set_pev(ent, pev_solid, SOLID_TRIGGER)                set_pev(ent, pev_owner, id)                                velocity_by_aim(id, get_pcvar_num(cvar_xforce), Velocity)                set_pev(ent, pev_velocity, Velocity)                                set_pev(id, pev_health, Health - damage)        }         else        {                client_print(id, print_center, "You haven't that HP")        }} public fw_PlayerPreThink(id){        if(!is_user_alive(id))                return FMRES_IGNORED         static Float: Time        static button        button = pev(id, pev_button)        Time = get_gametime()         if (button & IN_USE)        {                if(Time - 1.1 > g_LastFthrow[id])                {                        clcmd_throw(id)                        g_LastFthrow[id] = Time                }        }        return PLUGIN_CONTINUE;} 
</DIV></OL>

Last edited by ~Ice*shOt; 10-30-2009 at 05:22.
~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 17:33.


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