The original plugin only have one mdl and now I added few more, but I don't know how to set the mdl to player.
I want to set mdl depends on szSetHatID, just some numbers, 1 to 3.
PHP Code:
new MODEL_MARK[ ][ ] ={
"models/test/1.mdl",
"models/test/2.mdl",
"models/test/3.mdl"
}
public plugin_precache( )
{
for( new i = 0; i < sizeof MODEL_MARK; i++ )
precache_model( MODEL_MARK[ i ] );
}
public client_PreThink( id )
{
new szAuthID[ 32 ];
get_user_authid( id, szAuthID, sizeof szAuthID - 1 );
formatex( szKey, sizeof szKey - 1, "%s", szAuthID );
if( nvault_get( g_nVault, szKey, szGetHatID, sizeof szGetHatID - 1 ) )
{
formatex( szSetHatID, sizeof szSetHatID - 1, "%s", szGetHatID );
//client_print_color( id, DontChange, "^1%s ^4#%s already set for you^1.", PREFIX, szSetHatID );
//...
if(g_adminmarkEnt[id] < 1)
{
g_adminmarkEnt[id] = create_entity("info_target")
if(g_adminmarkEnt[id] > 0)
{
entity_set_int(g_adminmarkEnt[id], EV_INT_movetype, MOVETYPE_FOLLOW)
entity_set_edict(g_adminmarkEnt[id], EV_ENT_aiment, id)
entity_set_model(g_adminmarkEnt[id],MODEL_MARK) //<--Here
}
}
//...
}
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others