Search found 10 matches

by Banz
Sat Nov 05, 2016 7:31 pm
Forum: Plugin Development Support
Topic: finding out who used func_button?
Replies: 4
Views: 3729

Re: finding out who used func_button?

iPlayer wrote:targetname -> target_name

This fixed it
by Banz
Sat Nov 05, 2016 7:25 pm
Forum: Plugin Development Support
Topic: finding out who used func_button?
Replies: 4
Views: 3729

Re: finding out who used func_button?

Something like this might work: from listeners import OnEntityOutput YOUR_TARGET_NAME = 'IDK' @OnEntityOutput def on_entity_output(output_name, activator, caller, value, delay): if output_name != 'OnPressed': return if caller.classname != 'func_button': return if cal...
by Banz
Sat Nov 05, 2016 6:39 pm
Forum: Plugin Development Support
Topic: finding out who used func_button?
Replies: 4
Views: 3729

finding out who used func_button?

Hello once again!

I was wondering if there was a way to find func_button with specific targetname and also find out who pressed that button?

Thanks in advance
by Banz
Mon Sep 12, 2016 8:52 pm
Forum: Plugin Development Support
Topic: post json data lag
Replies: 12
Views: 8930

Re: post json data lag

I am no expert with threading, but I think it's something more like: from commands.say import SayCommand from messages import SayText2 from listeners.tick import GameThread import json, urllib.request def post_request(data): url = "https://example.com" req = urllib.request.Request...
by Banz
Mon Sep 12, 2016 8:33 pm
Forum: Plugin Development Support
Topic: post json data lag
Replies: 12
Views: 8930

Re: post json data lag

satoon101 wrote:Just a small tip, but if you just want the argument string, instead of this:

Syntax: Select all

whatever = {"string": command.command_string[7:]}

use this:

Syntax: Select all

whatever = {"string": command.arg_string}

Thanks was wondering if there was better way to do that :D
by Banz
Mon Sep 12, 2016 8:24 pm
Forum: Plugin Development Support
Topic: post json data lag
Replies: 12
Views: 8930

Re: post json data lag

from commands.say import SayCommand from messages import SayText2 from listeners.tick import GameThread import json, urllib.request def post_request(data): url = "https://example.com" req = urllib.request.Request(url) req.add_header("Content-Type", "appl...
by Banz
Mon Sep 12, 2016 7:09 pm
Forum: Plugin Development Support
Topic: post json data lag
Replies: 12
Views: 8930

post json data lag

Okay so the problem is whenever I try to send json data server lags for a second (var spike) but the information gets succesfully sent so thats good. Here is an example code from commands.say import SayCommand from messages import SayText2 import json, urllib.request def post_request(data): ...
by Banz
Sat Sep 10, 2016 6:43 pm
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 8567

Re: Kick menu->reason: other->text input

You need to store them in a dict or something like that. I made a small example how it could look like: # ============================================================================= # >> IMPORTS # ============================================================================= from filters.players i...
by Banz
Fri Sep 09, 2016 10:53 pm
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 8567

Re: Kick menu->reason: other->text input

The only and the most obvious text input area in CS:S is its chat area. You can go with something like selecting the player in your popup menu, but entering the reason through chat just after that. !kr Stop voice spamming Would kick selected in a popup player with the proper reason. also, motd Well...
by Banz
Fri Sep 09, 2016 9:35 pm
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 8567

Kick menu->reason: other->text input

Lets say that we have kick menu with reason selection. One of the reasons is "other" how can we ask for the reason to be typed through text input after player selects "other"? Then after that we want to be able to print both player and the reason. Also this is for csgo Thanks in ...

Go to advanced search