Raised This Month: $ Target: $400
 0% 

Nvault how to save models?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-24-2022 , 23:54   Re: Nvault how to save models?
Reply With Quote #2

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(idpev_viewmodel2szModel)
    }

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_getg_iVaultIDgMemoryTableNames2 
PHP Code:
new szData64 ];
nvault_getg_iVaultIDgMemoryTableNames2 szData charsmaxszData ) );

//And then you could do
switch_model(id szData 
Try the above and see if you can make it work
__________________

Last edited by Bugsy; 03-24-2022 at 23:55.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode