Hello. What's wrong no this script? It is supossed to change the player model in Team Fortress Classic from using vault, but I get argument(2) type mismatch for tfc_setmodel. Thanks for reading and I hope someone will help me.
Code:
public model_change(id)
{
//Retrieve a single item from vault
//Example: STEAM_0:0:1234 16000
new szKey[40];
formatex( szKey , charsmax( szKey ) , "%sMODEL" , g_szAuthID[id] );
new iModel = nvault_get( g_Vault , szKey );
//If our money key was found, set the users money to the value we read from vault and
//delete the key so the player will not get the same money again.
if ( iModel )
{
tfc_setmodel( id , iModel , "0" );
nvault_remove( g_Vault , szKey );
}
}