Search found 6 matches

by Kamiqawa
Fri Feb 06, 2015 10:52 pm
Forum: Plugin Development Support
Topic: [SOLVED] Using Python's threading with SP
Replies: 5
Views: 6996

Good point. Unloading may not be the most likely case for me but in general a way to stop the tick listener is a good idea. Thanks, I'lll be using that as the new core then. :)
by Kamiqawa
Fri Feb 06, 2015 9:10 pm
Forum: Plugin Development Support
Topic: [SOLVED] Using Python's threading with SP
Replies: 5
Views: 6996

Okay, so I think I got it sorted out so it fits my needs. Big thanks to Tha Pwned for providing me the key to the solution. Apparently the problem with threads is that Python part starts sleeping and needs to be waken up. This also explains the random-ish behaviour of threads in SP and ES: if the Py...
by Kamiqawa
Fri Feb 06, 2015 4:19 pm
Forum: Plugin Development Support
Topic: [SOLVED] Using Python's threading with SP
Replies: 5
Views: 6996

Thanks for the reply! :smile: Yeah I tested it of course first. Let me repeat the problems with different approaches. Using from mainthread The server stops while "sleeping", as expected. Using threading.Thread Strange behaviour, exactly like Eventscripts. Doesn't execute properly. Simple ...
by Kamiqawa
Fri Feb 06, 2015 12:17 pm
Forum: Plugin Development Support
Topic: [SOLVED] Using Python's threading with SP
Replies: 5
Views: 6996

[SOLVED] Using Python's threading with SP

Hey, Is there a way to use Python socket module for creating a socket-server within a SP plugin? For example here is how it could be done in standalone Python: import socket import sys from threading import Thread def start_server(): print('Starting server...') serversocket =...
by Kamiqawa
Sun Sep 02, 2012 9:56 am
Forum: Plugin Development Support
Topic: How to use SetPropVector?
Replies: 4
Views: 10075

Thank you. That was exactly what I needed. Thanks for the example too. :)
by Kamiqawa
Sat Sep 01, 2012 10:27 pm
Forum: Plugin Development Support
Topic: How to use SetPropVector?
Replies: 4
Views: 10075

How to use SetPropVector?

Hello, I tried to figure out how this thing works, but didn't get it function properly. So what type of argument should I use in setpropvector like this? player.SetPropVector Here is what I thought it could be: player.SetPropVector('CBaseEntity.m_vecOrigin', ','.join(['0&...

Go to advanced search