Quote:
Originally Posted by kww
I just do something depending on current player model and every time I do this, I retrieve player model with natives. I thought that I could minimize unnecessary calls by getting model name only when it was set or changed and read it from array.
PHP Code:
new szModel[33]; get_user_info(id, "model", szModel, charsmax(szModel));
|
You can hook player spawn or round start, then u can save the string with that function, but with the global variable
PHP Code:
new __str_Model[33][33]; // global
public plugin_init() {
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}
public fwHamPlayerSpawnPost(id) {
get_user_info(id, "model", __str_Model[id], 32 );
}