[Include] T-Money: Server sided money - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] T-Money: Server sided money (
/showthread.php?tid=173921)
T-Money: Server sided money -
Toni - 04.09.2010
» 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:
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.
Re: T-Money: Server sided money -
rbN. - 04.09.2010
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?
Respuesta: T-Money: Server sided money -
Jesus^ - 04.09.2010
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;
}
-.-
Re: T-Money: Server sided money -
MrDeath537 - 04.09.2010
WTF!, don't use a timer for each player. Just use 1 timer with a loop.
BTW: Nice...