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

Solved Need help with cs_get_user_team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rtpg6
Junior Member
Join Date: Apr 2018
Old 11-04-2018 , 10:47   Need help with cs_get_user_team
Reply With Quote #1

Hello, i want to do the granades pickup only for T but when im doing that its good but i have logs

Code:
L 11/04/2018 - 16:44:17: [AMXX]    [0] csnadedrops.sma::pfn_touch (line 176)
L 11/04/2018 - 16:44:17: [CSTRIKE] Player out of range (149)
L 11/04/2018 - 16:44:17: [AMXX] Displaying debug trace (plugin "csnadedrops.amxx")
L 11/04/2018 - 16:44:17: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 11/04/2018 - 16:44:17: [AMXX]    [0] csnadedrops.sma::pfn_touch (line 176)
Can someone help me with that??
Line 175
Code:
 public pfn_touch(ptr,ptd)

Last edited by rtpg6; 11-05-2018 at 13:24.
rtpg6 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-04-2018 , 14:22   Re: Need help with cs_get_user_team
Reply With Quote #2

Check if the user is connected before retreiving his team.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
rtpg6
Junior Member
Join Date: Apr 2018
Old 11-05-2018 , 05:53   Re: Need help with cs_get_user_team
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Check if the user is connected before retreiving his team.
Still this same or i do something wrong

Last edited by rtpg6; 11-05-2018 at 13:24.
rtpg6 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-05-2018 , 08:26   Re: Need help with cs_get_user_team
Reply With Quote #4

???
Code:
if (!is_user_alive(ptd), cs_get_user_team(ptd) == 1)
change to
Code:
if (!is_user_alive(ptd) || cs_get_user_team(ptd) == CS_TEAM_T)
__________________


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/

Last edited by iceeedr; 11-05-2018 at 08:30.
iceeedr is offline
Send a message via Skype™ to iceeedr
rtpg6
Junior Member
Join Date: Apr 2018
Old 11-05-2018 , 13:24   Re: Need help with cs_get_user_team
Reply With Quote #5

Quote:
Originally Posted by iceeedr View Post
???
Code:
if (!is_user_alive(ptd), cs_get_user_team(ptd) == 1)
change to
Code:
if (!is_user_alive(ptd) || cs_get_user_team(ptd) == CS_TEAM_T)
Thanks man
rtpg6 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-05-2018 , 18:02   Re: Need help with cs_get_user_team
Reply With Quote #6

You want to do something if a player is terrorist, right.

Use this
PHP Code:
if ( is_user_aliveptd ) && cs_get_user_teamptd ) == CS_TEAM_T )
{


What iceeedr gave you says this, which makes no sense:
If ( player is dead OR is terrorist )
__________________

Last edited by Bugsy; 11-05-2018 at 19:39.
Bugsy is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 11-05-2018 , 18:10   Re: Need help with cs_get_user_team
Reply With Quote #7

Sorry busy, reading again the code I focus only on the error on ",", my mistake.
__________________


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
Reply


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 07:31.


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