Raised This Month: $ Target: $400
 0% 

Admin vip model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grzelak
Senior Member
Join Date: Sep 2008
Old 09-27-2008 , 06:19   Admin vip model
Reply With Quote #1

is there exist admin vip model ? If is it can someone give me link and tell me how to install ?

Thanks !
grzelak is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 09-27-2008 , 07:21   Re: Admin vip model
Reply With Quote #2

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

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

public plugin_init() {
        
register_plugin("VIP Adminl""1.0""tuty")
        
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;

try
__________________

Last edited by tuty; 09-27-2008 at 07:28.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
grzelak
Senior Member
Join Date: Sep 2008
Old 09-27-2008 , 07:45   Re: Admin vip model
Reply With Quote #3

Quote:
Originally Posted by tuty 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_plugin("VIP Adminl""1.0""tuty")
        
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;

try
where to put it?
grzelak is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 09-27-2008 , 07:47   Re: Admin vip model
Reply With Quote #4

take de sma and amxx... must work :/
__________________

Last edited by tuty; 03-12-2009 at 11:50.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-27-2008 , 12:07   Re: Admin vip model
Reply With Quote #5

tuty, that won't work. You are setting the model incorrectly.

@OP, either you can search for the existing plugin that contains more features than tuty's plugin provides, or you can use this fixed version of tuty's code

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

#define VIP "vip"
#define FLAG "ADMIN_KICK"

public plugin_init()
{
    
register_plugin("VIP Adminl""1.0""tuty");
    
register_event("ResetHUD""resetModel""b");
}

public 
plugin_precache()
{
    new 
model[64];
    
format(modelcharsmax(model), "player/%s/%s.mdl"VIPVIP);
    
precache_model(model);
}

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

__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 09-27-2008 , 15:09   Re: Admin vip model
Reply With Quote #6

oooohhh i forgot ...thx yami
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
algoasi
Member
Join Date: Nov 2008
Location: Pluton
Old 11-29-2008 , 22:45   Re: Admin vip model
Reply With Quote #7

error compilacion

not found
algoasi is offline
Send a message via MSN to algoasi
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 11-29-2008 , 23:33   Re: Admin vip model
Reply With Quote #8

change...

PHP Code:
#define FLAG "ADMIN_KICK" 
by..

PHP Code:
#define FLAG ADMIN_KICK 
and compile
L// is offline
Send a message via MSN to L//
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-30-2008 , 03:31   Re: Admin vip model
Reply With Quote #9

Better use this.
Code:
#include <amxmodx> #include <hamsandwich> #include <cstrike>   #define ADMIN ADMIN_BAN   #define MDL_VIP "vip"   new amx_adminvip;   public plugin_precache() {         new szMdl[32];         format(szMdl, 31, "player/%s/%s.mdl", MDL_VIP, MDL_VIP);           precache_model(szMdl); }   public plugin_init() {         register_plugin("Admin w/ VIP Model", "1.0", "hleV");           amx_adminvip = register_cvar("amx_adminvip", "1");           RegisterHam(Ham_Spawn, "player", "hamSpawn", 1); }   public hamSpawn(id) {         if (!get_pcvar_num(amx_adminvip) || !(get_user_flags(id) & ADMIN) || !is_user_alive(id))                 return;           cs_set_user_model(id, MDL_VIP); }
__________________
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-30-2008 , 03:34   Re: Admin vip model
Reply With Quote #10

You could use formatex instead of format.
You should check if the file exists before precache it, if not, pause the plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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:21.


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