• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Modern AAC][Command] Adding Premium Points

FabianoBN

l|¬¬"|l
Joined
Jan 23, 2009
Messages
745
Reaction score
22
Location
Goias - Brazil
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:
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!
I hope you do not fret!

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:
You put something like this /points FabianoBN,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!
So who will get points? ;p
/*
* @description: Command for Modern AAC to add levels
* @author: Paxton
* @rev: 1.0
* @modify FabianoBN
*/
Fix that.
Anyway, good job :)
 
Back
Top