Fixing is the main job over time. If you are able to do, then its basically enough for the first and you are good placed
Rank-ME [Replaced]
Discussion in 'Plugin Support' started by Steenamaroo, May 29, 2015.
-
You know what...let's not rush things.
Update coming soon. -
-
well this is a welcome site this morning. well done.
-
How's the I/O loading on this new version?
-
Hi Kinesis
It's just the same plugin that it's always been, but with all the little patches and update fixes.
No major changes at all. -
-
Well I'll be damned
-
dont know if someone allready asked for but is it possible to grab the user rank informations to show them on a website?
-
Hi,
It's possible but would involve php/scripts to copy the json to your webserver then parse the data into tables, unless someone knows a better way?
If there's ever to be a c# version, a mysql db option would be fantastic, I think. -
-
f = filter
m = maximum output
rankme_wrapper.php?f=animals&m=2
Code:<? //settings $table_headers = array(admin,animals,arrows ,barrels ,built,bullets, crafted,deaths,demolished,explosives,healed ,helis,kdr,name, npckills,pvedistance,pvpdistance,pvpkills,repaired,resources, rockets,sdr,sleepers,suicides,turrets,upgraded,wounded);$max_output = $_REQUEST['m']; $filter = $_REQUEST['f'];////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////function get_rankme_db() { //path to your rankme-db.json file. make sure its accessable by php $jsondata = file_get_contents('/home/rustserver/serverfiles/server/rust-server/oxide/data/rankme-db.json'); $data = json_decode($jsondata, true); return $data; }////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////function make_comparer() { $criteria = func_get_args(); foreach ($criteria as $index => $criterion) { $criteria[$index] = is_array($criterion) ? array_pad($criterion, 3, null) : array($criterion, SORT_ASC, null); } return function($first, $second) use (&$criteria) { foreach ($criteria as $criterion) { list($column, $sortOrder, $projection) = $criterion; $sortOrder = $sortOrder === SORT_ASC ? -1 : 1; if ($projection) { $lhs = call_user_func($projection, $first[$column]); $rhs = call_user_func($projection, $second[$column]); } else { $lhs = $first[$column]; $rhs = $second[$column]; } if ($lhs < $rhs) { return -1 * $sortOrder; } else if ($lhs > $rhs) { return 1 * $sortOrder; } } return 0; }; }$array = get_rankme_db(); usort($array, make_comparer($filter)); ?><table border="1" cellpadding="1"> <thead> <tr> <?php foreach($table_headers as $key){ echo "<th>".$key."</th>"; } ?> </tr> </thead> <tbody> <?php $i = 0; foreach($array as $key){ if(++$i > $max_output) break;?> <tr> <?php foreach($key as $item){ ?> <td><?php echo $item;?></td> <?php } ?> </tr> <?php } ?> </tbody> </table>
-
Nice work man. Thanks for sharing!
-
Tremendous
-
Failed to call hook 'OnEntityDeath' on plugin 'rankme v2.6.4' Traceback (most recent call last): File "rankme.py", line 597, in OnEntityDeath RuntimeError: Failed to call OnEntityDeath (KeyNotFoundException: pvedistance) at IronPython.Runtime.PythonDictionary.GetItem (object) <0x0006c> at IronPython.Runtime.PythonDictionary.get_Item (object) <0x00024> at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,string) <0x00097> at (wrapper dynamic-method) object.OnEntityDeath$6 (System.Runtime.CompilerServices.Closure,IronPython.Runtime.PythonFunction,object,object,object) <0x05e1d>
-
Anyone else getting this?
My server stats has PVP and PVE death stats on record so I don't think I am. -
-
I think you'd have to modify the plugin but it's not hard.
Have a look at the CS, but PM me if you're stuck. -
Hello everybody!
I have a problem - then attempting to delete anybody's stats(/rankme del <nick>) I'm getting this error:
Code:Failed to call hook 'plugin_CMD' on plugin 'rankme v2.6.4' Traceback (most recent call last): File "rankme.py", line 936, in plugin_CMD File "rankme.py", line 1023, in store_player RuntimeError: Failed to call plugin_CMD (MissingMemberException: 'NoneType' object has no attribute 'authLevel') at Microsoft.Scripting.Interpreter.ThrowInstruction.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0 at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0
-
Are you admin? I'm not having this problem.