Raised This Month: $32 Target: $400
 8% 

Get user team error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Saint Sinner
Senior Member
Join Date: Feb 2016
Old 05-15-2019 , 06:12   Get user team error
Reply With Quote #1

L 05/15/2019 - 12:58:50: [AMXX] Displaying debug trace (plugin "duel.amxx", version "1.0")
L 05/15/2019 - 12:58:50: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 05/15/2019 - 12:58:50: [AMXX] [0] 267rfuts.sma.p::statusx (line 291)


Code:
public statusx(id)
{
    	new name[32],pid = read_data(2)
    	get_user_name(pid,name,31)
	new idAiming, iBodyPart
	get_user_aiming(id, idAiming, iBodyPart)
    
	if(is_user_alive(idAiming) && is_user_alive(id) ,get_pcvar_num(cvar_allinfo)) 
	{
		if(cs_get_user_team(id) == CS_TEAM_T && cs_get_user_team(idAiming) == CS_TEAM_CT)
		{
			set_hudmessage(238,201,0,-1.0,0.70,1, 0.01, 3.0, 0.01, 0.01, -1)
			show_hudmessage(id, "%s ^n [ Kills: %d - Deaths %d ] ^n [ Winns: %d - Loss: %d ]", name,g_kills[pid],g_deaths[pid],g_winns[pid],g_loss[pid])
		}
		else 
		if(cs_get_user_team(id) == CS_TEAM_CT && cs_get_user_team(idAiming) == CS_TEAM_T) // This Line
		{
			set_hudmessage(238,201,0,-1.0,0.70,1, 0.01, 3.0, 0.01, 0.01, -1)
			show_hudmessage(id, "%s ^n [ Kills: %d - Deaths %d ] ^n [ Winns: %d - Loss: %d ]", name,g_kills[pid],g_deaths[pid],g_winns[pid],g_loss[pid])
		}

	}
}
Saint Sinner is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-15-2019 , 08:15   Re: Get user team error
Reply With Quote #2

PHP Code:
cs_get_user_team(idAiming


PHP Code:
cs_get_user_team(pid
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Old 05-15-2019, 12:18
EFFx
This message has been deleted by EFFx. Reason: nvm
E1_531G
Senior Member
Join Date: Dec 2017
Old 05-15-2019 , 14:37   Re: Get user team error
Reply With Quote #3

The only broken part is here:
Quote:
if(is_user_alive(idAiming) && is_user_alive(id) ,get_pcvar_num(cvar_allinfo))
I think it has to be:
Quote:
if(is_user_alive(idAiming) && is_user_alive(id) && get_pcvar_num(cvar_allinfo) > 0)
__________________
My English is A0
E1_531G is offline
Saint Sinner
Senior Member
Join Date: Feb 2016
Old 05-15-2019 , 16:06   Re: Get user team error
Reply With Quote #4

Quote:
Originally Posted by iceeedr View Post
PHP Code:
cs_get_user_team(idAiming


PHP Code:
cs_get_user_team(pid

thanks ! I dont have error now if i have i will post here... thanks for help people

Last edited by Saint Sinner; 05-15-2019 at 16:08.
Saint Sinner 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 20:07.


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