barney,gina,gman,gordon,helmet,hgrunt,recon,robo,scientist,zombie and if i want to put new model to precache automaticaly like this plugin (plugin still work but is bad coded and crash my server )
Here is the source
https://forums.alliedmods.net/showthread.php?p=1875712
Код за потвърждение: Избери целия код
#include amxmodx
#define PLUGIN "HLDM Random player model"
#define VERSION "0.0.2"
#define AUTHOR "BodyBuilder"
#define MODELFILE "addons/amxmodx/configs/RPmodels.ini"
new line, text[64], len, left[64], right[64], string[6]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(id)
{
set_task(1.00,"ChangeModel",id)
}
public ChangeModel(id)
{
if(is_user_alive(id))
{
remove_task(id)
read_file(MODELFILE,random(file_size(MODELFILE,1)),text,63,len)
strbreak(text,left,5,right,63)
set_user_info(id,"model",right)
}
}
public plugin_precache()
{
while((line = read_file(MODELFILE,line,text,63,len)))
{
copy(string,5,text)
if(equali(string,"rpm* "))
{
strbreak(text,left,5,right,63)
formatex(left,63,"models/player/%s/%s.mdl",right,right)
if(!file_exists(left))
{
server_print("[HLDM-RPM]: could not find model %s to precache",left)
}
else
{
precache_model(left)
}
}
}
}