Raised This Month: $ Target: $400
 0% 

vip admin model for T too


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 02-05-2009 , 01:14   vip admin model for T too
Reply With Quote #1

hi..

i need this code by connor but with T:

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

#define CS_CT_VIP                9
#define OFFSET_TEAM                114
#define OFFSET_INTERNALMODEL        126
#define SCOREATTRIB_VIP            (1<<2)

public plugin_init() {
    
register_plugin("Admin VIP""1.0""ConnorMcLeod")

    if ( 
engfunc(EngFunc_FindEntityByString0"classname""info_vip_start") <= )
        
register_message(get_user_msgid("ScoreAttrib"), "Hook_ScoreAttrib")
}

public 
Hook_ScoreAttrib(osef2talifeosef3talifeosef4talife)
{
    new 
id get_msg_arg_int(1)

    if(
get_pdata_int(idOFFSET_TEAM) != 2)
        return 
PLUGIN_CONTINUE

    
new adminflags get_user_flags(id)
    if(!
adminflags || adminflags ADMIN_USER)
        return 
PLUGIN_CONTINUE

    
if(get_msg_arg_int(2))
        return 
PLUGIN_CONTINUE

    set_pdata_int
(idOFFSET_INTERNALMODELCS_CT_VIP)
    
dllfunc(DLLFunc_ClientUserInfoChangedid)

    
set_msg_arg_int(20SCOREATTRIB_VIP)
    
    return 
PLUGIN_CONTINUE

it posible? or need another way?


or..... see this..

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 

#define VIP "models/player/vip/vip.mdl" 
#define FLAG "ADMIN_KICK" 

public plugin_init() { 
        
register_event("ResetHUD""resetModel""b"
        return 
PLUGIN_CONTINUE 


public 
plugin_precache() { 
        
precache_model(VIP

        return 
PLUGIN_CONTINUE 


public 
resetModel(idlevelcid) { 
    if (
get_user_flags(id) & FLAG)  
    { 
        
cs_set_user_model(idVIP
    } 
    else 
    { 
        
cs_reset_user_model(id
    } 
     
    return 
PLUGIN_CONTINUE

Quote:
/home/groups/amxmodx/tmp3/textp6J3WJ.sma(20) : error 033: array must be indexed (variable "-unknown-")
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 01:54.


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