Quote:
Originally Posted by HamletEagle
Just need to check in SetClientKeyValue...
|
I'd say even more. Here's some Zombie Plague 4 code which would help.
PHP Code:
// Forward Client User Info Changed -prevent players from changing models-
public fw_ClientUserInfoChanged(id)
{
// Cache player's name
get_user_name(id, g_playername[id], charsmax(g_playername[]))
if (!g_handle_models_on_separate_ent)
{
// Get current model
static currentmodel[32]
fm_cs_get_user_model(id, currentmodel, charsmax(currentmodel))
// If they're different, set model again
if (!equal(currentmodel, g_playermodel[id]) && !task_exists(id+TASK_MODEL))
fm_cs_set_user_model(id+TASK_MODEL)
}
}
// Forward Set ClientKey Value -prevent CS from changing player models-
public fw_SetClientKeyValue(id, const infobuffer[], const key[])
{
// Block CS model changes
if (key[0] == 'm' && key[1] == 'o' && key[2] == 'd' && key[3] == 'e' && key[4] == 'l')
return FMRES_SUPERCEDE;
return FMRES_IGNORED;
}
__________________