Raised This Month: $ Target: $400
 0% 

[?]set_task and ResetHUD


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sb123
Senior Member
Join Date: Jan 2007
Old 04-30-2007 , 03:19   [?]set_task and ResetHUD
Reply With Quote #1

PHP 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 
resetModel()
{
 
set_task(30"reset")
}
public 
reset(idlevelcid) {
        if (
get_user_flags(id) & ADMIN_LEVEL_C) {
                new 
CsTeams:userTeam cs_get_user_team(id)
                if (
userTeam == CS_TEAM_T) {
                        
cs_set_user_model(id"te")
                }
                else if(
userTeam == CS_TEAM_CT) {
                        
cs_set_user_model(id"ct")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }
        return 
PLUGIN_CONTINUE

not..

L 04/28/2007 - 12:594: Start of error session.
L 04/28/2007 - 12:594: Info (map "de_corruption_cz") (logfile "error_042807.log")
L 04/28/2007 - 12:594: [CSTRIKE] Invalid player 31
L 04/28/2007 - 12:594: [AMXX] Run time error 10 (plugin "amx_adminmodel.amxx") (native "cs_get_user_team") - debug not enabled!
L 04/28/2007 - 12:594: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
sb123 is offline
Send a message via ICQ to sb123 Send a message via MSN to sb123 Send a message via Yahoo to sb123
 



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 06:45.


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