Page 1 of 1
scroll of respawn gives mp_startmoney
Posted: Mon Jul 11, 2005 1:21 pm
by algee2005
yo, when people on our server use scroll of respawn, they always get 16000 $ (thats what our mp_startmoney is set to)
is there a way to let the players stick with the amount of money they got before respawning? its causing some trouble cuz some people abuse this and turn the server into some kind of deathmatch server
restricting shopmenu to buyzone and buytime wont help tho - we got 30 seconds buytime, and thats some serious long time when you think about it

Posted: Mon Jul 11, 2005 1:51 pm
by Geesu
you would have to change the code :/ There isn't an option about it
Posted: Mon Jul 11, 2005 3:28 pm
by nightscream
one question geesu where is it located is it in the .sma or in the .inc
Posted: Mon Jul 11, 2005 3:38 pm
by Geesu
search for mp_startmoney, I have no idea

I would guess in Skills or Ultimate.inl, but I could be wrong
Posted: Wed Jul 13, 2005 2:01 am
by algee2005
huuh is it very difficult to change that?
what will i have to do for this, im a rather sma coding noob

Posted: Wed Jul 13, 2005 7:31 am
by Geesu
just find the line that deals with mp_startmoney... there should be 2 lines, the 1st line contains it, and the next one is like set_user_money, just remove those lines.
Posted: Wed Jul 13, 2005 3:09 pm
by algee2005
sorted
for those that are interested:
its in the file other.inl, remove the lines 416-426, recompile the wc3 sma file, upload the wc3 amxx file and respawn will give you the money you got before furthermore.
why was this included at all?
Posted: Wed Jul 13, 2005 4:23 pm
by Geesu
b/c I wanted to GOSH!

Posted: Wed Jul 13, 2005 8:08 pm
by Daver
Sothen when someone buys scroll of respawn they respawn then got what the server start moey is set to , by default this is set this way???
Why would nt it deduct from what you had and give you that amoun?
Thx,
Daver
Posted: Wed Jul 13, 2005 8:14 pm
by Geesu
it does, then it sets it back, I don't know GOSH!
Posted: Wed Jul 13, 2005 11:40 pm
by Nitricacid
on my server it doesnt do that
Posted: Mon Jul 18, 2005 2:16 am
by algee2005
well, it did for us, and the code clearly tell that it works this way.
just look at other.inl, line 416 - its there...
Code: Select all
public func_spawn(parm[2]){
#if ADVANCED_DEBUG
writeDebugInfo("func_spawn",parm[0])
#endif
if (endround){
set_user_money(parm[0],get_user_money(parm[0])+itemcost2[0],1)
return PLUGIN_HANDLED
}
new id = parm[0]
if(!p_data_b[id][PB_ISCONNECTED])
return PLUGIN_CONTINUE
if(get_user_team(id)==UNASSIGNED)
return PLUGIN_CONTINUE
p_data[id][P_ITEM]=0
p_data[id][P_ITEM2]=0
if (is_user_alive(id))
return PLUGIN_CONTINUE
new team[32]
get_user_team(id,team,31)
p_data_b[id][PB_PLAYERSPAWNED]=true
Ultimate_Icon(id,ICON_SHOW)
spawn(id)
p_data_b[id][PB_SLOWED]=false
p_data_b[id][PB_STUNNED]=false
spawn(id)
set_task(0.3,"spawn_player",TASK_SPAWNPLAYER+id,parm,2)
set_task(0.5,"player_giveitems",TASK_GIVEITEMS+id,parm,2)
#if MOD == 0
give_item(id, "weapon_knife")
#endif
[color=red]
new money = get_user_money(id)
#if MOD == 0
if (money < get_cvar_num("mp_startmoney"))
set_user_money(id,get_cvar_num("mp_startmoney"),0)
#endif
#if MOD == 1
if (money < iCvar[DOD_STARTMONEY])
set_user_money(id,iCvar[DOD_STARTMONEY],0)
#endif
[/color]
return PLUGIN_CONTINUE
}
it checks the server settings what mp_startmoney is set to.
when you run mod dod, there is no such cvar so the plugin sets a "fake-startmoney", check your wc3FT.cfg.
then, when you respawn, and your current money is lower then mp_startmoney, it reassignes you the full mp_startmoney.
now i found out that removing this 10 lines obviously messed our whole server up, we get a whole bunch of errors that pop up all over the place so i highly recommend not to do this, check my other thread
Posted: Mon Jul 18, 2005 9:09 am
by Geesu
FYI, there is no way removing those lines would cause any errors :/
Posted: Mon Jul 18, 2005 9:22 am
by ferret
Geesu wrote:FYI, there is no way removing those lines would cause any errors :/
Quoted. This is to say "I agree"
Posted: Sun Aug 07, 2005 10:17 pm
by Daver
Geesu wrote:FYI, there is no way removing those lines would cause any errors :/
Geesu,
Are you sure you know what you are talkin about??? I dont want to change this and have problems
Daver
Posted: Mon Aug 08, 2005 10:17 am
by Geesu
Ask me that again and I beat you with an ugly stick
Posted: Tue Aug 09, 2005 7:10 pm
by Daver
Geesu wrote:Ask me that again and I beat you with an ugly stick
Just make sure you hold the correct end,
Daver