Raised This Month: $ Target: $400
 0% 

Models won't turn off?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 12-31-2005 , 15:32   Models won't turn off?
Reply With Quote #1

Okay, trying to make a plugin for the ladies in servers. What it is supposed to do, is if they have the defined admin flag, they can access a menu with the cmd "femalemenu" and they can choose "on" or "off"

Problem is it nevers turns the model off, and everyone can access it. The access part I'm guessing I just forgot to add cmd_access, but that I can fix.

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define ADMIN_ACCESS ADMIN_LEVEL_H new bool:hasfem[33]=false public plugin_init() {     register_plugin("Female Skins", "1.0", "Kensai")     register_concmd("femalemenu","Models",ADMIN_ACCESS,"Opens up the Female Skin Menu")     register_menucmd(register_menuid("menu_Models"),1023,"DoModels");     register_event("ResetHUD", "resetModel", "b")     return PLUGIN_CONTINUE } public plugin_precache() {     precache_model("models/player/f_ct/f_ct.mdl")     precache_model("models/player/f_t/f_t.mdl") } public client_putinserver(id) {     hasfem[id] = false } public resetModel(id,level,cid) {         if (get_user_flags(id) & ADMIN_ACCESS)     {                 new CsTeams:userTeam = cs_get_user_team(id)                 if (userTeam == CS_TEAM_T) {             cs_set_user_model(id,"f_t")             hasfem[id] = true                 }                 else if(userTeam == CS_TEAM_CT) {             cs_set_user_model(id,"f_ct")             hasfem[id] = true                 }                 else {             cs_reset_user_model(id)             hasfem[id] = false                 }         }         return PLUGIN_CONTINUE } public Models(id) {       if(!get_user_flags(id) & ADMIN_ACCESS)     return PLUGIN_HANDLED         new menu[192]       format(menu, 191, "Female Skins: On/Off^n^n1. On^n2. Off^n^n0. Exit")         new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_0     show_menu(id, keys, menu, 15, "menu_Models")             return PLUGIN_HANDLED }   public DoModels(id,level,cid,key) {     if(key == 0)     {         resetModel(id,level,cid)         hasfem[id] = true         client_print(id,print_chat,"[FEM] Model turned on successfully.")     }             if(key == 1)     {         cs_reset_user_model(id)         hasfem[id] = false         client_print(id,print_chat,"[FEM] Model turned off successfully.")     }     if(key == 0)     {         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }

Thanks.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
NoobSack ^_-
Member
Join Date: Oct 2005
Old 12-31-2005 , 16:31  
Reply With Quote #2

this would be a nice feature.

i have alot of girls in my server... 5-6 i can think of.

they have been asking about this
__________________
Post a response here or at
www.OregonCS.com - On my Forums.

NoobSack ^_- is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 12-31-2005 , 16:37  
Reply With Quote #3

Dude just have it so that when that when they turn off the models it sets there models to the default models of cs by saying
cs_set_user_model(id, "Default Model Name")

u get it?
Styles is offline
Send a message via AIM to Styles
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 12-31-2005 , 17:14  
Reply With Quote #4

Because I want their models reset, not set. I don't wanna have to code more of checking teams and reseting models, if I can just say one line. I just want to know why it isn't working.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 12-31-2005 , 17:46  
Reply With Quote #5

Ok i did find a command

cs_reset_user_model ( index ) like you have

also you could
new currentmodel[33]
cs_get_user_model (id, currentmodel)
cs_set_user_model (id, currentmodel)

?
Styles is offline
Send a message via AIM to Styles
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 16:04.


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