Raised This Month: $ Target: $400
 0% 

Help with one script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fr4Nc3Zu
Junior Member
Join Date: Jul 2008
Old 09-20-2012 , 10:21   Help with one script
Reply With Quote #1

Hello..i dont know scripting..but i have one friend who made this script:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
        
register_plugin("Vip Model""1.0""Schultz")
        
register_event("ResetHUD""resetModel""b")
        return 
PLUGIN_CONTINUE
}

public 
plugin_precache() {
        
precache_model("models/player/vip_ct/vip_ct.mdl")
        
precache_model("models/player/vip_te/vip_te.mdl")

        return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
        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"vip_te")
                }
                else if(
userTeam == CS_TEAM_CT) {
                        
cs_set_user_model(id"vip_ct")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE

The script it`s working..but has a small error occasionally:
PHP Code:
[AMXXRun time error 10 (plugin "vip_model.amxx") (native "cs_get_user_team") - debug not enabled
Any clue what`s that about ? It helps if i put the plugin in debug mod ?

Last edited by Fr4Nc3Zu; 09-22-2012 at 17:40.
Fr4Nc3Zu is offline
 


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 08:13.


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