Jump to content
MakeWebGames

User Actions - Player Logs 2.0.0

$6

   (0 reviews)

5 Screenshots

About This File

What is User Actions

User Actions logs every action a player does within your game. These actions can then be shown on your game which I call "Game Wall" and "Player Wall". The "Game Wall" shows actions from every player while "Player Walls" show actions from only an individual player which can be found from a players profile. The ACP shows all game actions or you can search via player or player id. You can also set whether a particular log is for private viewing (only the player or an admin/mod with module rights can view)

Features

  • Individual Player Walls
  • Game Wall
  • Choose which actions to display
  • Choose colors of each specific action

Here's the options of what can be logged and be displayed

  • When a player logs in
  • When a player logs out
  • When and how many bullets a player purchases
  • When a player crushes are car and what car
  • When a player sells a car and what car
  • When a player repairs a car and what car
  • When a player withdrawals money and how much
  • When a player deposits money and how much
  • When a player send money to another player and who it was sent to as well as how much was sent
  • When a player successfully or fails committing a crime. What crime and the reward if any.
  • When a player successfully steals a car or fails stealing a car and what car if any..
  • If a player successfully escapes or fails in the police in a chase and the reward.
  • If a player fails or succeeds in escaping someone from jail and who.
  • When a player travels and to where
  • When a player drops a property and the location
  • When a player transfers a property and to who
  • When a player removed a bounty and who
  • When a player hired a detective and on who and how much it cost
  • And many more with with custom hooks

In addition all the following have been converting into links instead of text on the "Game Wall" and "Player Wall" aka the action log feeds.

  • All usernames
  • All places
  • All crimes
  • All police chase events
  • All jail events trying to escape prisoner

And to can choose how many actions to display.

How To Install:

  • Open up your game
  • Go to the admin Panel
  • Go to Modules & Themes
  • Open the Module Manager
  • Click on Install Module
  • Upload the ZIP file

There are 1 bug fix that needs to be addressed to get this mod to work. The login modules that come with GL. I have included the changes in the purchase or you can manually fix the problems yourself with instructions in the instructions.txt file included.

To change how many actions to display at once, you will need to edit userActions.inc (for now)

To change how many actions to display:

public $actionsToShow = 100;

Replace the 100 with the # you prefer

To add custom actions or custom text to display in the control panel, just implement the following hook:

new hook("ActionLogFormatter", function ($action) {
 global $page;
 $data['data'] = $action['data'];
 if ($action['data']['module'] == 'crimes') {
  if ($action['data']['success'] == true) {
   $data['data'] = [
     //'style' => '', // Put a color here to override
     'adminOutcome' => 'Success', 
     'adminContent' => getCrime($action['data']['actionID']), 
     'msg' => " was successful at committing the crime <a href='?page=crimes&action=commit&crime={$action['data']['actionID']}'>" . getCrime($action['data']['actionID']) . "</a> and rewarded: " . $page->money($action['data']['reward']),
   ];
  }
  else {
   $data['data'] = [
     //'style' => '', // Put a color here to override
     'adminOutcome' => 'Fail', 
     'adminContent' => getCrime($action['data']['actionID']),
     'msg' => " failed at committing the crime <a href='?page=crimes&action=commit&crime={$action['data']['actionID']}'>" . getCrime($action['data']['actionID']) . "</a>", 
   ];
  }

 }
 $data['data'] = array_merge($action['data'], $data['data']);
 return $data;
});
  • style: This is a color for the border in the player's action log
  • adminOutcome: Displays this text in the ACP when viewing all of the player's logs (Outcome column)
  • adminContent: Displays this text in the ACP when viewing all of the player's logs (Reward column)
  • msg: Displays this text when viewing a player's action log

If you have any problems setting the mod up too work properly or configuring it to your liking, message me.

I know this mods works work the latest version of GL. I'm am not certain how many versions back this is compatible with, as long as HOOKS are implemented in your version of GL them this should work.

 

Edited by KyleMassacre
updated info


What's New in Version 2.0.0   See changelog

Released

  1. Styling update
  2. Modify actions via ACP
    1. Add actions to display
    2. Modify success/failure colors
    3. Toggle visibility. If private, will show only to the user and to admin/mod with module access
    4. Toggle action enable/disable. If disabled, the action will not show
  3. Add hook for custom actions.
    1. Add ability to alter text in ACP for success/failure
    2. Add ability to alter text in module view for success/failure
  • Thanks 1
 Share



User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
×
×
  • Create New...