Raised This Month: $248 Target: $400
 62% 

Skin Admin/vip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
El Abuelo Loco
Member
Join Date: Jun 2020
Old 09-10-2020 , 09:38   Skin Admin/vip
Reply With Quote #1

I'm looking for a plugin with an admin / vip skin
El Abuelo Loco is offline
drakunovu6
Junior Member
Join Date: Sep 2017
Old 09-12-2020 , 19:50   Re: Skin Admin/vip
Reply With Quote #2

For what I seen for other threads of you, you are using Counter-Strike so I'm going to use cs_set_user_model.

It includes model for Terrorist and Counter-Terrorist

This should work, not tested

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

public plugin_init()
{
    
register_plugin("Model Changing""1.0""Drakunovu")
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}

public 
plugin_precache()
{
    
precache_model("models/player/modeladmin_ct/modeladmin_ct.mdl");
    
precache_model("models/player/modeladmin_t/modeladmin_t.mdl");
}

public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_connected(id) || !is_user_alive(id) || !cs_get_user_team(id) || !is_user_admin(id))
        return;

    switch(
cs_get_user_team(id))
    {
        case 
CS_TEAM_CTcs_set_user_model(id"modeladmin_ct");
        case 
CS_TEAM_Tcs_set_user_model(id"modeladmin_t");
    }

drakunovu6 is offline
artYY
Member
Join Date: May 2020
Location: Brazil, Curitiba, PR
Old 09-13-2020 , 11:11   Re: Skin Admin/vip
Reply With Quote #3

Quote:
Originally Posted by drakunovu6 View Post
For what I seen for other threads of you, you are using Counter-Strike so I'm going to use cs_set_user_model.

It includes model for Terrorist and Counter-Terrorist

This should work, not tested

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

public plugin_init()
{
    
register_plugin("Model Changing""1.0""Drakunovu")
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}

public 
plugin_precache()
{
    
precache_model("models/player/modeladmin_ct/modeladmin_ct.mdl");
    
precache_model("models/player/modeladmin_t/modeladmin_t.mdl");
}

public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_connected(id) || !is_user_alive(id) || !cs_get_user_team(id) || !is_user_admin(id))
        return;

    switch(
cs_get_user_team(id))
    {
        case 
CS_TEAM_CTcs_set_user_model(id"modeladmin_ct");
        case 
CS_TEAM_Tcs_set_user_model(id"modeladmin_t");
    }

Can u do anything about a command on say like /skinvipm that's the player could be choose your skin?
__________________
artYY is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-13-2020 , 11:20   Re: Skin Admin/vip
Reply With Quote #4

Quote:
Originally Posted by artYY View Post
Can u do anything about a command on say like /skinvipm that's the player could be choose your skin?
https://forums.alliedmods.net/showpo...11&postcount=3
Supremache is offline
drakunovu6
Junior Member
Join Date: Sep 2017
Old 09-13-2020 , 11:30   Re: Skin Admin/vip
Reply With Quote #5

Quote:
Originally Posted by Supremache View Post
this one does that
drakunovu6 is offline
artYY
Member
Join Date: May 2020
Location: Brazil, Curitiba, PR
Old 09-13-2020 , 12:23   Re: Skin Admin/vip
Reply With Quote #6

Quote:
Originally Posted by Supremache View Post
I tried this one, but something is wrong for me..

The player doesn't change... Menu appears, compile right, but doesn't change (I don't know why)
__________________
artYY is offline
drakunovu6
Junior Member
Join Date: Sep 2017
Old 09-13-2020 , 12:38   Re: Skin Admin/vip
Reply With Quote #7

Quote:
Originally Posted by artYY View Post
I tried this one, but something is wrong for me..

The player doesn't change... Menu appears, compile right, but doesn't change (I don't know why)
Try this one, I didn't test it, I just grab it from that plugin a modify it a little bit so it should work.

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

public plugin_init() 
{
    
register_plugin("VIPClassMenu""1.0""Supremache");
    
register_clcmd("say /skin""clcmd_skin");
}

public 
plugin_precache() 
{
    
precache_model("models/player/modelct_vip1/modelct_vip1.mdl");
    
precache_model("models/player/modelct_vip2/modelct_vip2.mdl");
    
precache_model("models/player/modelt_vip1/modelct_vip1.mdl");
    
precache_model("models/player/modelt_vip2/modelt_vip2.mdl");
}

public 
clcmd_skin(id)
{
    if (!(
get_user_flags(id) & ADMIN_LEVEL_A))
    {
        
client_print(idprint_chat"This is only available to vips.");
        return 
PLUGIN_HANDLED;
    }

    switch(
cs_get_user_team(id))
    {
        case 
CS_TEAM_TCustomCTMenu(id);
        case 
CS_TEAM_CTCustomTMenu(id);
    }

    return 
PLUGIN_HANDLED;
}

public 
CustomCTMenu(id)
{
    new 
menu menu_create("\r[VIP] \wSelect your skin\n\wPage:\y ""CT_Handler");
    
    
menu_additem(menu"Model CT 1");
    
menu_additem(menu"Model CT 2");

    
menu_setprop(menuMPROP_BACKNAME"Previous page");
    
menu_setprop(menuMPROP_NEXTNAME"Next page");
    
menu_setprop(menuMPROP_EXITNAME"\rClose");
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);

    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
CustomTMenu(id)
{
    new 
menu menu_create("\r[VIP] \wSelect your skin\n\wPage:\y ""T_Handler");
    
    
menu_additem(menu"Model T 1");
    
menu_additem(menu"Model T 2");

    
menu_setprop(menuMPROP_BACKNAME"Previous page");
    
menu_setprop(menuMPROP_NEXTNAME"Next page");
    
menu_setprop(menuMPROP_EXITNAME"\rClose");
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);

    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
CT_Handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1cs_set_user_model(id"modelct_vip1")
        case 
2cs_set_user_model(id"modelct_vip2")
    }

    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
T_Handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1cs_set_user_model(id"model_tvip1")  
        case 
2cs_set_user_model(id"model_tvip2")
    }

    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by drakunovu6; 09-13-2020 at 12:43. Reason: forgot to add the plugin and fix model ct that is duped
drakunovu6 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-13-2020 , 12:46   Re: Skin Admin/vip
Reply With Quote #8

Quote:
Originally Posted by artYY View Post
I tried this one, but something is wrong for me..

The player doesn't change... Menu appears, compile right, but doesn't change (I don't know why)
Oh there's small problem, fixed

@ drakunovu6 - you didn't fixed it, the problem was here:
I made t team with ct menu and ct team with t menu !!

Code:
case CS_TEAM_T: CustomCTMenu(id);         case CS_TEAM_CT: CustomTMenu(id);
Attached Files
File Type: sma Get Plugin or Get Source (VClassMenu.sma - 3 views - 4.0 KB)

Last edited by Supremache; 09-13-2020 at 12:48.
Supremache is offline
drakunovu6
Junior Member
Join Date: Sep 2017
Old 09-13-2020 , 13:09   Re: Skin Admin/vip
Reply With Quote #9

Quote:
Originally Posted by Supremache View Post
Oh there's small problem, fixed

@ drakunovu6 - you didn't fixed it, the problem was here:
I made t team with ct menu and ct team with t menu !!

Code:
case CS_TEAM_T: CustomCTMenu(id);         case CS_TEAM_CT: CustomTMenu(id);
i didn't see the code right xD, just fixing some things the format part isn't necessary to be that for every additem, I only use them to show like variables
drakunovu6 is offline
artYY
Member
Join Date: May 2020
Location: Brazil, Curitiba, PR
Old Today , 02:32   Re: Skin Admin/vip
Reply With Quote #10

Quote:
Originally Posted by Supremache View Post
Oh there's small problem, fixed

@ drakunovu6 - you didn't fixed it, the problem was here:
I made t team with ct menu and ct team with t menu !!

Code:
case CS_TEAM_T: CustomCTMenu(id);         case CS_TEAM_CT: CustomTMenu(id);
Doesn't work here...
__________________
artYY is offline
Reply


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 23:49.


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