Raised This Month: $ Target: $400
 0% 

[?]set_task and ResetHUD


Post New Thread Reply   
 
Thread Tools Display Modes
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
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-30-2007 , 03:23   Re: [?]set_task and ResetHUD
Reply With Quote #2

Code:
public resetModel(id) {      set_task(30, "reset", id) } public reset(id) {      if(!is_user_connected(id))           return; //...
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
sb123
Senior Member
Join Date: Jan 2007
Old 04-30-2007 , 03:57   Re: [?]set_task and ResetHUD
Reply With Quote #3

public reset(id, level, cid)
change to
public reset(id) is ok??
sb123 is offline
Send a message via ICQ to sb123 Send a message via MSN to sb123 Send a message via Yahoo to sb123
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-30-2007 , 04:06   Re: [?]set_task and ResetHUD
Reply With Quote #4

Code:
public reset(id, level, cid) is the when you use to register a concmd/clcmd. //... when you use set task. public reset(id) or public reset(param[], id) if you use the param in set_task.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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 06:45.


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