AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   how to change the model of my plugin (https://forums.alliedmods.net/showthread.php?t=230154)

newbie550 11-20-2013 21:39

how to change the model of my plugin
 
hi how do i change the model of my plugin (zombie class)

my code is
Code:

#include <amxmodx>
#include <cstrike>
#include <zombieplague>

/// Zombie Attributes
new const zclass_name[] = { "HeadCrab" } // name
new const zclass_info[] = { "High Jump With low health" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 50 // health
const zclass_speed = 350 // speed
const Float:zclass_gravity = 0.8 // gravity
const Float:zclass_knockback = 0.20 // knockback

new g_zclass_infecter


public plugin_init()
{
    register_plugin("[ZP] Zombie Class: HeadCrab", "1.2", "Newbie550")
    //Ammo = register_cvar("zp_infecter_amt", "3")
   
    g_zclass_infecter = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}

public zp_user_infected_post(id, infector)
{
    if (zp_get_user_zombie_class(id) == g_zclass_infecter && !zp_get_user_nemesis(id))
    {
        client_print(id, print_chat, "[ZP] You've chosen To be a crab, good luck!")
    }
}

then if i change
Code:

new const zclass_model[] = { "zombie_source" } // model
to
Code:

new const zclass_model[] = { "headcrab_t" } // model
it wont change the model of the zombie and also it wont work ingame well it compiles fine

Gasa 11-21-2013 04:37

Re: how to change the model of my plugin
 
try now
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <zombieplague>

/// Zombie Attributes
new const zclass_name[] = { "HeadCrab" // name
new const zclass_info[] = { "High Jump With low health" // description
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // claw model
const zclass_health 50 // health
const zclass_speed 350 // speed
const Float:zclass_gravity 0.8 // gravity
const Float:zclass_knockback 0.20 // knockback

new g_zclass_infecter


public plugin_init()
{
    
register_plugin("[ZP] Zombie Class: HeadCrab""1.2""Newbie550"
    
//Ammo = register_cvar("zp_infecter_amt", "3")
    
}

public 
plugin_precache()
{
    
g_zclass_infecter zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_zclass_infecter && !zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"[ZP] You've chosen To be a crab, good luck!")
    }



newbie550 11-21-2013 06:03

Re: how to change the model of my plugin
 
Quote:

Originally Posted by Gasa (Post 2063495)
try now
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <zombieplague>

/// Zombie Attributes
new const zclass_name[] = { "HeadCrab" // name
new const zclass_info[] = { "High Jump With low health" // description
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // claw model
const zclass_health 50 // health
const zclass_speed 350 // speed
const Float:zclass_gravity 0.8 // gravity
const Float:zclass_knockback 0.20 // knockback

new g_zclass_infecter


public plugin_init()
{
    
register_plugin("[ZP] Zombie Class: HeadCrab""1.2""Newbie550"
    
//Ammo = register_cvar("zp_infecter_amt", "3")
    
}

public 
plugin_precache()
{
    
g_zclass_infecter zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_zclass_infecter && !zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"[ZP] You've chosen To be a crab, good luck!")
    }



Ok i will check if this works though :0 actually it works ingame (before i changed it) but when i changed the model etc. it wont work anymore and i have to remake the plugin :| :rtfm:

ALackOfLife 11-21-2013 11:29

Re: how to change the model of my plugin
 
I don't know how it works with Zombie Plague, but looking at the folder for the default model heres how it looks.

You either need to make a folder in models/player named headcrab_t and put headcrab_t in there,
OR put headcrab_t in zombie_source, although the second one is more than likely wrong.

So for the first the path would be like this: models/player/headcrab_t/headcrab_t.mdl

newbie550 11-21-2013 18:36

Re: how to change the model of my plugin
 
Quote:

Originally Posted by ALackOfLife (Post 2063619)
I don't know how it works with Zombie Plague, but looking at the folder for the default model heres how it looks.

You either need to make a folder in models/player named headcrab_t and put headcrab_t in there,
OR put headcrab_t in zombie_source, although the second one is more than likely wrong.

So for the first the path would be like this: models/player/headcrab_t/headcrab_t.mdl

i did that it will become just a normal half life zombie? with no death animation and no feet :\

ALackOfLife 11-22-2013 00:14

Re: how to change the model of my plugin
 
Have you tried the 2nd one and put the model in the zombie_source folder?

newbie550 11-22-2013 00:45

Re: how to change the model of my plugin
 
Quote:

Originally Posted by ALackOfLife (Post 2063847)
Have you tried the 2nd one and put the model in the zombie_source folder?

but i set the model location to headcrab_t (like i said) when i was making the plugin.... so i have to change the location of the model to zombie_source in the zombie_classes.ini? and also put the model in the zombie_source is that what you mean?

Gasa 11-22-2013 09:57

Re: how to change the model of my plugin
 
new const zclass_model[] = { "headcrab_t" } // model

the make flder with this name "headcrab_t" and put in him headcrab_t.mdl (ur model), and location of model must be in cstrike/models/player/headcrab_t/ in this part put ur headcrab_t.mdl model

newbie550 11-22-2013 18:53

Re: how to change the model of my plugin
 
Quote:

Originally Posted by Gasa (Post 2063997)
new const zclass_model[] = { "headcrab_t" } // model

the make flder with this name "headcrab_t" and put in him headcrab_t.mdl (ur model), and location of model must be in cstrike/models/player/headcrab_t/ in this part put ur headcrab_t.mdl model

i did that already it was a half life zombie without feet?


All times are GMT -4. The time now is 17:28.

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