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

cs_get_user_team/cs_get_user_model problems..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-09-2017 , 13:49   cs_get_user_team/cs_get_user_model problems..
Reply With Quote #1

Hi Ther, i have problem been show me in logs with those codes...
log:
Quote:
L 04/09/2017 - 20:23:02: [CSTRIKE] Invalid player 7
L 04/09/2017 - 20:23:02: [AMXX] Displaying debug trace (plugin "test.amxx", version "6.0")
L 04/09/2017 - 20:23:02: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 04/09/2017 - 20:23:02: [AMXX] [0] test.sma::changeTeam (line 2135)
code:
PHP Code:
public changeTeamid )
{
    switch( 
cs_get_user_teamid ) )
    {
        case 
CS_TEAM_CTcs_set_user_teamidCS_TEAM_T );
        case 
CS_TEAM_Tcs_set_user_teamidCS_TEAM_CT );
    }

    
round_count 0;

and this other line
log:
Quote:
L 04/09/2017 - 189:01: [CSTRIKE] Invalid player 6
L 04/09/2017 - 189:01: [AMXX] Displaying debug trace (plugin "test.amxx", version "6.0")
L 04/09/2017 - 189:01: [AMXX] Run time error 10: native error (native "cs_set_user_model")
L 04/09/2017 - 189:01: [AMXX] [0] test.sma::fm_set_user_model (line 218
L 04/09/2017 - 189:01: [AMXX] [1] test.sma::changeModel (line 1185)
code of line 1185
PHP Code:
public changeModel(id)
{
    
//log_to_file(g_logfile, "changeModel(%d) = START", id);
    
fm_set_user_model(idg_zombie_models[iClass[id]]);
    
//log_to_file(g_logfile, "changeModel(%d) = END", id);

code of line 2188:
PHP Code:
stock fm_set_user_model(playermodelname[])
{
    
cs_set_user_model(playermodelname);
    
g_model[player] = true;

__________________

Last edited by D3XT3R; 04-09-2017 at 13:50.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-09-2017 , 13:51   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #2

PS: i noticed when players spawn some of them have default models not changed ones from the plugin.
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-09-2017 , 13:54   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #3

Add is_user_connected(id).
__________________
edon1337 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-09-2017 , 13:57   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #4

should be add to if user is alive with it to slove this bug?
__________________

Last edited by D3XT3R; 04-09-2017 at 13:58.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-09-2017 , 14:57   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
Add is_user_connected(id).
__________________
edon1337 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 04-10-2017 , 14:42   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #6

problem compile -_-
agrument miss match (agrumment 2)
in lines whitch i add is_user_connected(id)
__________________

Last edited by D3XT3R; 04-10-2017 at 14:42.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-10-2017 , 14:52   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #7

Code:
public changeTeam( id ) {     if(is_user_connected(id))     {         switch( cs_get_user_team( id ) )         {             case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );             case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT );         }     }     round_count = 0; }
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-10-2017 , 15:28   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #8

Quote:
Originally Posted by D3XT3R View Post
problem compile -_-
agrument miss match (agrumment 2)
in lines whitch i add is_user_connected(id)
It's not my fault that you can't add a single check..
__________________
edon1337 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-10-2017 , 17:30   Re: cs_get_user_team/cs_get_user_model problems..
Reply With Quote #9

It depends on when you calling the function , if the client is not ingame should send an error.

Btw show us how you storing data in the models array
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-10-2017 at 17:34.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 17:54.


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