Search found 569 matches

by iPlayer
Sun Dec 20, 2015 5:49 pm
Forum: Plugin Development Support
Topic: SQL anyone?
Replies: 11
Views: 8119

Alright then, satoon. Guess for now I'll just install all this stuff for myself, and by the time I release the plugin to public, I hope pip would be implemented. A bit off-topic: if I can't include a custom package myself, I believe I should post it in the Module/Package Submissions forum. Then, say...
by iPlayer
Sun Dec 20, 2015 11:50 am
Forum: Plugin Development Support
Topic: SQL anyone?
Replies: 11
Views: 8119

What if we have two plugins and a lib ⋅ Plugin A. Depends on the lib not older than version 1.0, shipped with version 1.0; ⋅ Plugin B. Depends on the same lib, but version v2.0, because it needs the very latest features. Shipped with lib v2.0; ⋅ Lib. Version 2.0 is back...
by iPlayer
Sun Dec 20, 2015 9:51 am
Forum: Plugin Development Support
Topic: SQL anyone?
Replies: 11
Views: 8119

Well, I'll hapilly ship my own plugin with PyMySQL and SQLAlchemy, but what happens if every other plugin comes with its own stuff to the site-packages directory? One plugin uses PyMySQL vX.X, another one vY.Y, the third one vZ.Z etc. They will override each other and we will end up with conflicting...
by iPlayer
Sun Dec 20, 2015 7:07 am
Forum: Plugin Development Support
Topic: SQL anyone?
Replies: 11
Views: 8119

I didn't know there already was a talk about SQLAlchemy, and I'm glad I'm not the only one who needs it. Well, will be looking forward to seeing it shipped. But for now I'll have to somehow embed it by myself.
by iPlayer
Sat Dec 19, 2015 7:38 pm
Forum: Plugin Development Support
Topic: ticks delays by name
Replies: 6
Views: 5105

I'm afraid there's no such example when it can't be avoided.
It's all about objects. You can store them, pass them back and forth, and it's beautiful.
by iPlayer
Sat Dec 19, 2015 4:31 pm
Forum: Plugin Development Support
Topic: Smoketraill
Replies: 4
Views: 3805

I knew I saw CSmokeStack somewhere :) And I guess that rendercolor and renderamt already had shortcuts.
by iPlayer
Sat Dec 19, 2015 1:11 pm
Forum: Plugin Development Support
Topic: Smoketraill
Replies: 4
Views: 3805

from players.entity import Player from colors import Color from commands.say import SayCommand from entities.entity import Entity from mathlib import Vector from engines.precache import Generic as PrecacheGeneric PrecacheGeneric("particle/SmokeStack.vmt", preload=True) @SayCommand...
by iPlayer
Sat Dec 19, 2015 12:21 pm
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 116615

1st approach. This strips all weapons from a player: for index in player.weapon_indexes(): weapon = Entity(index) # TODO: BaseEntity would be enough here? player.drop_weapon(weapon.pointer, Vector(0, 0, 0), Vector(0, 0, 0)) weapon.remove() player here ...
by iPlayer
Sat Dec 19, 2015 11:46 am
Forum: Plugin Development Support
Topic: SQL anyone?
Replies: 11
Views: 8119

SQL anyone?

Hey there, So I'm getting pretty close to porting functionality that depends on accessing a remote SQL database. In ES I used sqlite3 for local databases and pypyodbc for remote databases. The latter was chosen as the one written in pure python, supporting Python 2.5 and being one python file - thus...
by iPlayer
Thu Dec 17, 2015 9:45 am
Forum: Plugin Development Support
Topic: Port of IPToCountry and some questions to port from ES To SP
Replies: 25
Views: 16593

You sure you're getting UTF-8 from u.read()?

I can assume that you're actually getting binary data from that, and StringIO won't work in this case.
Try adapting your code to ByteIO.
by iPlayer
Mon Dec 07, 2015 5:49 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 90070

There's also this CServerTools::ReloadParticleDefintions function, I guess it may end up sending something to client. But I'm unsure what kind of file the function requires (manifest?) and how to call it.
by iPlayer
Mon Dec 07, 2015 6:04 am
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 90070

No, I tried PrecacheModel and it didn't work either. It only works when I put the following manifest in /custom/myparticles/particles_manifest.txt particles_manifest{    "file"        "particles/my_particle_systems.pcf"    "file"        "particles/achievement.pcf"    "file"        "particles/blood_i...
by iPlayer
Sat Dec 05, 2015 11:26 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 90070

Also found a post at AlliedModders claiming that CS:S is something special in this case: No any precache here, i cannot use my own particle systems by that code, Just spawn is simple enough... My friend uses 3 ddl's and a lot of code to use them at cs:s he's vid: https://www.youtube.com/watch?v=b0hZ...
by iPlayer
Sat Dec 05, 2015 11:22 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 90070

I did. from entities.entity import Entity from engines.precache import Generic as PrecacheGeneric from events import Event from mathlib import Vector from stringtables.downloads import Downloadables PARTICLE_FILE = "particles/my_particle_systems.pcf" my_downloads = Downloadables() ...
by iPlayer
Sat Dec 05, 2015 11:16 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 90070

Any way to make custom particles work in CS:S? I tried uploading my *.pcf file to a client, but the client doesn't seem to recognize particle systems inside of it Attemped to precache unknown particle system "my_particle_system"! ... Attempting to create unknown particle system 'my_particle_system'
by iPlayer
Fri Nov 27, 2015 3:23 pm
Forum: Code examples / Cookbook
Topic: Creating and manually firing VMF-like output connections
Replies: 11
Views: 29032

I actually misread a lot in your suggestion, Doldol, I was sleepy (and I am), and I made some significant changes to my previous post. Main things changed: 1. I don't get the point of taking the target pattern out of the rest of the connection: "floor1_relay": ["Disable",False,0,...
by iPlayer
Fri Nov 27, 2015 8:28 am
Forum: Code examples / Cookbook
Topic: Creating and manually firing VMF-like output connections
Replies: 11
Views: 29032

Well, thanks for this idea, haven't thought of it. In fact, I only finished switching to JSON yesterday, before that I used to use the KeyValues format for my transitional files. The reasoning behind that was "my precompiler import VMF as KeyValues, let's keep it simple and export KeyValues too, eh"...
by iPlayer
Thu Nov 26, 2015 11:16 pm
Forum: Plugin Requests
Topic: Plugins converts from Eventscripts to Source Python
Replies: 35
Views: 26480

Is there no way to access VPK content internally? I mean, from the engine level as it mounts VPK. I guess working with VPK from outside means a lot of wasted RAM.
by iPlayer
Thu Nov 26, 2015 8:11 pm
Forum: Code examples / Cookbook
Topic: Creating and manually firing VMF-like output connections
Replies: 11
Views: 29032

but I don't know of it keeping track of how many times it was fired Yes, later I learned about delays, but haven't got around to actually removing that tick_delays part. Regarding to keeping track of how many times it was fired, well, here you need some instance to track. Because you can't judge if...
by iPlayer
Thu Nov 26, 2015 6:25 pm
Forum: Code examples / Cookbook
Topic: Creating and manually firing VMF-like output connections
Replies: 11
Views: 29032

Some of the entities don't get networked thus my first post didn't work with them. I included some additional code (that's even more code!), should work fine now. I hope some of the Entity functionality would move to BaseEntity so that I can reduce the amount of my code again. See also http://forums...

Go to advanced search