Raised This Month: $ Target: $400
 0% 

Why doesnt this work >=(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Abominationz
Member
Join Date: Jul 2006
Old 08-11-2006 , 07:05   Why doesnt this work >=(
Reply With Quote #1

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 
FirstFirst2FirstDecide;
new 
SecondSecond2SecondDecide;
new 
ThirdThird2ThirdDecide;
new 
MoneyMoney2;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
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 
0Gain(id)
        case 
1Loss(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 
0CommentGain1(id)
        case 
1CommentGain2(id)
        case 
2CommentGain3(id)
        case 
3CommentGain4(id)
        case 
4CommentGain5(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 
0CommentLoss1(id)
        case 
1CommentLoss2(id)
        case 
2CommentLoss3(id)
        case 
3CommentLoss4(id)
        case 
4CommentLoss5(id)
    }
}

public 
CommentGain1(id) {
    
    if( !
is_user_alive(id) ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You Cannot Hope For Money When Your Dead")
    }
    
    if( 
HasCooldown[id] ) {
        
        
client_print(idprint_chat"[AMXX] - [Money Up 2.0] Sorry You cannot beg that often. Earn some Self Respect")
    }
    
    if( !
HasCooldown[id] ) {
        
        
client_print(idprint_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
(idcs_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
(idcs_get_user_money(id) - RandomMoneyTwo)
    
set_task(60.0"CooldownDone"id)
}

public 
CooldownDone(id) {
    
    
HasCooldown[id] = false


Last edited by Abominationz; 08-11-2006 at 07:08.
Abominationz is offline
Old 08-11-2006, 07:21
ConManKilla07
This message has been deleted by ConManKilla07.
ConManKilla07
BANNED
Join Date: Aug 2006
Old 08-11-2006 , 07:26   Re: Why doesnt this work >=(
Reply With Quote #2

ok add this to replace your client connect . Im not sure if thats exactly the problem but it might be .

Code:
Code:
#define MAX_PLAYERS 32 new bool:g_restart_attempt[MAX_PLAYERS + 1] public plugin_init() {     register_event("ResetHUD", "event_hud_reset", "be")     register_clcmd("fullupdate", "clcmd_fullupdate")     register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in") } public clcmd_fullupdate() {     return PLUGIN_HANDLED } public event_restart_attempt() {     new players[32], num     get_players(players, num, "a")     for (new i; i < num; ++i)         g_restart_attempt[players[i]] = true } public event_hud_reset(id) {     if (g_restart_attempt[id]) {         g_restart_attempt[id] = false         return     }     event_player_spawn(id) } // this function is called on player spawn public event_player_spawn(id) {     // ... }

Last edited by ConManKilla07; 08-11-2006 at 07:29.
ConManKilla07 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 15:22.


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