Does This Help?
- Yes
- No
0 voters
Hey guys, So I have had this for a while its an easy simple little thing for you guys, I’m not releasing the entire es_extended but here is the what I use and how to use it and where to put it for you guys its sort of essential if you want to keep track of transfers of money or other things depending on how you implement it, this could be implemented into different things as well. I know this is common sense but a lot of people are having issues with it so I decided to release it to the public so you guys can enjoy.
SQL Query To create table
CREATE TABLE IF NOT EXISTS `transfer` (
`Sender` varchar(50) DEFAULT NULL,
`Type` varchar(50) DEFAULT NULL,
`Amount` int(11) DEFAULT NULL,
`Reciever` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Money Transfer Information';
Add this to your es_extended\server\main.lua where you give item_money and item_account
Item_money - line 294 (add)
MySQL.Async.execute('INSERT INTO transfer (Sender, Type, Amount, Reciever)VALUES (@Sender, @Type, @Amount, @Reciever) ',
{
['@Sender'] = sourceXPlayer.name,
['@Type'] = 'Cash',
['@Amount'] = itemCount,
@Reciever = targetXPlayer.name
}
)
item_account - Line 318 (add)
MySQL.Async.execute('INSERT INTO transfer (Sender, Type, Amount, Reciever)VALUES (@Sender, @Type, @Amount, @Reciever) ',
{
['@Sender'] = sourceXPlayer.name,
['@Type'] = 'Cash',
['@Amount'] = itemCount,
['@Reciver'] = targetXPlayer.name
}
)
I know this is not just a file to download its a little work but its common sense, and this will log those individual transfers you can also log other things if you’d like by just altering the SQL Execute.
What it will look like