Raised This Month: $ Target: $400
 0% 

W_Model does not display


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
retoxx
Junior Member
Join Date: Jul 2012
Old 08-18-2012 , 15:05   W_Model does not display
Reply With Quote #1

I can hold a dodgeball and see other players have the dodgball but when we throw the dodgeball it becomes a hegrenade in air and then just lay on the ground.

I have tried Everything to make the w_hegrenade turn into a w_dodgeball but it just dosn't work.

PHP Code:
public think_grenade(ent

{
    
    new 
model[32];
    
    
entity_get_string(entEV_SZ_modelmodel31)
    
    
    
    if(
equali(model,"models/OGDaysMenu/w_dodgeball.mdl")) 
        
    {
        
        return 
PLUGIN_CONTINUE
        
    
}
    
    
// stop grenade from blowing up
    
    
return PLUGIN_HANDLED


Last edited by retoxx; 08-18-2012 at 15:05.
retoxx is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-18-2012 , 15:48   Re: W_Model does not display
Reply With Quote #2

Show the whole code, seems that you make something wrong at another place, also i don't think you need to hook "grenade" Think function, because your code prevent any kind of nade from blowing.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 08-18-2012 , 16:36   Re: W_Model does not display
Reply With Quote #3

Quote:
Originally Posted by retoxx View Post
I can hold a dodgeball and see other players have the dodgball but when we throw the dodgeball it becomes a hegrenade in air and then just lay on the ground.

I have tried Everything to make the w_hegrenade turn into a w_dodgeball but it just dosn't work.

PHP Code:
public think_grenade(ent

{
    
    new 
model[32];
    
    
entity_get_string(entEV_SZ_modelmodel31)
    
    
    
    if(
equali(model,"models/OGDaysMenu/w_dodgeball.mdl")) 
        
    {
        
        return 
PLUGIN_CONTINUE
        
    
}
    
    
// stop grenade from blowing up
    
    
return PLUGIN_HANDLED

I know you're making a game menu, i used this:

These "GAME_DODGEBALL" are builded up in an enum, only if you want to have more than one game in ur game menu ;)

PHP Code:
public Ham_Touch_Grenade_PreiEntityid )
{
          if( 
GAME_DODGEBALL )
{
          static 
i_owner
          i_owner 
pev(iEntitypev_owner)
          if(
is_user_alive(id) && cs_get_user_team(i_owner) == CS_TEAM_T && cs_get_user_team(id) == CS_TEAM_T/*<-- T vs T*/
          
{
          
ExecuteHamB(Ham_Killedidi_owner0)
          }
          else 
remove_entity(iEntity/*<-- Removes the dodgeball*/
}

And about the w_ model:

(You need to edit it a little depending on how you did setting up your code..)

PHP Code:
public fwdSetModel(ent,const model[])
{    
    if(
g_iCurrentGame == GAME_NONE || !pev_valid(ent) || !equal(model,"models/w_hegrenade.mdl")) 
        return 
FMRES_IGNORED
        
    
switch(g_iCurrentGame)
    {
        case 
GAME_DODGEengfunc(EngFunc_SetModelentg_szBall_w)
    }
    
    return 
FMRES_SUPERCEDE

__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu

Last edited by MokeN; 08-18-2012 at 16:47.
MokeN is offline
Send a message via Skype™ to MokeN
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-18-2012 , 16:39   Re: W_Model does not display
Reply With Quote #4

Don't use CurWeapon event to set p_ and v_ models, set them in Deploy post forward.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 08-18-2012 , 16:46   Re: W_Model does not display
Reply With Quote #5

Is it bad?

Tell me why..
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-18-2012 , 17:46   Re: W_Model does not display
Reply With Quote #6

Quote:
Originally Posted by MokeN View Post
Is it bad?

Tell me why..
Deploy it's the unique function in that weapon models values are modified, so you would not need any other hook for overriding current weapon models. Also, CurWeapon it's called on every fire event, and it's not needed because the model, as I said, it's changed only when deploying a weapon.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 08-19-2012 , 14:33   Re: W_Model does not display
Reply With Quote #7

Ah, okay. Well then ;)
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
Reply


Thread Tools
Display Modes

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 05:53.


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