I don't see why it dont work.. No errors. No warnings. It all looks right =(
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <cstrike>
#define PLUGIN "Money Up 2.0"
#define VERSION "2.0"
#define AUTHOR "Abomination"
new bool:HasCooldown[33]
new First, First2, FirstDecide;
new Second, Second2, SecondDecide;
new Third, Third2, ThirdDecide;
new Money, Money2;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /money", "decide")
// First Step
First = register_cvar("FirstMinDecide", "0")
First2 = register_cvar("SecondMaxDecide", "1")
FirstDecide = register_cvar("FirstDecide", "0")
// Second Step
Second = register_cvar("SecondMinDecide", "0")
Second2 = register_cvar("SecondMaxDecide", "4")
SecondDecide = register_cvar("SecondDecide", "0")
// Third Step
Third = register_cvar("ThirdMinDecide", "0")
Third2 = register_cvar("ThirdMaxDecide", "4")
ThirdDecide = register_cvar("ThirdDecide", "0")
// Money Random
Money = register_cvar("FirstMinMoney", "1")
Money2 = register_cvar("FirstMaxMoney", "16000")
}
public client_connect(id) {
HasCooldown[id] = false
}
public decide(id) {
new MinFirst = get_pcvar_num(First)
new MaxFirst = get_pcvar_num(First2)
new FirstRandom = random_num(MinFirst,MaxFirst)
set_cvar_num("FirstDecide",FirstRandom)
switch(FirstDecide)
{
case 0: Gain(id)
case 1: Loss(id)
}
}
public Gain(id) {
new MinSecond = get_pcvar_num(Second)
new MaxSecond = get_pcvar_num(Second2)
new SecondRandom = random_num(MinSecond,MaxSecond)
set_cvar_num("SecondDecide",SecondRandom)
switch(SecondDecide)
{
case 0: CommentGain1(id)
case 1: CommentGain2(id)
case 2: CommentGain3(id)
case 3: CommentGain4(id)
case 4: CommentGain5(id)
}
}
public Loss(id) {
new MinThird = get_pcvar_num(Third)
new MaxThird = get_pcvar_num(Third2)
new ThirdRandom = random_num(MinThird,MaxThird)
set_cvar_num("ThirdDecide",ThirdRandom)
switch(ThirdDecide)
{
case 0: CommentLoss1(id)
case 1: CommentLoss2(id)
case 2: CommentLoss3(id)
case 3: CommentLoss4(id)
case 4: CommentLoss5(id)
}
}
public CommentGain1(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You find a random wallet on the ground. You pick it up to find its worth")
set_task(0.5, "AllGainComeHere", id)
}
}
public CommentGain2(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] A nice man gives you some shoes. You pawn them for money.")
set_task(0.5, "AllGainComeHere", id)
}
}
public CommentGain3(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You steel somebody's watch and pawn it for cash")
set_task(0.5, "AllGainComeHere", id)
}
}
public CommentGain4(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You pan-handle a man. The generous man puts money in your cup")
set_task(0.5, "AllGainComeHere", id)
}
}
public CommentGain5(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You find some money on the ground, You pick it up to find its worth")
set_task(0.5, "AllGainComeHere", id)
}
}
public CommentLoss1(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You get in a bum fight and lose your money")
set_task(0.5, "AllLossComeHere", id)
}
}
public CommentLoss2(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Some bullys steel your blankey")
set_task(0.5, "AllLossComeHere", id)
}
}
public CommentLoss3(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Instead of saving your money you buy booze")
set_task(0.5, "AllLossComeHere", id)
}
}
public CommentLoss4(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You can't remember your pin number")
set_task(0.5, "AllLossComeHere", id)
}
}
public CommentLoss5(id) {
if( !is_user_alive(id) ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
}
if( HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
}
if( !HasCooldown[id] ) {
client_print(id, print_chat, "[AMXX] - [Money Up 2.0] You get a devorce and lose everything")
set_task(0.5, "AllLossComeHere", id)
}
}
public AllGainComeHere(id) {
new MinMoney = get_pcvar_num(Money)
new MaxMoney = get_pcvar_num(Money2)
new RandomMoney = random_num(MinMoney,MaxMoney)
HasCooldown[id] = true
cs_set_user_money(id, cs_get_user_money(id) + RandomMoney)
set_task(60.0, "CooldownDone", id)
}
public AllLossComeHere(id) {
new SecondMinMoney = get_pcvar_num(Money)
new SecondMaxMoney = get_pcvar_num(Money2)
new RandomMoneyTwo = random_num(SecondMinMoney,SecondMaxMoney)
HasCooldown[id] = true
cs_set_user_money(id, cs_get_user_money(id) - RandomMoneyTwo)
set_task(60.0, "CooldownDone", id)
}
public CooldownDone(id) {
HasCooldown[id] = false
}