Raised This Month: $ Target: $400
 0% 

Vip plugin - midifing hp bonus and CT/TT models


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mavefus
Junior Member
Join Date: Jun 2012
Old 06-30-2012 , 08:23   Vip plugin - midifing hp bonus and CT/TT models
Reply With Quote #1

Hello.

I have a problem. Some days ago I tried to modified plugin vip, which would add bonus hp for kills to vips and vip players have different models than normal players (vip in ct has different model in tt of course).

I tried that:
PHP Code:
register_cvar("hp_for_kill" "20")
.
.
.
public 
DeathMsg()
{
    new 
hpza get_cvar_num("hp_for_kill")
    new 
kid read_data(1)  //killer
    
new hs read_data(3)   // HeadShot (1 == true)
    
    
if(is_user_connected(kid) && is_user_alive(kid) && get_user_health(kid) <= 180)
    {
        if(
hs)
            
set_user_health(kidget_user_health(kid) + hpza// HP za HS
        
else
            
set_user_health(kidget_user_health(kid) + hpza// HP za KILL
        
Display_Fade(kid,2600,2600,0,0,255,0,15
But this adding bonus hp doesn't work ;/

Hmm... ok, I don't know what's wrong, so I decided to modified the second problem, with models.

I did that:
PHP Code:
public SetPlayerModel(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
cs_set_user_model(id"pbVIP_tt");
    }
    else
    {
        
cs_set_user_model(id"pbVIP_ct");
    }
    
//cs_set_user_model(id, "vip");
}

.
.
.

public 
plugin_precache(){    

    
precache_model("models/player/pbVIP_tt.mdl");
    
precache_model("models/player/pbVIP_ct.mdl"); 
And it's doesn't work too ...

Also I give you a .sma code, to look for bigger mistake, if i made.
Ohw... so I don't know, when I made a mistake in this 2 modifications. Could someone help me? I will glad if you help me

Thank you.
Attached Files
File Type: sma Get Plugin or Get Source (vippb2.sma - 770 views - 4.0 KB)

Last edited by Mavefus; 06-30-2012 at 08:24.
Mavefus is offline
 


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 15:09.


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