View Single Post
StoNeY4cs
Junior Member
Join Date: Dec 2005
Old 12-11-2005 , 18:08  
Reply With Quote #19

should that work: ( i become a beginner)
Quote:
/*
* InstaMoney
* Created By DarkShadowST
*
* Commands:
*
* say /moneyme - Instantly Gives a Player 16000
*
*
* CVARS:
*
* sv_money 1 or 0 - If set to 1 Allows All Players To Use InstaMoney
* If set to 0 Allows Admins To Use InstaMoney
* (Admin Level Set To E (ban/slay))
*
* This Is My First Plugin...Enjoy
*
* #define MSG_GLOBAL - Makes The [AMX] Money Given To... Message Global (All Can See It)
* If You Dont want to see this or w/e...just comment it out (//#define MSG_GLOBAL)
*
* ChangeLog:
* Version 0.3 - Added sv_maxmoney - maximum of getting money
* Added sv_cashmoney - you need less money to get the maximum
*
* Version 0.2 - Added Steam Connection Message Support
* Added Global Money Message Support
* Added "You're Rich" Message If You Already Have 16000
*
* Version 0.1 - Original Coding
*
*/

#include <amxmodx>
#include <cstrike>

#define ACCESS_LEVEL ADMIN_LEVEL_E

#define MSG_GLOBAL

new sv_cashmoney
new sv_maxmoney

public plugin_init()
{
register_plugin("InstaMoney","0.3","DarkShado wST")
register_clcmd("say /moneyme","givemoney",0,": Gives a Client 16000 Money")
register_cvar("sv_money","0")

register_cvar("sv_cashmoney","1000")
register_cvar("sv_maxmoney","9000")
}


public givemoney(id)
{
if (get_cvar_num("sv_money") == 0)

{
if (!(get_user_flags(id)&ACCESS_LEVEL))
{
client_print(id,print_chat,"[AMX] InstaMoney Is Set To Admin Only Mode")
return PLUGIN_HANDLED
}
}

if (cs_get_user_money(id) > sv_maxmoney)
{
client_print(id,print_chat,"[AMX] You Don't Need Anymore Money...You're Rich")
return PLUGIN_HANDLED
}
cs_set_user_money(id,sv_cashmoney,1)
new name[32]
get_user_name(id,name,32)

#if defined MSG_GLOBAL
client_print(0,print_chat,"[AMX] %s Has Been Given $ ",sv_cashmoney,name)
#else
client_print(id,print_chat,"[AMX] You Have Been Given $ ",sv_cashmoney)
#endif
return PLUGIN_HANDLED
}
#if !defined NO_STEAM
public client_authorized(id)
#else
public client_connect(id)
#endif
{
if(get_cvar_num("sv_money") == 1) client_cmd(id, "echo ;echo ^" **** This Server Has InstaMoney By DarkShadowST Turned On, say /moneyme for $16000 ****^"")

return PLUGIN_CONTINUE
}
StoNeY4cs is offline
Send a message via ICQ to StoNeY4cs