Raised This Month: $ Target: $400
 0% 

vip admin model for T too


Post New Thread Reply   
 
Thread Tools Display Modes
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^
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 02-05-2009 , 01:29   Re: vip admin model for T too
Reply With Quote #2

I think you can set only VIP model and armour, but scoreboard...

Quote:
PHP Code:
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

must be:
PHP Code:
public resetModel(id) { 
    if (
get_user_flags(id) & FLAG)  
    { 
        
cs_set_user_model(idVIP
    } 
    else 
    { 
        
cs_reset_user_model(id
    } 
     
    return 
PLUGIN_CONTINUE

TheRadiance is offline
Send a message via ICQ to TheRadiance
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 02-05-2009 , 01:29   Re: vip admin model for T too
Reply With Quote #3

On connor's code remove this:

PHP Code:
    if(get_pdata_int(idOFFSET_TEAM) != 2)
        return 
PLUGIN_CONTINUE 
But the VIP on the scoreboard for T's isn't possible (I think)
__________________
IneedHelp is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 02-05-2009 , 01:33   Re: vip admin model for T too
Reply With Quote #4

Quote:
PHP Code:
On connor's code remove this:

PHP Code:
    if(get_pdata_int(id, OFFSET_TEAM) != 2)
        return PLUGIN_CONTINUE 
I just tested, and it doesn't work.
TheRadiance is offline
Send a message via ICQ to TheRadiance
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 02-05-2009 , 01:47   Re: vip admin model for T too
Reply With Quote #5

Hm, maybe..

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

#define VIP_MODEL "models/player/vip/vip.mdl"
#define VIP_ABBR "vip"
#define VIP_FLAG ADMIN_KICK

public plugin_init()
    
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)

public 
plugin_precache()
    
precache_model(VIP_MODEL)

public 
Fwd_PlayerSpawn_Post(id)
{
    if (
is_user_alive(id))
           if (
get_user_flags(id) & VIP_FLAG)
                  
cs_set_user_model(idVIP_ABBR)

__________________
IneedHelp is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 02-05-2009 , 02:00   Re: vip admin model for T too
Reply With Quote #6

Quote:
Hm, maybe..

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

#define VIP_MODEL "models/player/vip/vip.mdl"
#define VIP_ABBR "vip"
#define VIP_FLAG ADMIN_KICK

public plugin_init()
    
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)

public 
plugin_precache()
    
precache_model(VIP_MODEL)

public 
Fwd_PlayerSpawn_Post(id)
{
    if (
is_user_alive(id))
           if (
get_user_flags(id) & VIP_FLAG)
                  
cs_set_user_model(idVIP_ABBR)

Yes, i think it's the better way to do this.
TheRadiance is offline
Send a message via ICQ to TheRadiance
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 02-05-2009 , 08:16   Re: vip admin model for T too
Reply With Quote #7

Quote:
Originally Posted by TheRadiance View Post
Yes, i think it's the better way to do this.
Ofc it's more simple with Cstrike, but there's a lot of servers that don't use Cstrike, cause it's kind of useless(FM can "replace" it). There's nothing that the Cstrike way would be better, it just depends what modules the server uses.

Last edited by SnoW; 02-05-2009 at 08:19.
SnoW is offline
Send a message via MSN to SnoW
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-05-2009 , 09:05   Re: vip admin model for T too
Reply With Quote #8

Fakemeta is better.
__________________
hleV is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-05-2009 , 15:51   Re: vip admin model for T too
Reply With Quote #9

Since no one pointed it out:
Quote:
Originally Posted by Alucard^ View Post
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

Should be:
PHP Code:
#define FLAG ADMIN_KICK 
without quotes.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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