scroll of respawn gives mp_startmoney

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Locked
algee2005
Peon
Posts: 25
Joined: Sun Jul 10, 2005 1:45 pm

scroll of respawn gives mp_startmoney

Post by algee2005 » Mon Jul 11, 2005 1:21 pm

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 :?

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Jul 11, 2005 1:51 pm

you would have to change the code :/ There isn't an option about it

User avatar
nightscream
Sorceress
Posts: 319
Joined: Wed Jul 06, 2005 12:54 pm
Location: Belguim, Hallaar
Contact:

Post by nightscream » Mon Jul 11, 2005 3:28 pm

one question geesu where is it located is it in the .sma or in the .inc
want help pm me
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Jul 11, 2005 3:38 pm

search for mp_startmoney, I have no idea :P I would guess in Skills or Ultimate.inl, but I could be wrong

algee2005
Peon
Posts: 25
Joined: Sun Jul 10, 2005 1:45 pm

Post by algee2005 » Wed Jul 13, 2005 2:01 am

huuh is it very difficult to change that?
what will i have to do for this, im a rather sma coding noob :(

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Wed Jul 13, 2005 7:31 am

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.

algee2005
Peon
Posts: 25
Joined: Sun Jul 10, 2005 1:45 pm

Post by algee2005 » Wed Jul 13, 2005 3:09 pm

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?

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Wed Jul 13, 2005 4:23 pm

b/c I wanted to GOSH! :P

Daver
WC3Mods Donor
WC3Mods Donor
Posts: 93
Joined: Sat Jul 09, 2005 2:34 pm
Location: Orland Park, IL.
Contact:

Post by Daver » Wed Jul 13, 2005 8:08 pm

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

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Wed Jul 13, 2005 8:14 pm

it does, then it sets it back, I don't know GOSH!

User avatar
Nitricacid
Peon
Posts: 49
Joined: Tue Jul 12, 2005 1:21 pm

Post by Nitricacid » Wed Jul 13, 2005 11:40 pm

on my server it doesnt do that
If knowledge is power to be unknown is to be invincible
Image
You can't win against obsession. They care. You don't. They win.

algee2005
Peon
Posts: 25
Joined: Sun Jul 10, 2005 1:45 pm

Post by algee2005 » Mon Jul 18, 2005 2:16 am

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

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Jul 18, 2005 9:09 am

FYI, there is no way removing those lines would cause any errors :/

User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Post by ferret » Mon Jul 18, 2005 9:22 am

Geesu wrote:FYI, there is no way removing those lines would cause any errors :/
Quoted. This is to say "I agree"
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

Daver
WC3Mods Donor
WC3Mods Donor
Posts: 93
Joined: Sat Jul 09, 2005 2:34 pm
Location: Orland Park, IL.
Contact:

Post by Daver » Sun Aug 07, 2005 10:17 pm

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 :lol:

Daver

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Aug 08, 2005 10:17 am

Ask me that again and I beat you with an ugly stick
No Support via PM

Daver
WC3Mods Donor
WC3Mods Donor
Posts: 93
Joined: Sat Jul 09, 2005 2:34 pm
Location: Orland Park, IL.
Contact:

Post by Daver » Tue Aug 09, 2005 7:10 pm

Geesu wrote:Ask me that again and I beat you with an ugly stick
Just make sure you hold the correct end, :lol:

Daver

Locked