AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Roundstart Money (https://forums.alliedmods.net/showthread.php?t=25831)

SweatyBanana 03-21-2006 10:22

Roundstart Money
 
4 Attachment(s)
RoundStart Money by SweatyBanana

Description:
Ever wanted to have the same amount of money every round?..Maybe never let someone have enough money to buy that pesky AWP..Well RoundStart Money is just what you need!

RoundStart Money allows you to set the cvar below to give someone the same amount of money every round..

Cvars
round_money "amount"


Instalation
  • addons/amxmodx/data/lang/rmlang.txt
  • Download .amxx file from link below
    Place .amxx file in \cstrike\addons\amxmodx\plugins folder
    Open \cstrike\addons\amxmodx\configs\plugins.ini
    Add a line to the bottom of plugins.ini
Code:

round_money.amxx

UPDATES
  • v0.1 - ORIGINAL
  • v0.2 - Fixed money exploit
  • v0.3 - Satan pointed out the use of HLTV to set before freezetime..thx
  • v0.4 - Optimized by brads standard :)
  • v0.5 - Added PCVAR and MultiLingual
  • v0.7 - Fixed
Languages
en - SweatyBanana
sv - Fr3ak0ut
nl - geertjan88
es - KylixMynxAltoLAG
bp - commonbullet
hu - Dav3
da - *<3*

Xanimos 03-21-2006 10:33

Don't use ResetHUD. anyone can make it so they get money again. (typing full_update in console) use the HLTV event or use the logevent of Round Start

SweatyBanana 03-21-2006 10:36

FIXED & UPDATED

Xanimos 03-21-2006 14:36

Those are just examples not the whole list you can use. Search for it on the forums.

SweatyBanana 03-21-2006 14:50

Updated...fixed it...tell me what you think.

Xanimos 03-21-2006 15:00

I still see the same code.

SweatyBanana 03-21-2006 15:02

hmm...try that now...dont know why it didnt change.

Jordan 03-21-2006 15:28

I don't think that's a valid event? If you want before freezetime, you use HLTV, and if you want after freezetime, you want new_round.

Code:
register_logevent("new_round", 2 , "1=Round_Start");    /* later in the code:*/ public new_round() // doesn't take id as a function. {     new players[32], num, i;     get_players(players,num);         for(i=0;i<num;i++)     givemoney(players[i]); } public givemoney(id) // now you can use id {     new money = cs_get_user_money(id)     new cVar = get_cvar_num("round_money")     if(money < cVar)     {             cs_set_user_money(id, cVar, 1)             return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }

I think this should work.

SweatyBanana 03-22-2006 08:04

GOD I suck at coding :)

LOL ok updated...


And yes, I did realize that the first function did not take an ID function last nite...just didnt have time to update it.

Thank you all.

VEN 03-22-2006 09:23

Your code contain
Code:
    register_event("ResetHUD", "roundMoney", "be")
but it not contain roundMoney function - that will cause an error.

This is not new round but round start (freezetime end)
Code:
    register_logevent("new_round", 2 , "1=Round_Start");

You should use that
Code:
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")

EDIT:

And you do not need to return anithing in givemoney function
Code:
public givemoney(id) {     new cVar = get_cvar_num("round_money")     if(cs_get_user_money(id) < cVar)             cs_set_user_money(id, cVar) }


All times are GMT -4. The time now is 05:28.

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