Raised This Month: $ Target: $400
 0% 

RoundStart Money Edit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shzzzzz
Junior Member
Join Date: Nov 2023
Old 11-09-2023 , 22:26   RoundStart Money Edit
Reply With Quote #1

https://forums.alliedmods.net/showthread.php?p=221246
This plugin gives 16k dollarss since 1 round(like mp_startmoney). If possible, can someone make that it starts after first(pistol) round?
Been looking whole day for it and couldn't find it, so sorry if it already exists. Should be simple edit if i am not mistaken, as i myself have no clue about pawning.(Sorry if English sucks, not my first language)
Shzzzzz is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 11-10-2023 , 06:05   Re: RoundStart Money Edit
Reply With Quote #2

simple, count the rounds
Spoiler


but it depends on how you use this plugin together with the others
if you have problems, you can send me a message (then you can tell me exactly how you use it)

if you want not to count endlessly, you can make a statement that checks the number and skips it

Spoiler


with a few debug messages it would look something like this: https://termbin.com/z50a
@LeX is offline
Shzzzzz
Junior Member
Join Date: Nov 2023
Old 11-10-2023 , 07:24   Re: RoundStart Money Edit
Reply With Quote #3

Thank you, Alex! I will try both tonight.
Shzzzzz is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 11-10-2023 , 10:17   Re: RoundStart Money Edit
Reply With Quote #4

no problem, theoretically they do the same thing
but if you are skeptical about the "memory load", in the second version the count stops after it exceeds 2 ( ie, it will go through the hook without doing anything else )
@LeX is offline
Shzzzzz
Junior Member
Join Date: Nov 2023
Old 11-10-2023 , 18:03   Re: RoundStart Money Edit
Reply With Quote #5

So, there is few problems and idk if warmup is the cause of them. People get 16k while in warmup and after sv_restart they get no money from plugin.
P.S. i will try to use 1 of them again later

Last edited by Shzzzzz; 11-10-2023 at 18:04.
Shzzzzz is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 11-10-2023 , 21:09   Re: RoundStart Money Edit
Reply With Quote #6

Quote:
Originally Posted by Shzzzzz View Post
So, there is few problems and idk if warmup is the cause of them. People get 16k while in warmup and after sv_restart they get no money from plugin.
P.S. i will try to use 1 of them again later
that's why i said it depends on how you use it
so i understand that you have a warmup system/plugin that lasts one round, then after the restart there is another round where you want pistols to be played, then after that round offer them $16k

we can reset the count when the round is restarted

I'm going to make everything simple, I'm going to add a boolean variable that detects whether or not a restart has been made in the round

Try This:
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>

new MONEY;
new 
szRoundCount;
new 
bool:IsRestarting

public plugin_init()
{
    
register_plugin("round_money","0.7","SweatyBanana")
    
    
MONEY register_cvar("round_money","16000")
    
    
register_dictionary("rmlang.txt")
    
    
register_logevent("new_round"2"1=Round_Start")
    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w")
}

public 
Event_TextMsg_Restart()
{
    
IsRestarting true;
}

public 
new_round()
{
    if( 
IsRestarting )
    {
        
IsRestarting false;
        
szRoundCount 0;
    }

    if(
szRoundCount 2)
        return 
0;

    
szRoundCount++;

    if(
szRoundCount == 2)
    {
        new 
players[32], playerCountiplayerpMoney;
        
pMoney get_pcvar_num(MONEY)
        
        
get_players(players,playerCount);
        
        for(
i=0;i<playerCount;i++)
        {
            
player players[i];
            if(
cs_get_user_money(player) < pMoney)
            {
                
cs_set_user_money(playerpMoney);
                
client_print(player,print_chat,"%L",LANG_PLAYER,"MONEY_AMOUNT",pMoney)
            }
        } 
    }
    return 
0;

@LeX is offline
Shzzzzz
Junior Member
Join Date: Nov 2023
Old 11-11-2023 , 11:52   Re: RoundStart Money Edit
Reply With Quote #7

Thank you again! I will try it later this night when players are gone!
Shzzzzz is offline
Shzzzzz
Junior Member
Join Date: Nov 2023
Old 11-11-2023 , 13:38   Re: RoundStart Money Edit
Reply With Quote #8

Tested on friends server and that's it. If i see some problems can i type you privately if you have no problem with it?
Shzzzzz is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 11-11-2023 , 17:41   Re: RoundStart Money Edit
Reply With Quote #9

Quote:
Originally Posted by Shzzzzz View Post
Tested on friends server and that's it. If i see some problems can i type you privately if you have no problem with it?
sure. no problem
@LeX 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 09:54.


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