Raised This Month: $32 Target: $400
 8% 

Admin model plugin modification


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
niiii
Member
Join Date: Sep 2013
Old 06-10-2015 , 08:18   Admin model plugin modification
Reply With Quote #1

Hello, I use this plugin to change player skins

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

public plugin_init() {
        register_plugin("AMX Admin Model", "1.1.1", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/pgeu_ct/pgeu_ct.mdl")
        precache_model("models/player/pgeu_t/pgeu_t.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_LEVEL_H) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "pgeu_t")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "pgeu_ct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}

Can anybody help me that I need to make that everyone on the server can chose if admin models show? I'd like to have there menu after somebody types /models, and in this menu everyone can set the models on/off?
niiii is offline
belouga
AlliedModders Donor
Join Date: Jun 2015
Location: Paris 16, Ile-de-France,
Old 06-10-2015 , 08:42   Re: Admin model plugin modification
Reply With Quote #2

Sorry, i don't look category.

Last edited by belouga; 06-10-2015 at 12:00. Reason: mislead
belouga is offline
niiii
Member
Join Date: Sep 2013
Old 06-10-2015 , 08:48   Re: Admin model plugin modification
Reply With Quote #3

I need to add /skins command ingame, after typing it, menu shows and everyone can chose if you see default player models or admin models.. Im not good at pawn it would be nice if anybody could help me
niiii is offline
belouga
AlliedModders Donor
Join Date: Jun 2015
Location: Paris 16, Ile-de-France,
Old 06-10-2015 , 09:55   Re: Admin model plugin modification
Reply With Quote #4

Just look my last post.

Last edited by belouga; 06-10-2015 at 09:58.
belouga is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-10-2015 , 10:36   Re: Admin model plugin modification
Reply With Quote #5

Quote:
Originally Posted by belouga View Post
I did not really understand you problems but look here can be that he can use. https://forums.alliedmods.net/showthread.php?p=780243
If you want that we can one/off skin it is enough to create a menu.
Does amxmodx tell you something ?
__________________
HamletEagle 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 21:31.


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