Raised This Month: $ Target: $400
 0% 

Set model [chicken]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ex3cuTioN
Member
Join Date: May 2010
Old 07-26-2010 , 11:01   Set model [chicken]
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>

#pragma semicolon 1

new const g_Model[] = "models/chick.mdl";
new const 
g_Sound[] = "misc/chicken.wav";

new 
bool:g_HasModel[33];

public 
plugin_init() {
    
register_plugin("Chicken""0.1""Ex3cuTioN");
    
register_clcmd("say /chicken","cmdTransform");
}

public 
client_connect(id) {
    
g_HasModel[id] = false;
}

public 
client_disconnect(id) {
    
g_HasModel[id] = false;
}

public 
plugin_precache() {
    
precache_sound(g_Sound);
    
precache_model(g_Model);
}

public 
cmdTransform(id) {
    if(!
is_user_alive(id)) {
        
client_print(id,print_chat,"You must be alive");
    }
    
    if(
g_HasModel[id] == true) {
        
cs_reset_user_model(id);
        
g_HasModel[id] = false;
    }
    else if(
g_HasModel[id] == false) {
        
entity_set_model(idg_Model);
        
client_cmd(0,"spk %s",g_Sound);
        
g_HasModel[id] = true;
    }
    
client_print(id,print_chat,"You're a %s",g_HasModel[id] ? "chicken" "player");

It's not working...
Ex3cuTioN is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 07-26-2010 , 11:17   Re: Set model [chicken]
Reply With Quote #2

PHP Code:
entity_set_model(idg_Model); 

PHP Code:
cs_set_user_model(id,g_Model
__________________
minato is offline
Send a message via MSN to minato
Ex3cuTioN
Member
Join Date: May 2010
Old 07-26-2010 , 11:18   Re: Set model [chicken]
Reply With Quote #3

Wrong

http://www.amxmodx.org/funcwiki.php?...odel&go=search

That's just for models/player/

And i tryed that too, and nothing
Ex3cuTioN is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 07-26-2010 , 11:27   Re: Set model [chicken]
Reply With Quote #4

Quote:
Originally Posted by Ex3cuTioN View Post
Wrong

http://www.amxmodx.org/funcwiki.php?...odel&go=search

That's just for models/player/

And i tryed that too, and nothing
PHP Code:
new const g_Model[] = "models/chick.mdl"

PHP Code:
new const g_Model[] = "models/player/chicken/chicken.mdl"
------------------------------
PHP Code:
entity_set_model(idg_Model); 

PHP Code:
cs_set_user_model(id"chicken"); 
__________________
minato is offline
Send a message via MSN to minato
Reply



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 00:18.


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