Raised This Month: $51 Target: $400
 12% 

Help plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
armysg4
New Member
Join Date: Jan 2018
Location: Romania
Old 01-17-2018 , 08:31   Help plugins
Reply With Quote #1

Quote:
Originally Posted by armysg4
I am a problem with a script,you now what is the problem?
ERROR:
Code:
L 01/05/2018 - 16:26:57: Start of error session.
L 01/05/2018 - 16:26:57: Info (map "css_dust2x2_go") (file "addons/amxmodx/logs/error_20180105.log")
L 01/05/2018 - 16:26:57: [CSTRIKE] Invalid player 1
L 01/05/2018 - 16:26:58: [AMXX] Displaying debug trace (plugin "covipskin.amxx")
L 01/05/2018 - 16:26:58: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 01/05/2018 - 16:26:58: [AMXX]    [0] covipskin.sma::resetModel (line 24)
plugins:
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>



#define VIP_LEVEL ADMIN_LEVEL_T

public plugin_init() {
        register_plugin("AMX VIP Model", "1.1.1", "Mr.Alex")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/2wesker/2wesker.mdl")
        precache_model("models/player/1wesker/1wesker.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, "2wesker")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "1wesker")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}
LINE 24 IS:
Code:
 new CsTeams:userTeam = cs_get_user_team(id)
what is wrong???
please help me
__________________
armysg4 is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-17-2018 , 08:46   Re: Help plugins
Reply With Quote #2

Can be try first
Code:
new CsTeams:userTeam;
userTeam = cs_get_user_team(id)
and
Code:
public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_LEVEL_H) {

                if(get_user_team(id) == 1) {
                        cs_set_user_model(id, "2wesker")
                }
                else if(get_user_team(id) == 2) {
                        cs_set_user_model(id, "1wesker")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}

Last edited by raizo11; 01-17-2018 at 08:48.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
armysg4
New Member
Join Date: Jan 2018
Location: Romania
Old 01-19-2018 , 09:48   Re: Help plugins
Reply With Quote #3

work fine,is not problem,THX man.
__________________
armysg4 is offline
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 12:08.


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