Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
functions [2016/12/05 22:11] textstorm |
functions [2016/12/05 22:13] textstorm [Send a User a System Message] |
||
---|---|---|---|
Line 59: | Line 59: | ||
**Function:** public function GiveChest($db, $reason) | **Function:** public function GiveChest($db, $reason) | ||
- | To give a user a weapon: | + | To give a user a chest: |
<file php GiveChest.php> | <file php GiveChest.php> | ||
//the below would give the user the chest with the reason "Hull" in the Admin Panel | //the below would give the user the chest with the reason "Hull" in the Admin Panel | ||
Line 66: | Line 66: | ||
===== Send a User a System Message ===== | ===== Send a User a System Message ===== | ||
This allows you to send a user a message from the System user | This allows you to send a user a message from the System user | ||
+ | |||
+ | **Function:** public function SysMessage($db, $username, $message) | ||
+ | |||
+ | To send a System message to a user: | ||
+ | <file php SystemMessage.php> | ||
+ | //The below would send a message to Steve from the System user telling him he won the race and how much he won | ||
+ | $user->SysMessage($db, "Steve", "You have won the race and received $coins coins!"); | ||
+ | </file> | ||
===== Generate a Tooltip ===== | ===== Generate a Tooltip ===== | ||
This allows you to generate a tooltip - when text is hovered over a CSS box will display with more information. | This allows you to generate a tooltip - when text is hovered over a CSS box will display with more information. |