AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   simple question for newby :) (https://forums.alliedmods.net/showthread.php?t=9388)

Damocles 01-17-2005 11:00

simple question for newby :)
 
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]

XxAvalanchexX 01-17-2005 13:20

It's possible that get_user_info cannot grab all data.

Damocles 01-17-2005 13:24

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 ??


All times are GMT -4. The time now is 19:24.

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