Alright...
Here's my source.
Now, I can't make the say work...
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_precache()
{
precache_sound("mdlmod/morph.wav")
}
public plugin_init()
{
register_plugin("Model Changer","Beta 0.1","Ramirez")
register_clcmd("say","event_say");
register_clcmd("say help!","mdlhelp",ADMIN_USER,"- Displays mdlmod help.")
register_cvar("amx_mdlmod","0")
register_event("ResetHUD","reset_model","be")
}
public client_connect(id) {
show_motd(id,"This server is using Model Mod by: {-BIH-} Ramirez","Welcome!")
}
public event_say(id) {
new text[64]
read_argv(1,text,63)
if(containi(text, "/model")) {
mdlchange(1)
}
return PLUGIN_CONTINUE
}
public mdlchange(id) {
if (get_cvar_num("amx_mdlmod")==1) {
new storearg[32]
read_argv(2,storearg,32) //25
cs_set_user_model(id,storearg)
client_print(id,print_center,"You have changed your model")
new textout[32]
new dudename[150]
get_user_name(id,dudename,150)
format(textout,150,"%s has changed his appearance to %s.",dudename,storearg)
client_print(0,print_chat,textout)
client_cmd(0, "spk mdlmod/morph.wav")
}
else {
client_print(0,print_chat,"Model mod is not enabled by the server.")
}
}
public mdlhelp(id)
{
show_motd(id,"/addons/amxmodx/mdlmod/help.txt","Model Mod Help")
client_cmd(id,"stopsound")
}
public reset_model(id) {
if(get_cvar_num("amx_mdlmod")==0)
cs_reset_user_model(id)
}