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

Noob question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sandro Gubeladze
Senior Member
Join Date: Dec 2009
Location: MySQL DataBase
Old 01-20-2010 , 14:17   Noob question
Reply With Quote #1

1. I'm noob Don't laugh at me
2. what will this code do?

PHP Code:
   if(get_user_team(x) == 3)
   return 
PLUGIN_HANDLED

it will stop the function if user is in spec team , am i right?
Sandro Gubeladze is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 01-20-2010 , 14:44   Re: Noob question
Reply With Quote #2

Quote:
Originally Posted by Sandro Gubeladze View Post
it will stop the function if user is in spec team.
__________________
IneedHelp is offline
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 01-21-2010 , 13:38   Re: Noob question
Reply With Quote #3

While get_user_time (amxmodx.inc line 257), is available from the amxmodx include, you can use the enum from cstrike.inc to make the code more readable. The enum is found on line 148 in cstrike.inc and will allow you to do this.
Code:
if (get_user_team(id) == CS_TEAM_SPECTATOR)     return PLUGIN_HANDLED;
Making the plugin source code easily readable, and thus easily maintainable.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
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 00:32.


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