Paxton
Banned User
This is how it works.
You put something like this /level Paxton,300 and it will give level 300 to Paxton, you put this in the command line below footer do not put this into the CMD line in admin panel, this is the wrong command line!
Create folder called level in: commands/scripts
inside this folder, create file called command.php and paste this there:
Now open commands/commands.php
and paste this at the end:
Thats done, and now like I said in the command line below the footer, write something like: /level Paxton,350
You can set the access in commands.php to something different, default is admin.
Thanks
You put something like this /level Paxton,300 and it will give level 300 to Paxton, you put this in the command line below footer do not put this into the CMD line in admin panel, this is the wrong command line!
Create folder called level in: commands/scripts
inside this folder, create file called command.php and paste this there:
PHP:
<?php
/*
* @description: Command for Modern AAC to add levels
* @author: Paxton
* @rev: 1.0
*/
$name = @$args[0];
$level = @(int)$args[1];
if(empty($name) || empty($level)) die('Two arguments are required.<br/>');
$CI =& get_instance();
$CI->load->database();
$id = $CI->db->query("SELECT id FROM players WHERE name = \"".$name."\"")->result_array();
if(empty($id)) die('Could not find character.<br/>');
$CI->db->query("UPDATE players SET level = $level WHERE id = ".$id[0]['id']);
die('Level '.$level.' has been given to '.ucwords($name).'<br/>');
Now open commands/commands.php
and paste this at the end:
PHP:
$commands['/level'] = array('access'=>5, 'path'=>'level/command.php');
Thats done, and now like I said in the command line below the footer, write something like: /level Paxton,350
You can set the access in commands.php to something different, default is admin.
Thanks