Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <vault>
#include <engine>
#define KeysPayForItMenu (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8) // Keys: 123456789
new bool:ammo[33]
new bool:noflash[33]
new g_nMsgScreenFade
new bool:norecoil[33]
new bool:speed[33]
public plugin_init() {
register_plugin("PayForIt","1.0","Fire")
register_cvar("sv_payforit","1")
register_cvar("silentwalk_cost", "500")
register_cvar("noclip_cost", "500")
register_cvar("looklikeenemy_cost", "500")
register_cvar("ammo_cost", "500")
register_cvar("invisibility_cost", "500")
register_cvar("noflash_cost", "500")
register_cvar("norecoil_cost", "500")
register_cvar("speed_cost", "500")
register_clcmd( "payforit_menu","ShowPayForItMenu")
register_clcmd( "say /pfm","ShowPayForItMenu")
register_clcmd( "admin_say /pfm","ShowPayForItMenu")
register_event("CurWeapon","check_ammo","be","1=1")
register_event("ScreenFade","FlashedEvent","be","4=255","5=255","6=255","7>199")
register_event("CurWeapon","change_weapon","be","1=1")
register_event("ResetHUD","RoundStart","b")
register_menucmd(register_menuid("PayForItMenu"), KeysPayForItMenu, "PressedPayForItMenu")
set_task(0.1,"fast",0,"",0,"b")
g_nMsgScreenFade = get_user_msgid("ScreenFade")
}
public ShowPayForItMenu(id) {
show_menu(id, KeysPayForItMenu, "Menu: ^n1: SilentWalk ^n2: NoClip^n3: Look Like Enemy ^n4: Ammo ^n5: Invisibility ^n6: NoFlash ^n7: NoRecoil ^n8: Speed ^n9: Exit^n", -1, "PayForItMenu") // Display menu
}
public PressedPayForItMenu(id, key) {
/* Menu:
* Menu:
* 1: SilentWalk
* 2: NoClip
* 3: Look Like Enemy
* 4: Ammo
* 5: Invisibility
* 6: NoFlash
* 7: NoRecoil
* 8: Speed
* 9: Exit
*/
switch (key) {
case 0: { // 1
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new silentwalkcost = get_cvar_num("silentwalk_cost")
if(money < silentwalkcost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", silentwalkcost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - silentwalkcost)
set_user_footsteps(id, 1)
client_print(id, print_chat, "[PFI] Now No one Can Hear You Walking!")
}
case 1: { // 2
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new noclipcost = get_cvar_num("noclip_cost")
if(money < noclipcost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", noclipcost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - noclipcost)
set_user_noclip(id, 1)
client_print(id, print_chat, "[PFI] You Now Have NoClip!")
}
case 2: { // 3
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new looklikeenemycost = get_cvar_num("looklikeenemy_cost")
if(money < looklikeenemycost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", looklikeenemycost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - looklikeenemycost)
if (get_user_team(id)==1)
cs_set_user_model(id, "urban")
if (get_user_team(id)==2)
cs_set_user_model(id, "guerilla")
client_print(id, print_chat, "[PFI] Now You Look Like The Enemy!")
}
case 3: { // 4
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new ammocost = get_cvar_num("ammo_cost")
if(money < ammocost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", ammocost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - ammocost)
ammo[id]=true
client_print(id, print_chat, "[PFI] Now You Have Unlimted Ammo!")
}
case 4: { // 5
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new invisibilitycost = get_cvar_num("invisibility_cost")
if(money < invisibilitycost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", invisibilitycost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - invisibilitycost)
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,30)
client_print(id, print_chat, "[PFI] Now No one Can See You!")
}
case 5: { // 6
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new noflashcost = get_cvar_num("noflash_cost")
if(money < noflashcost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", noflashcost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - noflashcost)
noflash[id]=true
client_print(id, print_chat, "[PFI] Now You Cant Be Flashed!")
}
case 6: { // 7
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new norecoilcost = get_cvar_num("norecoil_cost")
if(money < norecoilcost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", norecoilcost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - norecoilcost)
norecoil[id]=true
client_print(id, print_chat, "[PFI] Now You Have No Recoil!")
}
case 7: { // 8
if(get_cvar_num("sv_payforit") == 0)
{
client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")
return PLUGIN_HANDLED
}
new money = cs_get_user_money(id)
new speedcost = get_cvar_num("speed_cost")
if(money < speedcost)
{
client_print(id, print_chat, "[PFI] You Don't Have Enough Money ($%i Needed).", speedcost)
return PLUGIN_CONTINUE
}
cs_set_user_money(id, money - speedcost)
speed[id]=true
client_cmd(id,"cl_forwardspeed 999")
client_cmd(id,"cl_sidespeed 999")
client_cmd(id,"cl_backspeed 999")
client_print(id, print_chat, "[PFI] Now You Are Much Faster!")
}
case 8: { // 9
client_print(id, print_chat, "[PFI] You Have Exited The PayForIt Menu!")
}
}
return PLUGIN_CONTINUE
}
public check_ammo(id)
{
new clip,wammo,weapon = get_user_weapon(id,clip,wammo)
if(weapon == CSW_HEGRENADE
|| weapon == CSW_SMOKEGRENADE
|| weapon == CSW_FLASHBANG
|| weapon == CSW_C4) return PLUGIN_CONTINUE
if(!(clip) && (ammo[id] == true))
{
new weap[32]
get_weaponname(weapon,weap,31)
give_item(id,weap)
engclient_cmd(id,weap)
engclient_cmd(id,weap)
engclient_cmd(id,weap)
}
return PLUGIN_CONTINUE
}
public FlashedEvent(id)
{
if(!noflash[id])
{
return PLUGIN_CONTINUE
}
message_begin( MSG_ONE,g_nMsgScreenFade,{0,0,0},id )
write_short( read_data( 1 ) ) // Duration
write_short( read_data( 2 ) ) // Hold time
write_short( read_data( 3 ) ) // Fade type
write_byte (0) // Red
write_byte (0) // Green
write_byte (0) // Blue
write_byte (0) // Alpha
message_end()
return PLUGIN_HANDLED
}
public change_weapon(id)
{
if (norecoil[id])
{
entity_set_vector(id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0})
}
}
public fast()
{
for(new i=0;i<=32;i++)
{
if(is_user_connected(i))
{
if(speed[i])
{
server_cmd("sv_maxspeed 1000")
set_user_maxspeed(i,1000.0)
}
}
}
return PLUGIN_HANDLED
}
public RoundStart(id)
{
ammo[id]=false
noflash[id]=false
norecoil[id]=false
speed[id]=false
client_cmd(id,"cl_forwardspeed 400")
client_cmd(id,"cl_sidespeed 400")
client_cmd(id,"cl_backspeed 400")
set_user_footsteps (id, 0)
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderNormal,255)
cs_reset_user_model(id)
}
and could you add stuff fun to it please BTW could you put little help marks on it (//) so that i know what it does because im new at this and trying to learn