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(kid, get_user_health(kid) + hpza) // HP za HS
else
set_user_health(kid, get_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.