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

[TF2] gScramble (Redux)


Post New Thread Reply   
 
Thread Tools Display Modes
vitorhnn
Junior Member
Join Date: Dec 2012
Location: Rio de Janeiro, Brazil
Old 07-12-2013 , 10:32   Re: [TF2] gScramble (Redux)
Reply With Quote #31

Quote:
Originally Posted by Powerlord View Post
Pretty sure that should be
PHP Code:
new entity GetPlayerResourceEntity(); 
new 
Totalscore GetEntProp(entityProp_Send"m_iScore"_client); 
In this case, the _ tells it to use the default.
The Pawn Language Guide, page 73, section "Named parameters versus positional parameters" demonstrates named parameters. Click here if using pdf.js

That being said, psychonic said it was also ok to use _.
vitorhnn is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-12-2013 , 10:51   Re: [TF2] gScramble (Redux)
Reply With Quote #32

Quote:
Originally Posted by vitorhnn View Post
The Pawn Language Guide, page 73, section "Named parameters versus positional parameters" demonstrates named parameters. Click here if using pdf.js

That being said, psychonic said it was also ok to use _.
This is the first I've heard of SourcePawn supporting named parameters.

SourcePawn isn't exactly up to date with the latest Pawn features, having forked from it the better part of a decade ago.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
vitorhnn
Junior Member
Join Date: Dec 2012
Location: Rio de Janeiro, Brazil
Old 07-12-2013 , 10:56   Re: [TF2] gScramble (Redux)
Reply With Quote #33

Quote:
Originally Posted by Powerlord View Post
This is the first I've heard of SourcePawn supporting named parameters.

SourcePawn isn't exactly up to date with the latest Pawn features, having forked from it the better part of a decade ago.
Code:
01/10/1998         Support for named parameters (in addition to positional
                        parameters). See the documentation for this major
                        feature.
vitorhnn is offline
Newbie1992
Senior Member
Join Date: Jan 2013
Location: Germany
Old 07-16-2013 , 04:56   Re: [TF2] gScramble (Redux)
Reply With Quote #34

Hello,

Plugin works fine, but only the team swap block protection doesn't work
Admins can't change the teams if they want

here my plugin cfg:

Code:
// Enable/disable the plugin and all its hooks.
gs_enabled "1"

// **************************
//							*
//  Auto-balance settings	*
//							*
// **************************

// Enable/disable the autobalance feature of this plugin.
// Use only if you have the built-in balancer disabled.
gs_autobalance "1"

// Time in minutes after a client is balanced in which they cannot be balanced again.
gs_ab_balancetime "0"

// Controls who is immune from auto-balance
// 0 = no immunity
// 1 = admins
// 2 = engies with buildings
// 3 = both admins and engies with buildings
gs_ab_immunity "3"

// Max time the teams are allowed to be unbalanced before a balanced is forced on low-priority living players.
// 0 = disabled
gs_ab_max_unbalancetime "25"

// How many of the top players to protect on each team from autobalance.
gs_ab_protect "2"

// If one team has this many more players than the other, then consider the teams imbalanced.
gs_ab_unbalancelimit "2"

// Allow clients to tell the plugin what team they prefer. When an autobalance starts, if the client prefers the team, it overrides any immunity check.
gs_ab_preference "0"

// Time, in seconds after an imbalance is detected in which an imbalance is flagged, and possible swapping can occur
gs_ab_actiondelay "5"

// If teams become imbalanced by this many players, auto-force a balance
gs_ab_forcetrigger "4"

// If less than this amount of time (in seconds) is left in a round, stop auto-balancing.
// "0" will disable this function
gs_ab_timelimit "0"

// Only balance human players and ignore bots.
gs_ab_humanonly "0"

// Force a balance between each round. (If you use a custom team balance plugin that doesn't do this already, or you have the default one disabled)
// does not require this plugin's autobalacne to be enabled
gs_force_balance "1"

// Time in seconds to protect a client from autobalance if they have recently captured a point, defended/touched intelligence, or destroyed a sentry.
// 0 = disabled
gs_teamwork_protect "0"


// **************************
//							*
//  Auto-scramble settings	*
//							*
// **************************


// Enables/disables the automatic scrambling.
gs_autoscramble "1"

// Auto-scramble only after a full round has completed.
gs_as_fullroundonly "0"

// If a teams wins with a frag ratio greater than or equal to this setting, trigger a scramble
// 0 = disables this check
gs_as_hfragratio "0"

// Starts a scramble vote instead of scrambling at the end of a round
gs_as_vote "0"

// If a team wins in less time, in seconds, than this, and has a frag ratio greater than specified: perform an auto scramble.
// 0 = disables this check
gs_as_wintimelimit "0"

// Lower kill ratio for teams that win in less than the wintime_limit.
gs_as_wintimeratio "1.5"

// If the average score difference for all players on each team is greater than this, then trigger a scramble.
// 0 = disables this check
gs_as_playerscore_avgdiff "0"

// If a team has this many more dominations than the other team, then trigger a scramble.
// 0 = disables this check
gs_as_domination_diff "5"

// If enabled, trigger a scramble if a team never captures the point in koth mode
gs_as_koth_pointcheck "0"

// If enabled, lock teams when a scramble is about to happen until it happens. This will block clients from changing to spectator
gs_as_lockteamsbefore "1"

// If enabled, lock teams the entire next round after a scramble. This will block clients from changing teams
gs_as_lockteamsafter "1"


// **************************
//							*
// global scramble settings *
//							*
// **************************

// Minimum people connected before scrambles are possible
gs_as_minplayers "18"

// If enabled, teams will scramble at the end of the 'waiting for players' period
gs_prescramble "0"

// If a scramble happens during setup, restore the setup timer to its starting value
gs_setup_reset "1"

// Sets if admins and people with uber and engie buildings are immune from being scrambled.
// medics + enginneers are not immune during scrambles at the beginning of the round
// 0 = no immunity
// 1 = just admins
// 2 = charged medics + engineers with buildings
// 3 = admins + charged medics and engineers with buildings.
gs_scramble_immune "3"

// If a scramble-now happens during setup time, fill up any medic's uber-charge.
gs_setup_fill_ubers "1"

// Player scramble sort mode.
// 1 = Random
// 2 = Player Score
// 3 = Player Score Per Minute.
// 4 = Player Kill-Death Ratios
// 5 = Swap the top players on each team, controlled by gs_top_swaps
// 6 = Use GameME rank
// 7 = Use GameMe Skill
// 8 = Use Global GameMe rank
// 9 = Use Global GameMe skill
// 10 = Use GameMe Session
// 11 = Use HlxCe Rank
// 12 = Use HlxCe Skill
// 13 = Sort by player classes
// 14 = Choose randomly one of the above sort modes.
// This controls how players get swapped during a scramble.
gs_sort_mode "1"

// Percentage of players to randomly choose during a random scramble
// min 0.10
// max 0.8
gs_random_selections "0.65"

// The number of players to swap during a top-swap scramble
gs_top_swaps "5"

// If set, it will scramble after a team wins X full rounds in a row
gs_winstreak "2"

// If set, it will scramble every X full rounds
gs_scramblerounds "0"

// If set, then it will block auto-scrambling from happening two rounds in a row. 
// Also stops scrambles from being started if one has occured already during a round.
gs_no_sequential_scramble "1"

// If set, then print scramble stats
gs_as_print_stats "1"

// If set, then grand dueling immunity during a scramble.
gs_as_dueling_immunity "1"

// Only allow one scramble per round
gs_onescrambleperround "0"

// **************************
//							*
//  admin flag settings	    *
//							*
// **************************
// ** if multiple flags specified, will work if client has just one of these flags


// Admin flags for scramble protection (if enabled)
gs_flags_scramble "b"

// Admin flags for balance protection (if enabled)
gs_flags_balance "a"

// Admin flags for team swap block protection (if enabled)
gs_flags_teamswap "b"


// **************************
//							*
//  generic settings   		*
//							*
// **************************

// Disable most of the frequent chat messages the plugin displays
gs_silent "1"

// Integrate into the sourcemod admin menu
gs_admin_menu "0"

// Enable the mp_forceautoteam command and block people from using the 'jointeam' and 'spectate commands
gs_block_jointeam "0"

// Sets if admins set by 'gs_flags_teamswap' are immune from team swap blocking
gs_teamswitch_immune "1"

// Punish clients trying to restack teams during the team-switch block period by adding time to when they are able to team swap again
gs_punish_stackers "1"

// Time after being swapped by a balance or scramble where players aren't allowed to change teams
gs_changeblocktime "180"

// The plugin will check if people are reconnecting to the server to avoid being forced on a team. Requires clientprefs
gs_check_reconnect "1"

// Allow clients to choose buddies so that the plugin will try to auto-balance them together, 
// and not scramble buddies who are on the same team
gs_use_buddy_system "0"

// If set, block client changes to spectator that result in a team imbalance
gs_prevent_spec_imbalance "0"

// Select spectators who have recently changed to specator during scrambles and force-balance.
// Setting to 0 disables.
gs_Select_spectators "0"

// **************************
//							*
//  voting settings   		*
//							*
// **************************

// How often, in seconds, to advertise the vote-scramble command
// 0 = Disabled
gs_vote_advertise "300"

// String clients type in chat to trigger a vote
// separate multiple triggers with COMMA
// max of 3 triggers
gs_vote_trigger "votescramble,scramblevote,sausage"

// If set, publicly started votes are disabled when an admin is preset.
gs_vote_adminblock "0"

// 0 will trigger scramble for round end.
// 1 will scramble teams after vote.
gs_menu_votebehavior "1"

// Percentage of votes for the menu vote scramble needed.
gs_menu_votesneeded "0.65"

// Enable/disable public voting
gs_public_votes "1"

// If this many seconds or less is left on the round timer, then block public voting.
gs_public_roundtime "0"

// How to handle the final public vote if there are less that X seconds left in the round, specified by the roundtime cvar.
// 0 = block the final vote.
// 1 = Allow the vote and force a scramble for the next round regardless of any other setting.
gs_public_roundtime_blockmode "0"

// Percentage of people needing to trigger a scramble in chat. If using votemode 1, I suggest you set this lower than 50%
gs_public_triggers "0.50"

// For public chat votes
// 0 = if enough triggers, enable scramble for next round.
// 1 = if enough triggers, start menu vote to start a scramble
// 2 = scramble teams right after the last trigger.
gs_public_votemode "1"

// Time in seconds after the map has started and after a failed vote in which players can votescramble.
gs_vote_delay "180.0"

// Time in seconds after a successful scramble in which players can vote again.
gs_vote_delay2 "600"

// Minimum people connected before any voting will work.
gs_vote_minplayers "12"
and here my admins.cfg:

Code:
Admins
{
	"Newbie'"
	{
		"auth"		"steam"
		"identity"	"STEAM_0:0:27073305"
		"flags"		"az"
		"immunity"	"99"
	}

        "Sterni"
	{
		"auth"		"steam"
		"identity"	"STEAM_0:1:22845901"
		"flags"		"abcdefo"
		"immunity"	"10"
	}

        "S44RMAN"
	{
		"auth"		"steam"
		"identity"	"STEAM_0:1:49381666"
		"flags"		"abcfo"
		"immunity"	"10"
	}

	"Newbie' 2.0"
	{
		"auth"		"steam"
		"identity"	"STEAM_0:0:40759872"
		"flags"		"z"
		"immunity"	"10"
	}
}
Hope anyone can help me

Thanks!

* And thanks david for this fix really nice ;)
__________________

Last edited by Newbie1992; 07-16-2013 at 04:58.
Newbie1992 is offline
Newbie1992
Senior Member
Join Date: Jan 2013
Location: Germany
Old 07-23-2013 , 14:39   Re: [TF2] gScramble (Redux)
Reply With Quote #35

/push

Can someone help me?

Thanks!
__________________
Newbie1992 is offline
cool_myll
SourceMod Donor
Join Date: Aug 2011
Old 08-01-2013 , 08:05   Re: [TF2] gScramble (Redux)
Reply With Quote #36

I think it is reported before too:

Quote:
L 08/01/2013 - 12:296: Info (map "koth_arctic_b3") (file "errors_20130801.log")
L 08/01/2013 - 12:296: [SM] Native "GetEntProp" reported: Property "m_iScore" not found (entity 1/player)
L 08/01/2013 - 12:296: [SM] Displaying call stack trace for plugin "gscramble.smx":
L 08/01/2013 - 12:296: [SM] [0] Line 1743, gscramble.sp::GetAvgScoreDifference()
L 08/01/2013 - 12:296: [SM] [1] Line 239, gscramble/gscramble_autoscramble.sp::AutoScrambleCheck( )
L 08/01/2013 - 12:296: [SM] [2] Line 69, gscramble/gscramble_autoscramble.sp::ScrambleCheck()
L 08/01/2013 - 12:296: [SM] [3] Line 2255, gscramble.sp::Event_RoundStart()
L 08/01/2013 - 125:50: [SM] Native "GetEntProp" reported: Property "m_iScore" not found (entity 1/player)
L 08/01/2013 - 125:50: [SM] Displaying call stack trace for plugin "gscramble.smx":
L 08/01/2013 - 125:50: [SM] [0] Line 1747, gscramble.sp::GetAvgScoreDifference()
L 08/01/2013 - 125:50: [SM] [1] Line 239, gscramble/gscramble_autoscramble.sp::AutoScrambleCheck( )
L 08/01/2013 - 125:50: [SM] [2] Line 69, gscramble/gscramble_autoscramble.sp::ScrambleCheck()
L 08/01/2013 - 125:50: [SM] [3] Line 2255, gscramble.sp::Event_RoundStart()
L 08/01/2013 - 12:41:13: [SM] Native "GetEntProp" reported: Property "m_iScore" not found (entity 1/player)
L 08/01/2013 - 12:41:13: [SM] Displaying call stack trace for plugin "gscramble.smx":
L 08/01/2013 - 12:41:13: [SM] [0] Line 1747, gscramble.sp::GetAvgScoreDifference()
L 08/01/2013 - 12:41:13: [SM] [1] Line 239, gscramble/gscramble_autoscramble.sp::AutoScrambleCheck( )
L 08/01/2013 - 12:41:13: [SM] [2] Line 69, gscramble/gscramble_autoscramble.sp::ScrambleCheck()
L 08/01/2013 - 12:41:13: [SM] [3] Line 2255, gscramble.sp::Event_RoundStart()
L 08/01/2013 - 12:46:26: Error log file session closed.
L 08/01/2013 - 12:56:05: SourceMod error session started
L 08/01/2013 - 12:56:05: Info (map "pl_upward") (file "errors_20130801.log")
L 08/01/2013 - 12:56:05: [SM] Native "GetEntProp" reported: Property "m_iScore" not found (entity 1/player)
L 08/01/2013 - 12:56:05: [SM] Displaying call stack trace for plugin "gscramble.smx":
L 08/01/2013 - 12:56:05: [SM] [0] Line 1747, gscramble.sp::GetAvgScoreDifference()
L 08/01/2013 - 12:56:05: [SM] [1] Line 239, gscramble/gscramble_autoscramble.sp::AutoScrambleCheck( )
L 08/01/2013 - 12:56:05: [SM] [2] Line 69, gscramble/gscramble_autoscramble.sp::ScrambleCheck()
L 08/01/2013 - 12:56:05: [SM] [3] Line 2255, gscramble.sp::Event_RoundStart()
L 08/01/2013 - 13:06:19: Error log file session closed.
L 08/01/2013 - 134:15: SourceMod error session started
L 08/01/2013 - 134:15: Info (map "koth_harvest_final") (file "errors_20130801.log")
L 08/01/2013 - 134:15: [SM] Native "GetEntProp" reported: Property "m_iScore" not found (entity 1/player)
L 08/01/2013 - 134:15: [SM] Displaying call stack trace for plugin "gscramble.smx":
L 08/01/2013 - 134:15: [SM] [0] Line 1743, gscramble.sp::GetAvgScoreDifference()
L 08/01/2013 - 134:15: [SM] [1] Line 239, gscramble/gscramble_autoscramble.sp::AutoScrambleCheck( )
L 08/01/2013 - 134:15: [SM] [2] Line 69, gscramble/gscramble_autoscramble.sp::ScrambleCheck()
__________________
cool_myll is offline
_david_
SourceMod Donor
Join Date: Apr 2013
Old 08-01-2013 , 16:16   Re: [TF2] gScramble (Redux)
Reply With Quote #37

Quote:
Originally Posted by cool_myll View Post
I think it is reported before too:
Are you using v3.0.16?
_david_ is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-01-2013 , 16:40   Re: [TF2] gScramble (Redux)
Reply With Quote #38

Quote:
Originally Posted by _david_ View Post
Are you using v3.0.16?
I'm going to say no, since the code attached to the first post doesn't ever look for m_iScore on the player entities.

Having said that, the version attached to the first post still has the error where m_iScore isn't being looked up properly, as mentioned by vitorhnn back on the 11th of last month.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-01-2013 at 16:47.
Powerlord is offline
_david_
SourceMod Donor
Join Date: Apr 2013
Old 08-02-2013 , 13:01   Re: [TF2] gScramble (Redux)
Reply With Quote #39

Code:
2-8-2013(v3.0.17)
* Fixed a bug when retrieving player m_iScore (Thanks vitorhnn & Powerlord)
Attached Files
File Type: sp Get Plugin or Get Source (gscramble.sp - 92 views - 81.5 KB)
File Type: zip Gscramble (redux).zip (120.2 KB, 70 views)
_david_ is offline
cool_myll
SourceMod Donor
Join Date: Aug 2011
Old 08-03-2013 , 04:03   Re: [TF2] gScramble (Redux)
Reply With Quote #40

Sorry i thought it would autoupdate. Will test with the newer version.
__________________
cool_myll is offline
Reply


Thread Tools
Display Modes

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 19:30.


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