AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   i need help on this (https://forums.alliedmods.net/showthread.php?t=55168)

mando127 05-15-2007 15:00

i need help on this
 
this is what i have so far

if(CSW_KNIFE) (id,entity_set_string (id, EV_SZ_viewmodel, "v_knife_zombie.mdl")
i need it to set T team for this kinfe for my zombie mod server
like this


----------------------------------------------------------------------
if(team == CS_TEAM_T)
{
g_human[id] = false
g_zombie[id] = true
set_task(0.1, "RemovePickedWeapon", id) //Strips zombies if they do have guns
cs_set_user_model(id,"zombie_swarm")
set_user_health(id,get_pcvar_num(zomb_hp))
cs_set_user_armor(id,get_pcvar_num(zomb_ap),A rmorType)
set_user_footsteps(id, 1)
set_user_gravity(id,0.770)
set_user_maxspeed(id,(get_pcvar_float(zomb_sp eed)))
if(CSW_KNIFE) (id,entity_set_string (id, EV_SZ_viewmodel, "v_knife_zombie.mdl")
cs_set_user_money(id,0)
if (!cs_get_user_nvg(id))
{
cs_set_user_nvg(id,1)
message_begin(MSG_ONE, get_user_msgid("NVGToggle"), {0,0,0}, id)
write_byte(1)
message_end()
} else {
message_begin(MSG_ONE, get_user_msgid("NVGToggle"), {0,0,0}, id)
write_byte(1)
message_end()
}







}
else if(team == CS_TEAM_CT)
{
g_zombie[id] = false
g_human[id] = true
set_user_footsteps(id, 0)
cs_set_user_money(id, cs_get_user_money(id) + 20000)
set_user_health(id,280)
set_user_gravity(id,0.820)
cs_reset_user_model(id)


}

pls help i will love you all :)

regalis 05-15-2007 16:42

Re: i need help on this
 
First: Poste code in [ C O D E ] or [ S M A L L ] tags!
Second: DON'T double post!
Third: Use a DESCRIPTIVE topic!

Fourth: What do you want?
Is there a question behind your posting or do you want to show us your "superb" code?..0o

mando127 05-15-2007 18:05

Re: i need help on this
 
sry i am new to forums

kuzjma 05-20-2007 06:13

Re: i need help on this
 
If you need to changh model of knife, only for T team
Try this:
Code:
 if(get_user_team(id)==CS_TEAM_T) {   new clip, ammo, wpnid = get_user_weapon(id,clip,ammo)   if(wpnid == CSW_KNIFE) {    entity_set_string(id, EV_SZ_viewmodel,"models/v_knife_zombie.mdl")   }  }


All times are GMT -4. The time now is 10:38.

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