Raised This Month: $ Target: $400
 0% 

HELP.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lolzin123
Member
Join Date: Apr 2009
Old 07-31-2009 , 13:41   HELP.
Reply With Quote #1

How i edit this:
PHP Code:
if( get_user_team(plr) == 
to user team 1 or 3... like if is tr or spec...
lolzin123 is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-31-2009 , 16:47   Re: HELP.
Reply With Quote #2

Quote:
Originally Posted by lolzin123 View Post
How i edit this:
PHP Code:
if( get_user_team(plr) == 
to user team 1 or 3... like if is tr or spec...
get_user_team(index) ==1 //ts
get_user_team(index) ==2 //ct
get_user_team(index) ==3 //spec
get_user_team(index) == 0 // unnasigned
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 07-31-2009 , 16:51   Re: HELP.
Reply With Quote #3

You should use cs_get_user_team. Much better to use.

Usage:
PHP Code:
if (cs_get_user_team(plr) == CS_TEAM_T) {
      
// Player is a terrorist
}

if (
cs_get_user_team(plr) == CS_TEAM_CT) {
      
// Player is a CT
}

if (
cs_get_user_team(plr) == CS_TEAM_SPECTATOR) {
      
// Player is a spectator
}

if (
cs_get_user_team(plr) == CS_TEAM_UNASSIGNED) {
      
// Player is unassigned

zacky is offline
Send a message via Skype™ to zacky
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-31-2009 , 17:05   Re: HELP.
Reply With Quote #4

switch will be better
__________________
xPaw is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 07-31-2009 , 17:12   Re: HELP.
Reply With Quote #5

Quote:
Originally Posted by xPaw View Post
switch will be better
I only showed how to use xD.

Maybe he will use 1 of my ifs
zacky is offline
Send a message via Skype™ to zacky
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 07-31-2009 , 18:58   Re: HELP.
Reply With Quote #6

Next time you post, do not use all caps in your thread title and do not use something as generic as "help" as the title.

This is per the forum rules.

Edit this thread and change the title, or else it will be trashed.
Brad is offline
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 18:27.


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