Raised This Month: $ Target: $400
 0% 

Set model [chicken]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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