Thread: Mys 1.3.4 Easy Change User Cash
View Single Post
  #1  
Old 07-01-2016, 08:33 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,345
Abronsyth is on a distinguished road
Default Easy Change User Cash

This is an extremely simple mod that will enable you to change a user's cash amount in the Admin Control Panel. There are just two pieces of code that will need to be implemented.

admincp/user.php
In this file you'll want to go down to around line 52 or so, where you'll see this;
PHP Code:
$mysidia->db->update("users", array("email" => $mysidia->input->post("email")), "uid='{$mysidia->input->get("uid")}'"); 
Right below that, just add this in:
PHP Code:
$mysidia->db->update("users", array("money" => $mysidia->input->post("money")), "uid='{$mysidia->input->get("uid")}'"); 
admincp/view/userview.php
In this file you'll want to go down to find public function edit, and then find where this chunk of code is (lines 53-54 for me):
PHP Code:
->buildCheckBox(" Email the user the new password (Only takes effect if setting a new password) ""emailpwchange""yes")
                     ->
buildComment("Change Email Address: "FALSE)->buildTextField("email"$user->getemail()) 
Right below that add in this;
PHP Code:
->buildComment("Currency: "FALSE)->buildTextField("money"$user->money
So now when you go into your ACP to edit a user you can now edit their cash amount, and it will show you how much they currently have!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote