04.09.2010, 01:53
(
Последний раз редактировалось Toni; 04.09.2010 в 02:16.
)
» T-Money: Server sided money «
• IntroductionThis is a simple server side include, which uses a person varialbe to see if the player's money has gone over the var.
If the player's money is a greater value then their var, they will be kicked/banned according to what you want.
• Functions
There are 3 functions, that you can use.
pawn Код:
T_GivePlayerMoney(playerid, amount); // Give a player money.
T_ResetPlayerMoney(playerid); // Reset a player's money.
T_TakePlayerMoney(playerid, amount); // Take a person's money (subtraction).
Add this:
pawn Код:
#include <T-Money>
pawn Код:
// If you are using this in a game mode, use this:
T_OnGameModeInit(); // Add this under OnGameModeInit
T_OnGameModeExit(); // Add this under OnGameModeExit
// If you are using this in a filterscript, use this:
T_FilterScriptInit(); // Add this under OnFilterScriptInit
T_FilterScriptExit(); // Add this under OnFilterScriptExit
Me - I did this from scratch without help xD (it was VERY simple).
• Download
v1.0 - Pastebin - This is a kick/ban for money hax. Change Kick(playerid) to Ban(playerid) if you want.
v1.1 - Pastebin - This was a quick update; I switched enum to an variable. This is also kick/ban.
I will quickly be making a update; to reset a player's money to the original one before hax.
Just in case some people don't want kick/ban.