Raised This Month: $ Target: $400
 0% 

TSRP fine-mod help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wesker
Junior Member
Join Date: Oct 2005
Old 10-20-2005 , 04:01   TSRP fine-mod help
Reply With Quote #1

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 is offline
Send a message via AIM to wesker
wesker
Junior Member
Join Date: Oct 2005
Old 10-20-2005 , 05:12  
Reply With Quote #2

sigh, the people on harbu forums wouldnt help me...
wesker is offline
Send a message via AIM to wesker
Sodium
Member
Join Date: Oct 2004
Old 10-20-2005 , 05:48  
Reply With Quote #3

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 }
Sodium is offline
wesker
Junior Member
Join Date: Oct 2005
Old 10-21-2005 , 07:20  
Reply With Quote #4

i cant find that? do you know where it would be?
wesker is offline
Send a message via AIM to wesker
wesker
Junior Member
Join Date: Oct 2005
Old 10-24-2005 , 08:00  
Reply With Quote #5

where do i put that code in, i dont know what file you are talking about.
wesker is offline
Send a message via AIM to wesker
Jordan
Veteran Member
Join Date: Aug 2005
Old 10-24-2005 , 08:12  
Reply With Quote #6

You find the file that would include the amount giving, search for something similar to what sodium posted, and replace it with that.
Jordan is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 10-24-2005 , 14:15  
Reply With Quote #7

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.
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
wesker
Junior Member
Join Date: Oct 2005
Old 10-25-2005 , 05:12  
Reply With Quote #8

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?
wesker is offline
Send a message via AIM to wesker
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:50.


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