Raised This Month: $51 Target: $400
 12% 

Player skin menu (Individual CT and T)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
doguer17
New Member
Join Date: Aug 2020
Old 10-29-2020 , 12:05   Player skin menu (Individual CT and T)
Reply With Quote #1

Description:
This is a skin menu with possibility of change the default skin for CT and T, adding skins with flags (Only ADMIN or VIP can access), you can add skins as you want, skin changes to default if player changes team, it allows only 1 change per round so players can't spam the command, has cromchat to chat messages when opening, closing, selecting skins.
Commands :
"say skin",
"say skins",
"say /skin",
"say /skins",
"say_team /skin",
"say_team /skins",
"say_team skins",
"say_team skin",
"skin_menu"
You can change it in the top of sma.
Adding skins/models:
In the sma you got 3 conts for T and 3 for CT, first is NAME, in this you put the menu name for each option, being the first the default, (if you don't change the first option, it will be the default skin for everybody). 2nd is the name model, first empty, then start naming, please use the same name of .mdl and folder, here you put only the name of folder., finally you got the FLAG, in this you put which users with what flag can access to that option, then you got the same but for CT.
Now is the const for directories, here you put the dirs for models, exactly as the example.
PHP Code:
new const NAMET[][]={ // HERE YOU ADD THE NAME IN THE MENU OF T SKINS
    
"Default skin",
    
"Skin CT #1",
    
"Skin CT #2"
}
new const 
MODEL_T[][]={ // HERE YOU ADD THE SKIN NAME FOR T FOLLOWING FORMAT
     
"",
     
"model_1_t",
     
"model_2_t"
}
new const 
FLAGT[]={ // FLAG ACCESS FOR THAT SKIN
    
"",
    
ADMIN_BAN,
    
""
}
new const 
DIRS[][]={ // HERE YOU ADD THE SKINS DIRECTORIES
    //T DIRS
    
"models/player/model_1_t/model_1_t.mdl",
    
"models/player/model_2_t/model_2_t.mdl",
    
//CT DIRS
    
"models/player/model_1_ct/model_1_ct.mdl",
    
"models/player/model_2_ct/model_2_ct.mdl"

I had some versions before this, but it was very hardcoded, and not functional at all, this is the first easy and working version, need some fixes, and new things to become easier, like the option to read from a .ini, that in change team it re-select the same item but with new skin and don't change it to default.
Attached Files
File Type: sma Get Plugin or Get Source (amxx_skin_menu.sma - 414 views - 6.6 KB)

Last edited by doguer17; 10-29-2020 at 12:06.
doguer17 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-29-2020 , 21:09   Re: Player skin menu (Individual CT and T)
Reply With Quote #2

There are still parts that are hardcoded + did u test? I'm afraid the code won't work as intented.

PHP Code:
new const DIRS[][]={ // HERE YOU ADD THE SKINS DIRECTORIES
    //T DIRS
    
"models/player/model_1_t/model_1_t.mdl",
    
"models/player/model_2_t/model_2_t.mdl",
    
//CT DIRS
    
"models/player/model_1_ct/model_1_ct.mdl",
    
"models/player/model_2_ct/model_2_ct.mdl"
}
public 
plugin_precache() {
    for(new 
i=1isizeof DIRSi++)
{
    
precache_model(DIRS[i]);
     }

Also your code isn't properly indented and a lot of optimizations could be done.

And lastly... There are so many other plugins that do the job better and have more userfriendly configurations.
__________________

Last edited by Napoleon_be; 10-29-2020 at 21:09.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
doguer17
New Member
Join Date: Aug 2020
Old 10-30-2020 , 01:10   Re: Player skin menu (Individual CT and T)
Reply With Quote #3

It won't with that hardcoded at least user modify that dirs and all the "config" zone, but i want opinions to still learning and get it better, there are a lot of fixes and improvements that could be done and i want to finish it.
If u can send link of other plugin similar, i would like to see it so i can learn and try to fix the mine. i was searching and i didn't find any similar but it's ok, just for fun, just for learning
Im using that plugin in [SilentGamerZ] Fatal Killerz, not uploaded that stable version, but is there, so configurating que config zone, it works as I mention gn

Last edited by doguer17; 10-30-2020 at 01:12.
doguer17 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-20-2021 , 09:58   Re: Player skin menu (Individual CT and T)
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
There are still parts that are hardcoded + did u test? I'm afraid the code won't work as intented.

PHP Code:
new const DIRS[][]={ // HERE YOU ADD THE SKINS DIRECTORIES
    //T DIRS
    
"models/player/model_1_t/model_1_t.mdl",
    
"models/player/model_2_t/model_2_t.mdl",
    
//CT DIRS
    
"models/player/model_1_ct/model_1_ct.mdl",
    
"models/player/model_2_ct/model_2_ct.mdl"
}
public 
plugin_precache() {
    for(new 
i=1isizeof DIRSi++)
{
    
precache_model(DIRS[i]);
     }

Also your code isn't properly indented and a lot of optimizations could be done.

And lastly... There are so many other plugins that do the job better and have more userfriendly configurations.
Unapproved.

If you want to know what can be done in a better way please PM me or open a topic in scripting help(preferably the later).
__________________
HamletEagle 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 03:48.


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