FabianoBN
l|¬¬"|l
This script is based on the script PAXTON.
So all credit goes to him!
More if you want to just thank me Rep++
This code is simple it adds premium points for players.
PAXTON words modified by me:
Adding the Script:
Create a folder in commands/scripts under the name points
points in the folder create a file with the name of command.php and add this inside:
Now open the file commands/commands.php
and add this:
To use the command is simple
At the command promp in the bottom of the page simply put:
/points FabianoBN,100
So all credit goes to him!
More if you want to just thank me Rep++
This code is simple it adds premium points for players.
PAXTON words modified by me:
I hope you do not fret!You put something like this /points FabianoBN,300 and it will give level 300 to FabianoBN, 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!
Adding the Script:
Create a folder in commands/scripts under the name points
points in the folder create a file with the name of command.php and add this inside:
PHP:
<?php
/*
* @description: Command for Modern AAC to add Points
* @author: Paxton
* @rev: 1.0
* @modify FabianoBN
*/
$name = @$args[0];
$p = @(int)$args[1];
if(empty($name) || empty($p)) die('Two arguments are required.<br/>');
$CI =& get_instance();
$CI->load->database();
$id = $CI->db->query("SELECT account_id FROM players WHERE name = \"".$name."\"")->result_array();
if(empty($id)) die('Could not find character.<br/>');
$CI->db->query("UPDATE `accounts` SET `premium_points` = `premium_points` + $p WHERE id = ".$id[0]['account_id']);
die('Added '.$p.' points for '.ucwords($name).'<br/>');
?>
Now open the file commands/commands.php
and add this:
PHP:
$commands['/points'] = array('access'=>5, 'path'=>'points/command.php');
To use the command is simple
At the command promp in the bottom of the page simply put:
/points FabianoBN,100
Last edited: