Raised This Month: $ Target: $400
 0% 

Random models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 06-01-2009 , 04:01   Random models
Reply With Quote #1

PHP Code:
new const ZOMBIE_PLAYER_MODEL[] = 
{
"Hunter",
"Smoker",
"Boomer"
}
new const 
ZOMBIE_MODEL[] = 
{
"models/player/Hunter/Hunter.mdl",
"models/player/Smoker/Smoker.mdl",
"models/player/Boomer/Boomer.mdl"
}
new const 
ZOMBIE_CLAWS[] = 
{
"models/v_knife_zombie.mdl"
}
new const 
ZOMBIE_FLESH[][] =
{
"models/abone_template1.mdl",
"models/bonegibs.mdl",
"models/fleshgibs.mdl",
"models/gib_b_bone.mdl",
"models/gib_b_gib.mdl",
"models/gib_legbone.mdl",
"models/gib_lung.mdl"

i have only 1 model there are Hunter

[PHP
public bacon_spawn(id)
{
if (!is_user_alive(id))
return

static CsTeams: team ; team = cs_get_user_team(id)

if (team == CS_TEAM_T) //Terr
{
new Float:health, Float:gravity, armour
health = get_pcvar_float(cvar_health)
gravity = get_pcvar_float(cvar_gravity) / 800
armour = get_pcvar_num(cvar_armour)

g_zombie[id] = true
if(!task_exists(TASKID_STRIP + id))
set_task(0.2, "Task_Strip", TASKID_STRIP + id)

set_pev(id, pev_health, health)
cs_set_user_armor(id, armour, CS_ARMOR_NONE)
set_pev(id, pev_gravity, gravity)
if (!cs_get_user_nvg(id))
cs_set_user_nvg(id)

if (get_pcvar_num(cvar_autonvg))
set_task(0.2, "Task_NVG", TASKID_NVG + id)

copy(player_model[id], 31, ZOMBIE_PLAYER_MODEL[random_num(0, 3)])

new currentmodel[32];
fm_get_user_model(id, currentmodel, sizeof currentmodel - 1);

if(!equal(currentmodel, player_model[id]))
{
set_task(0.5 + g_counter, "Task_Model", id + TASKID_MODEL)
g_counter += 0.2;
}

if(!task_exists(TASKID_SHOWHUD + id))
set_task(0.2, "Task_ShowHUD", TASKID_SHOWHUD + id)
}
][/PHP]
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-01-2009 , 06:04   Re: Random models
Reply With Quote #2

http://forums.alliedmods.net/showthr...419#post839419
__________________
Arkshine is offline
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 13:49.


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