Raised This Month: $51 Target: $400
 12% 

Cash Chat v1.2 - Post Feedback!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 08-23-2009 , 14:35   Cash Chat v1.2 - Post Feedback!
Reply With Quote #1

Cash Chat v1.2
A BOYSplayCS Production

Description:
Cash Chat adds a little twist in the messaging system for Counter-Strike. Players will have to buy their chat messages in order for them to be sent to other players, sort of like a text message. The cost of chat messages are set by a pre-defined cvar, this cost will be set for every chat message the player tries to send. If the player does not have enough money to buy a message, their message will be blocked from view to all the players. Admins can be exempted from the Cash Chat with a cvar.


Controllable Variables:
amx_cashchat(#) - Toggle Cash Chat on and off.
Default set at 1. 1 ENABLES PLUGIN, 0 DISABLES PLUGIN.

amx_cc_cost(#) - Set the cost for each chat message.
Default set at $300. CHANGE AS YOU WISH.

amx_cc_admin(#) - Determine whether admins bypass the filter.
Default set at 1. 1 BYPASS'S ADMINS. 0 MAKES ADMINS PAY.

NEW amx_cc_frag(#) - Determine whether players can sell frags for cash.
Default set at 1. 1 ENABLES SELL. 0 DISABLES SELL.

NEW amx_cc_fragprice(#) - Set the cost that one frag sells for.
Default set at $100. CHANGE AS YOU WISH.

NEW amx_cc_fragmenu(#) - Determine whether the menu for selling frags appears.
Default set at 1. 1 ENABLES MENU. 0 DISABLES MENU.

NEW amx_cc_receipt(#) - Toggles the receipt shown when a message is bought.
Default set at 1. 1 ENABLES RECEIPT. 0 DISABLES RECEIPT.


Requirements:
AMX Mod X (version 1.8.1 or higher)
Counter-Strike 1.6 (cstrike module)
Fun Module
Cellphone Charger
$6.00


Changelog:
Version 1.0 - August 23rd, 2009
  • Initial Release
Version 1.1 - August 23rd, 2009
  • Fixed major bug with money
  • Changed return PLUGIN_HANDLED; to return PLUGIN_CONTINUE;
Version 1.2 - August 23rd, 2009
  • Added menu for frag selling
  • Added several new cvars
  • Optimized code
  • Tested code - WORKS PERFECTLY
  • Added new cvar for receipt
  • Added receipt feature
  • Added yellow numbers for menu

Upcoming Features:

Version 1.1 -
Include cvar for adding tax to messages (DEBATING)
Multilingual Support (IN-PROGRESS)

Screenshots:
Frag Menu | Sold Frag

Attached Files
File Type: sma Get Plugin or Get Source (cash_chat.sma - 623 views - 3.5 KB)

Last edited by BOYSplayCS; 08-23-2009 at 17:51. Reason: Added Version 1.2
BOYSplayCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-23-2009 , 15:11   Re: Cash Chat v1.0
Reply With Quote #2

And where do you remove the money ?
__________________
Arkshine is offline
Kiske
Veteran Member
Join Date: May 2009
Old 08-23-2009 , 15:15   Re: Cash Chat v1.0
Reply With Quote #3

Nice ;)

One Question:
PHP Code:
userCash cs_get_user_money(id);
pluginCash get_pcvar_num(cashCost);

if (
userCash pluginCash)
{
    
client_print(idprint_chat"[Cash Chat] MESSAGE BLOCKED: Chatting costs $%d per message."pluginCash);
    return 
PLUGIN_HANDLED_MAIN;


Or:
PHP Code:
userCash cs_get_user_money(id);
pluginCash get_pcvar_num(cashCost);

if (
userCash pluginCash)
{
    
client_print(idprint_chat"[Cash Chat] MESSAGE BLOCKED: Chatting costs $%d per message."pluginCash);
    
cs_set_user_money(iduserCash pluginCash)
    return 
PLUGIN_HANDLED_MAIN;


??????????
__________________

Kiske is offline
Send a message via Skype™ to Kiske
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 08-23-2009 , 15:30   Re: Cash Chat v1.0
Reply With Quote #4

Oh shit, I completely forgot about that - I'm sorry. Let me update.
BOYSplayCS is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 08-23-2009 , 15:34   Re: Cash Chat v1.1
Reply With Quote #5

Updated: New version released that fixes the very very stupid part I left out.

See changelog.
BOYSplayCS is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 08-23-2009 , 15:35   Re: Cash Chat v1.0
Reply With Quote #6

Quote:
Originally Posted by Kiske View Post
Nice ;)
PHP Code:
userCash cs_get_user_money(id);
pluginCash get_pcvar_num(cashCost);

if (
userCash pluginCash)
{
    
client_print(idprint_chat"[Cash Chat] MESSAGE BLOCKED: Chatting costs $%d per message."pluginCash);
    
cs_set_user_money(iduserCash pluginCash)
    return 
PLUGIN_HANDLED_MAIN;

??????????
Not quiet. You put the cs_set_user_money(id) inside the statement where it blocks the message. The cs_set_user_money(id) belongs after the ending '}' bracket for the if statement. See the source code for a full view.
BOYSplayCS is offline
shine771
Senior Member
Join Date: Jun 2007
Old 08-23-2009 , 15:52   Re: Cash Chat v1.1
Reply With Quote #7

Maybe add a price for every symbol in the chat message and a cvar to control the switch between those two methods?
shine771 is offline
Kiske
Veteran Member
Join Date: May 2009
Old 08-23-2009 , 16:01   Re: Cash Chat v1.0
Reply With Quote #8

Quote:
Originally Posted by BOYSplayCS View Post
Not quiet. You put the cs_set_user_money(id) inside the statement where it blocks the message. The cs_set_user_money(id) belongs after the ending '}' bracket for the if statement. See the source code for a full view.
Oh yes yes, ;)
__________________

Kiske is offline
Send a message via Skype™ to Kiske
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 08-23-2009 , 16:04   Re: Cash Chat v1.1
Reply With Quote #9

Update: Uploaded new plugin and changed a huge bug. return PLUGIN_HANDLED; -> return PLUGIN_CONTINUE;

Confirmed Working. Tested and works just perfect.
BOYSplayCS is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 08-23-2009 , 16:13   Re: Cash Chat v1.1
Reply With Quote #10

Damn dude, I entered into this thread just for tell you that. You won me
__________________
"There is no knowledge, that is not power"
fezh is offline
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 03:37.


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