Raised This Month: $62 Target: $400
 15% 

plugin problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-25-2004 , 09:19   plugin problem
Reply With Quote #1

Right now im working on a simple say /me plugin for my server, everything is working except for it tekking the user what team hes on. Heres my code:

Code:
////////////////////// #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> ////////////////////// #define TEAM_T 1 #define TEAM_CT 2 ////////////////////// public plugin_init() {     register_plugin("Server Info","0.1","Knekter")     register_clcmd("say /me","info",0,": tells the player his info") } ////////////////////// public info(id) {     new hp = get_user_health(id)     new armor = get_user_armor(id)     new money = cs_get_user_money(id)     new kills = get_user_frags(id)     new deaths = cs_get_user_deaths(id)     new team = cs_get_user_team(id)     if(team == 1)     {         team = num_to_word(team,"T",1)     }     else     {         team = num_to_word(team,"CT",2)     }     client_print(id,print_chat,"[AMXX] HP: %i | Armor: %i | Money: %i | Kills: %i | Deaths: %i | Team: %s",hp,armor,money,kills,deaths,team)     return PLUGIN_HANDLED }
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
Ezekiel
Member
Join Date: Mar 2004
Old 03-25-2004 , 10:12  
Reply With Quote #2

Code:
get_user_team(index, team[]="", len = 0)

Quote:
Returns team id. When length is greater then 0
then the name of team is set.
so set length to >0 ?
then you dont need the if team == etc bit i dont think, should just be able to print team i think.
Ezekiel 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 01:06.


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