Raised This Month: $32 Target: $400
 8% 

Solved [REQ][TF2]team based @random player target filter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xjonx
Member
Join Date: Nov 2016
Location: Builders League UnitedHQ
Old 11-07-2016 , 16:28   [REQ][TF2]team based @random player target filter
Reply With Quote #1

You know how in most admin commands you can target a player, yourself, or a team? I would like to see a target that chose a random player (ie. @random). This is optional, but I'd also like if it were team-based, like choosing a random player from this team only (ie. @randomblu and @randomred). Thank you for reading this.

Last edited by xjonx; 11-07-2016 at 20:13. Reason: request was fullfilled
xjonx is offline
Send a message via Skype™ to xjonx
Mitchell
~lick~
Join Date: Mar 2010
Old 11-07-2016 , 17:28   Re: [REQ][TF2]team based @random player target filter
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=2105028
and the config for what you want:
Code:
"SuperTargeting"
{
    "@random"
    {
        "text" "random player"
        "random" "1"
    }
    "@randomred"
    {
        "text" "random Red player"
        "team" "2"
        "random" "1"
    }
    "@randomblu"
    {
        "text" "random Blue player"
        "team" "3"
        "random" "1"
    }
}

Last edited by Mitchell; 11-07-2016 at 17:29.
Mitchell is offline
xjonx
Member
Join Date: Nov 2016
Location: Builders League UnitedHQ
Old 11-07-2016 , 18:22   Re: [REQ][TF2]team based @random player target filter
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
https://forums.alliedmods.net/showthread.php?p=2105028
and the config for what you want:
Code:
"SuperTargeting"
{
    "@random"
    {
        "text" "random player"
        "random" "1"
    }
    "@randomred"
    {
        "text" "random Red player"
        "team" "2"
        "random" "1"
    }
    "@randomblu"
    {
        "text" "random Blue player"
        "team" "3"
        "random" "1"
    }
}
I get an exception. It seems the plugin is missing a phrases file
Exection text
xjonx is offline
Send a message via Skype™ to xjonx
Mitchell
~lick~
Join Date: Mar 2010
Old 11-07-2016 , 18:35   Re: [REQ][TF2]team based @random player target filter
Reply With Quote #4

That seems to be an issue with your script, not mine... just by reading it I'm not too sure what sm_rsptc is.
try:
LoadTranslations("common.phrases");
on PluginStart.

Last edited by Mitchell; 11-07-2016 at 18:37.
Mitchell is offline
xjonx
Member
Join Date: Nov 2016
Location: Builders League UnitedHQ
Old 11-07-2016 , 19:44   Re: [REQ][TF2]team based @random player target filter
Reply With Quote #5

Quote:
Originally Posted by Mitchell View Post
That seems to be an issue with your script, not mine... just by reading it I'm not too sure what sm_rsptc is.
try:
LoadTranslations("common.phrases");
on PluginStart.
This is what sm_rsptc is. Found out what was causing it: It was the plugin sm_rsptc. It seems the plugin can only target by player names and hasn't been coded to use target filters (like @randomblu)
xjonx is offline
Send a message via Skype™ to xjonx
Mitchell
~lick~
Join Date: Mar 2010
Old 11-07-2016 , 20:18   Re: [REQ][TF2]team based @random player target filter
Reply With Quote #6

Quote:
Originally Posted by xjonx View Post
This is what sm_rsptc is. Found out what was causing it: It was the plugin sm_rsptc. It seems the plugin can only target by player names and hasn't been coded to use target filters (like @randomblu)
Attached Files
File Type: sp Get Plugin or Get Source (sm_rsptc.sp - 267 views - 1.8 KB)
Mitchell is offline
xjonx
Member
Join Date: Nov 2016
Location: Builders League UnitedHQ
Old 11-07-2016 , 20:47   Re: [REQ][TF2]team based @random player target filter
Reply With Quote #7

Quote:
Originally Posted by Mitchell View Post
Attached Files
File Type: Get Plugin or Get Source (sm_rsptc.sp - 1 views - 1.8 KB)
that made it work, thanks

Last edited by xjonx; 11-07-2016 at 20:48.
xjonx is offline
Send a message via Skype™ to xjonx
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 04:53.


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