Raised This Month: $ Target: $400
 0% 

[DELETED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowless
Member
Join Date: May 2018
Old 08-05-2018 , 19:33   [DELETED]
Reply With Quote #1

---

Last edited by Shadowless; 05-19-2019 at 06:10.
Shadowless is offline
Send a message via ICQ to Shadowless
Old 08-05-2018, 22:51
remix.allstarz
This message has been deleted by remix.allstarz.
remix.allstarz
Member
Join Date: Dec 2013
Old 08-05-2018 , 22:58   Re: [HELP] ADMIN + VIP Models
Reply With Quote #2

or u mean this
sry for my bad english but i can help you xD
Attached Files
File Type: sma Get Plugin or Get Source (adminmodel.sma - 454 views - 1.6 KB)

Last edited by remix.allstarz; 08-06-2018 at 05:36.
remix.allstarz is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 08-05-2018 , 22:59   Re: [HELP] ADMIN + VIP Models
Reply With Quote #3

Quote:
Originally Posted by remix.allstarz View Post
What is your problem ?

if u need .amxx here
REMOVE AMXX and upload sma
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 08-05-2018 , 23:14   Re: [HELP] ADMIN + VIP Models
Reply With Quote #4

you can try this one..

PHP Code:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
// #include <amxmisc>
#include <cstrike>
// #include <engine>
// #include <fakemeta>
// #include <hamsandwich>
// #include <fun>
// #include <xs>
// #include <sqlx>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

#define VIP_LEVEL ADMIN_LEVEL_H              // edit vip flag here
#define ADMIN_LEVEL ADMIN_KICK           //edit admin flag here


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);

    
register_event("ResetHUD""resetModel""b");
}

public 
plugin_precache() 
{
    
precache_model("models/player/admin_te/admin_te.mdl");        //for admin ts
    
precache_model("models/player/admin_ct/admin_ct.mdl");       //for admin ct
    
precache_model("models/player/vip_ts/vip_ts.mdl");     //for vip ts
    
precache_model("models/player/vip_ct/vip_ct.mdl");   //vor vip ct

}

public 
resetModel(idlevelcid
{
    new 
CsTeams:userTeam cs_get_user_team(id);

        if (
get_user_flags(id) & ADMIN_LEVEL
        { 
            switch( 
userTeam )
            {
                case 
CS_TEAM_Tcs_set_user_model(id"admin_te");   //edit 
                
case CS_TEAM_CTcs_set_user_model(id"admin_ct");   //edit 
            
}
        }

        else if( 
get_user_flags(id) & VIP_LEVEL )
        {

            switch( 
userTeam )
            {
                case 
CS_TEAM_Tcs_set_user_model(id"vip_ts");   //edit 
                
case CS_TEAM_CTcs_set_user_model(id"vip_ct");   //edit 
            
}
        }

        return 
0;

soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Old 08-06-2018, 10:30
Shadowless
This message has been deleted by Shadowless.
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-06-2018 , 10:33   Re: [HELP] ADMIN + VIP Models
Reply With Quote #5

Quote:
Originally Posted by Shadowless View Post
TNX, and one question

where add !is_user_bot(id)


like this? or am i wrong? if(get_user_flags(id) & ADMIN_LEVEL & !is_user_bot(id))
if(get_user_flags(id) & ADMIN_LEVEL && !is_user_bot(id))

&& = AND
|| = OR
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 08-06-2018 at 10:34.
Ghosted is offline
Old 08-06-2018, 10:38
Shadowless
This message has been deleted by Shadowless.
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 08-06-2018 , 11:04   Re: [HELP] ADMIN + VIP Models
Reply With Quote #6

&& use for 1 condition and & use to add 2 condition to make 1 condition if i am right i cant explain properly ....if u want any thing extra you can post here
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-06-2018 , 11:04   Re: [HELP] ADMIN + VIP Models
Reply With Quote #7

Quote:
Originally Posted by Shadowless View Post
&& = AND
|| = OR
& = ? <-- whats one & means?

once upon a time i was IRC scripter
& = if contains specified bit (its like >=, <, == ...)

PHP Code:
new Variable
can have 32 bits
1 2 4 8 16 32 64...
This is used to reduce memory

Setting bits:
PHP Code:
Variable = (<< 0
PHP Code:
Variable |= (<< 0
(Last one adds bits)
(1 << 0) = 1
(1 << 1) = 2
(1 << 2) = 4 ... up to (1 << 31)

Setting more than 1 bits:
PHP Code:
Variable |= (<< 0)|(<< 1); 
Checking for bits:

PHP Code:
if (Variable & (<< 0)) 
or
PHP Code:
if (Variable 1
...

Unsetting bits:
PHP Code:
Variable &= ~(<< 0
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 08-06-2018 at 11:08.
Ghosted is offline
Old 08-06-2018, 11:30
Shadowless
This message has been deleted by Shadowless.
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-06-2018 , 11:35   Re: [HELP] ADMIN + VIP Models
Reply With Quote #8

Quote:
Originally Posted by Shadowless View Post
now i got other problem
i have both access on server (ADMIN_LEVEL_C and ADMIN_KICK) (flags "c" and "o")
and i`m with model of VIP, i want to be with model higher access ADMIN_KICK with model ADMIN


PHP Code:
#include <amxmodx>
#include <cstrike>
#define PLUGIN  "ADMIN + VIP Model"
#define VERSION "1.0"
#define AUTHOR  "Author"
#define VIP_MODEL ADMIN_LEVEL_C
#define ADMIN_MODEL ADMIN_KICK

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("ResetHUD""resetModel""b");
}

public 
plugin_precache() 
{
    
precache_model("models/player/admin_te/admin_te.mdl");
    
precache_model("models/player/admin_ct/admin_ct.mdl");
    
precache_model("models/player/vip_te/vip_te.mdl");
    
precache_model("models/player/vip_ct/vip_ct.mdl");
}

public 
resetModel(idlevelcid
{
    new 
CsTeams:userTeam cs_get_user_team(id);
    if(
get_user_flags(id) & ADMIN_MODEL && !is_user_bot(id))
    {
        switch( 
userTeam )
        {
            case 
CS_TEAM_Tcs_set_user_model(id"admin_te");
                case 
CS_TEAM_CTcs_set_user_model(id"admin_ct");
            }
    }
    if(
get_user_flags(id) & VIP_MODEL && !is_user_bot(id))
    {
        switch( 
userTeam )
        {
            case 
CS_TEAM_Tcs_set_user_model(id"vip_te");
                case 
CS_TEAM_CTcs_set_user_model(id"vip_ct");
            }
    }    
    return 
0;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
Code:
if(get_user_flags(id) & ADMIN_MODEL && !is_user_bot(id)) 
    { 
        switch( userTeam ) 
        { 
            case CS_TEAM_T: cs_set_user_model(id, "admin_te"); 
                case CS_TEAM_CT: cs_set_user_model(id, "admin_ct"); 
            } 
    } 
    else if(get_user_flags(id) & VIP_MODEL && !is_user_bot(id)) 
    { 
        switch( userTeam ) 
        { 
            case CS_TEAM_T: cs_set_user_model(id, "vip_te"); 
                case CS_TEAM_CT: cs_set_user_model(id, "vip_ct"); 
            } 
    }
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
soumyadip77
Senior Member
Join Date: Jul 2017
Location: INDIA,KOLKATA
Old 08-06-2018 , 11:39   Re: [HELP] ADMIN + VIP Models
Reply With Quote #9

remove level c for admin give them other flag but if u want u can add many flags like this

PHP Code:
#define VIP_MODEL ADMIN_LEVEL_C & ADMIN_LEVEL_H
#define ADMIN_MODEL ADMIN_KICK & ADMIN_BAN 
soumyadip77 is offline
Send a message via Skype™ to soumyadip77
Old 08-06-2018, 11:39
Shadowless
This message has been deleted by Shadowless.
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 08-06-2018 , 11:40   Re: [HELP] ADMIN + VIP Models
Reply With Quote #10

Quote:
Originally Posted by Shadowless View Post
?
Check carefully what i changed in code.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Old 08-06-2018, 11:40
Shadowless
This message has been deleted by Shadowless.
Old 08-06-2018, 11:58
Shadowless
This message has been deleted by Shadowless.
Old 08-06-2018, 12:05
Shadowless
This message has been deleted by Shadowless.
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 09:18.


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