[Include] T-Money: Server sided money
#1

» T-Money: Server sided money «
• Introduction
This 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).
• Installation
Add this:
pawn Код:
#include <T-Money>
And all you need to do is add 2 simple functions.
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
• Credits
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.
Reply
#2

Question.. If you do a stunt bonus, do you get kicked/banned? Also, if you don't get kicked or banned, you can't earn money from stunt bonusses anymore right?
Reply
#3

Great job Toni 10/10


Quote:
Originally Posted by RobinOwnz
Посмотреть сообщение
Question.. If you do a stunt bonus, do you get kicked/banned? Also, if you don't get kicked or banned, you can't earn money from stunt bonusses anymore right?
pawn Код:
public omgwtfh4x(playerid)
{
    if(Money[playerid] < GetPlayerMoney(playerid))
    {
        new
            str[128],
            pName[24];
        GetPlayerName(playerid, pName, 24);
        format(str, sizeof(str), "SERVER: %s has been kicked for money hacking!", pName);
        SendClientMessageToAll(0xFFFFFF, str);
        Kick(playerid);
    }
    return 1;
}
-.-
Reply
#4

WTF!, don't use a timer for each player. Just use 1 timer with a loop.

BTW: Nice...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)