Code:
#include < amxmodx >
#include < fakemeta >
const MAX_PLAYERS = 32;
new g_szCurrentModel[ MAX_PLAYERS + 1 ][ 32 ];
public plugin_init( )
{
register_forward( FM_SetKeyValue, "FwdSetKeyValuePre" );
}
public client_disconnect( iPlayer )
{
g_szCurrentModel[ iPlayer ][ 0 ] = 0;
}
public FwdSetKeyValuePre( iPlayer, szKey[ ], szValue[ ] )
{
if( equal( szKey, "model" ) )
{
// player's model is being set a value
if( !equal( szValue, g_szCurrentModel[ iPlayer ] ) )
{
// current model is different
// save new model
copy( g_szCurrentModel[ iPlayer ], charsmax( g_szCurrentModel[ ] ), szValue );
}
}
}
__________________