You are sharing a global variable across all players, using this to set the model in switch_model. My commendation is to ditch this global variable and add a parameter to switch_model(), to allow you to specify the model to set.
PHP Code:
switch_model(id , const szModel[] )
{
if (!sh_is_active() || !is_user_alive(id) ) return
if (get_user_weapon(id) == CSW_KNIFE) {
set_pev(id, pev_viewmodel2, szModel)
}
}
You should store player info based on their steam id, not name.
This is not doing anything. When retrieving a string, you must specify the string variable to store the data in.
PHP Code:
nvault_get( g_iVaultID, gMemoryTableNames2 )
PHP Code:
new szData[ 64 ];
nvault_get( g_iVaultID, gMemoryTableNames2 , szData , charsmax( szData ) );
//And then you could do
switch_model(id , szData )
Try the above and see if you can make it work
__________________