Raised This Month: $ Target: $400
 0% 

simple question for newby :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Damocles
Member
Join Date: Jan 2005
Old 01-17-2005 , 11:00   simple question for newby :)
Reply With Quote #1

hey all, why doesnt this code work

Its something to do with the console_print command. This is the first plugin ive ever written sorry, i know theres a simple answer.

Code:
    new Players[32]     new playerCount, i     // 'c' indicates that bots are skipped     get_players(Players, playerCount, "c")     console_print(id, "Current Player Rates")     console_print(id, "Player Name - rate - cl_rate - cl_cmdrate - cl_updaterate")     for (i=0; i<playerCount; i++)     {         new rate[10], cl_rate[10], cl_cmdrate[5], cl_updaterate[5]         new playerName[32]         new uid         // Get players ID         //uid =  get_user_userid(Players[i])         uid = Players[i]         get_user_name (uid, playerName, 31)             // Get player rate         get_user_info(uid, "rate", rate, 9)         // Get player cl_rate         get_user_info(uid, "cl_rate", cl_rate, 9)         // Get player cl_cmdrate         get_user_info(uid, "cl_cmdrate", cl_cmdrate, 4)         // Get player cl_updaterate         get_user_info(uid, "cl_updaterate", cl_updaterate, 4)         console_print(id, "%s - %s - %s - %s - %s", playerName, rate, cl_rate, cl_cmdrate, cl_updaterate)     }

im getting this output:

Current Player Rates
Player Name - rate - cl_rate - cl_cmdrate - cl_updaterate
-=F.L.1=- Makaveli - 21000 - - - 70
CaRloS - 20000 - - - 101
|PwN| ghostkiller - 0 - - - 20
-=F.L.1=- J[!]nX - 20000 - - - 60
-=F.L.1=- litle-Ho - 20000 - - - 72
Jenova - 20000 - - - 60
naughty - 20000 - - - 40
-=F.L.1=-lil_ze - 15000 - - - 60
Kupo! - 20000 - - - 60
KTM SM G Spot - 15000 - - - 60
Onion_Soup - 18000 - - - 79

Thanks for any help

Damo.[/small]
Damocles is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-17-2005 , 13:20  
Reply With Quote #2

It's possible that get_user_info cannot grab all data.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Damocles
Member
Join Date: Jan 2005
Old 01-17-2005 , 13:24  
Reply With Quote #3

yeah ive assigned set values to the other varaibles and im getting the output. so the problem lies with retrieving certain values from the users.

Is there any other way to get this to work ?? Its strange it works for a value like cl_updaterate and not cl_rate or cl_cmdrate ??
Damocles 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 19:24.


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