Raised This Month: $ Target: $400
 0% 

Why CT Model ReplacemenT??


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 08-19-2009 , 12:48   Why CT Model ReplacemenT??
Reply With Quote #1

This code should replace all T's model to test999 Player Model. But it does replace all CT player Models too.. why??

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"

new Trie:g_tModels

public plugin_init()
{
    
register_plugin("KadiR Models"VERSION"ConnorMcLeod")

    
register_forward(FM_SetClientKeyValue"SetClientKeyValue")

    
g_tModels TrieCreate()
    
TrieSetString(g_tModels"terror""test999")
    
TrieSetString(g_tModels"leet""test999")
    
TrieSetString(g_tModels"guerilla""test999")
    
TrieSetString(g_tModels"arctic""test999")
}

public 
plugin_end()
{
    
TrieDestroy(g_tModels)
}

public 
plugin_precache()
{
    
precache_model("models/player/test999/test999.mdl")
}

public 
SetClientKeyValue(idszInfoBuffer[], szKey[], szValue[])
{
    static const 
model[] = "model"
    
if( equal(szKeymodel) )
    {
        static 
szModel[12]
        
TrieGetString(g_tModelsszValueszModelcharsmax(szModel));
        
set_user_info(idmodelszModel)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

KadiR is offline
 


Thread Tools
Display Modes

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 15:13.


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