Raised This Month: $51 Target: $400
 12% 

[ANY] Contracts


Post New Thread Reply   
 
Thread Tools Display Modes
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 08-31-2017 , 08:22   Re: [ANY] Contracts
Reply With Quote #151

Got a strange thing on my server.,

The contracts that loads up is Always the same from my cfg.

It is Always the bottom 1 of the list. Any ideas ?

Got the basic contract.cfg in cfg dir btw. Loads up normaly further.
Happy DODs player is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-31-2017 , 09:26   Re: [ANY] Contracts
Reply With Quote #152

Quote:
Originally Posted by Happy DODs player View Post
Got a strange thing on my server.,

The contracts that loads up is Always the same from my cfg.

It is Always the bottom 1 of the list. Any ideas ?

Got the basic contract.cfg in cfg dir btw. Loads up normaly further.
Are you sure ? Have you tried the command sm_givecontract ? It seemed to work for me.
Do you have the last version (Github) ?
__________________
Want to check my plugins ?
Arkarr is offline
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 08-31-2017 , 11:14   Re: [ANY] Contracts
Reply With Quote #153

Dont know what is happening, but got the last github version...

It gives only the last 1 eachtime.. No errors. So dont know neither.
Happy DODs player is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-31-2017 , 12:32   Re: [ANY] Contracts
Reply With Quote #154

Try this one. It's the one on my server.
I don't have the source code anymore, I believe.
Attached Files
File Type: smx [ANY] Contract.smx (31.7 KB, 83 views)
__________________
Want to check my plugins ?
Arkarr is offline
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 08-31-2017 , 13:25   Re: [ANY] Contracts
Reply With Quote #155

nope didnt worked.
Happy DODs player is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-31-2017 , 13:33   Re: [ANY] Contracts
Reply With Quote #156

Quote:
Originally Posted by Happy DODs player View Post
nope didnt worked.
Show me your config, please. Maybe you removed something that shouldn't be.
__________________
Want to check my plugins ?
Arkarr is offline
Happy DODs player
AlliedModders Donor
Join Date: Sep 2009
Old 08-31-2017 , 13:40   Re: [ANY] Contracts
Reply With Quote #157

So it does only do nr.9 Always.

Using sourcemod 1.9.0 6143 and Metamod , 1.11.0

Must say i have other gameservers and there it works good., so it is strange it isnt on this gameserver.

Quote:
"Contracts Options"
{
"1"
{
"Contract Name" "Don't forget 'legs day'"
"Contract Type" "WALK"
"Contract Objective" "100"
"Contract Chances" "0.9"
"Contract Reward" "10"
}
"2"
{
"Contract Name" "Remember - Dead ennemies, best ennemies."
"Contract Type" "KILL"
"Contract Objective" "5"
"Contract Chances" "0.5"
"Contract Reward" "100"
}
"3"
{
"Contract Name" "Yeah, shit happens."
"Contract Type" "DIE"
"Contract Objective" "10"
"Contract Chances" "0.7"
"Contract Reward" "1"
}
"4"
{
"Contract Name" "Time to play Sniper... AGAIN."
"Contract Type" "HEADSHOT"
"Contract Objective" "30"
"Contract Chances" "0.1"
"Contract Reward" "75"
}
"5"
{
"Contract Name" "Melee kills = glory kills"
"Contract Type" "KILL"
"Contract Objective" "10"
"Contract Chances" "0.25"
"Contract Reward" "100"
"Contract Weapon" "MELEE" //or could be the name of the weapon, for exemple : weapon_awp or tf_weapon_pistol or PRIMARY or SECONDARY
}
"6"
{
"Contract Name" "Snipe them all!"
"Contract Type" "KILL"
"Contract Objective" "30"
"Contract Chances" "0.10"
"Contract Reward" "200"
"Contract Weapon" "weapon_awp" //or could be the name of the weapon, for exemple : weapon_awp or tf_weapon_pistol or PRIMARY or SECONDARY
}
"7"
{
"Contract Name" "I'm strooooong!!!"
"Contract Type" "TAKE_DAMAGE"
"Contract Objective" "9999"
"Contract Chances" "0.15"
"Contract Reward" "75"
}
"8"
{
"Contract Name" "Eat steel!"
"Contract Type" "DEAL_DAMAGE"
"Contract Objective" "1000"
"Contract Chances" "0.15"
"Contract Reward" "200"
}

"9"
{
"Contract Name" "Scopes are for the n00bs !"
"Contract Type" "NO_SCOPE"
"Contract Objective" "20"
"Contract Chances" "0.3"
"Contract Reward" "550"
}
}

Last edited by Happy DODs player; 08-31-2017 at 13:42.
Happy DODs player is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 08-31-2017 , 14:07   Re: [ANY] Contracts
Reply With Quote #158

I heard about this issue before and just now had a fast code overview and found a bug, but I think this is not related to this issue. That's it.

https://github.com/Arkarr/-ANY-Contr...ntract.sp#L793
PHP Code:
if (GetRandomFloat(0.01.0) <= (pourcent 100)) 
should be
PHP Code:
if (GetRandomFloat(0.01.0) <= (pourcent)) 
cause you pull the pourcent from config where is declared as float < 1.0
Code:
"Contract Chances"	"0.3"
with /100 it would become 0.003 chance.
__________________
coding & free software

Last edited by shanapu; 08-31-2017 at 14:10.
shanapu is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 08-31-2017 , 14:12   Re: [ANY] Contracts
Reply With Quote #159

Quote:
Originally Posted by shanapu View Post
I heard about this issue before and just now had a fast code overview and found a bug, but I think this is not related to this issue. That's it.

https://github.com/Arkarr/-ANY-Contr...ntract.sp#L793
PHP Code:
if (GetRandomFloat(0.01.0) <= (pourcent 100)) 
should be
PHP Code:
if (GetRandomFloat(0.01.0) <= (pourcent)) 
cause you pull the pourcent from config where is declared as float < 1.0
Code:
"Contract Chances"	"0.3"
with /100 it would become 0.003 chance.
Duh... my bad. Thanks Shanapu !

New version on github.
__________________
Want to check my plugins ?

Last edited by Arkarr; 08-31-2017 at 14:14.
Arkarr is offline
Obyboby
Veteran Member
Join Date: Sep 2013
Old 09-01-2017 , 06:29   Re: [ANY] Contracts
Reply With Quote #160

Does this support killing a specific enemy?
eg start the round, i get a contract "kill noobplayer1 for a reward"
kill noobplayer1, get money

(CS:GO)

Gonna read the thread a bit to see if this is already implemented
Very interesting plugin tho
__________________
Obyboby 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 17:55.


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