AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   TSRP fine-mod help (https://forums.alliedmods.net/showthread.php?t=19582)

wesker 10-20-2005 04:01

TSRP fine-mod help
 
ok, people that are mcpd have been giving fines to friends as negitive amounts. ie: say: /fine -1000000

if the "-" wasnt there it would take it out of their bank account but when the "-" sign is there, the person that was fined gets that amount.

is there a way to ither get rid of the fine-mod and fix it so they cant do negitive amounts?

wesker 10-20-2005 05:12

sigh, the people on harbu forums wouldnt help me...

Sodium 10-20-2005 05:48

Find the function for giving money, then find how it gives it.. In the top of the money-giving function add.

Code:
if(MoneyGiven < 0) { //must replace MoneyGiven with correct var.       client_print(id,print_chat,"You can't give negative sums of money!")       return PLUGIN_HANDLED }

wesker 10-21-2005 07:20

i cant find that? do you know where it would be?

wesker 10-24-2005 08:00

where do i put that code in, i dont know what file you are talking about.

Jordan 10-24-2005 08:12

You find the file that would include the amount giving, search for something similar to what sodium posted, and replace it with that.

Charr 10-24-2005 14:15

In order to add that to the plugin, you have to find the 'public handle_say(id) {'

then look for 'if(equali(speech,"/fine",5)) {"

then look for some kind of task / function it would execute like 'set_task(1.0"find_player"...)'
or
'fine_player(id)'

Find the 'fine_player' equalivent, then look for the code that reads the fine arg. Put it between where the arg is read, and where the actual fining is taking place. A hint for where the fining is taking place because it would use a MySQL query that would look like:
"format(query,255,"SELECT bank FROM money WHERE steamid='%s'",authid)"

Sorry I cant just give you the code because I am away from my computer for a few more days., but htis is more that enough info to fix it yourself.

wesker 10-25-2005 05:12

ok, i am new at this scrpiting/hosting stuff. where is the file that i look in? or do i look in navicat or mySQL?


All times are GMT -4. The time now is 23:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.