Raised This Month: $51 Target: $400
 12% 

monster_satchel model (pev_model)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 01-21-2024 , 19:16   monster_satchel model (pev_model)
Reply With Quote #1

What's wrong here? Model string is NULL.
(I would like to replace the model of monster_satchel next)
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <hamsandwich> #include <engine> #define PLUGIN "Satchels" #define VERSION "1.0" #define AUTHOR "Phant" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     RegisterHam(Ham_Spawn, "monster_satchel", "fw_SatchelSpawnPre", 0) } public fw_SatchelSpawnPre(ent) {     if(pev_valid(ent))      {         new s_Model[32]         pev(ent, pev_model, s_Model, 31)         client_print(0, print_chat, "SATHCEL MODEL: %s", s_Model)     } }
Attached Thumbnails
Click image for larger version

Name:	Half Life Screenshot 2024.01.21 - 19.01.20.80.jpg
Views:	33
Size:	83.4 KB
ID:	202915  

Last edited by Phant; 01-21-2024 at 19:17.
Phant is offline
Send a message via ICQ to Phant
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-22-2024 , 15:10   Re: monster_satchel model (pev_model)
Reply With Quote #2

Have you tried search lately? Anggara_nothing's work is a decent place to start.
__________________
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-23-2024 , 00:25   Re: monster_satchel model (pev_model)
Reply With Quote #3

Entity Spawn is called too early, you better use FM_SetModel post hook
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-23-2024 at 00:26.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-23-2024 , 11:00   Re: monster_satchel model (pev_model)
Reply With Quote #4

POST. I tested and it works..
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <hamsandwich> #include <engine> #define PLUGIN "Satchels" #define VERSION "1.0" #define AUTHOR "Phant" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     RegisterHam(Ham_Spawn, "monster_satchel", "fw_SatchelSpawnPost", 1) } public fw_SatchelSpawnPost(ent) {     if(pev_valid(ent))      {         new s_Model[32]         pev(ent, pev_model, s_Model, 31)         client_print(0, print_chat, "SATHCEL MODEL: %s", s_Model)     } }


PHP Code:
void CSatchelCharge :: Spawnvoid )
{
    
Precache( );
    
// motor
    
pev->movetype MOVETYPE_BOUNCE;
    
pev->solid SOLID_BBOX;

    
SET_MODEL(ENT(pev), "models/w_satchel.mdl");
    
//UTIL_SetSize(pev, Vector( -16, -16, -4), Vector(16, 16, 32));    // Old box -- size of headcrab monsters/players get blocked by this
    
UTIL_SetSize(pevVector( -4, -4, -4), Vector(444));    // Uses point-sized, and can be stepped over
    
UTIL_SetOriginpevpev->origin );

    
SetTouch( &CSatchelCharge::SatchelSlide );
    
SetUse( &CSatchelCharge::DetonateUse );
    
SetThink( &CSatchelCharge::SatchelThink );
    
pev->nextthink gpGlobals->time 0.1;

    
pev->gravity 0.5;
    
pev->friction 0.8;

    
pev->dmg gSkillData.plrDmgSatchel;
    
// ResetSequenceInfo( );
    
pev->sequence 1;

__________________
DJEarthQuake is offline
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 06:12.


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