Search found 1256 matches

by L'In20Cible
Sat Dec 26, 2015 9:36 pm
Forum: Plugin Development Support
Topic: Copy of player object
Replies: 6
Views: 4628

Well, almost all of the values are retrieved dynamically which means that even if you cache an object, all the values will remains the same as the engine. To be honnest, I'm not sure why you would ever need to access an object representing a player that... doesn't exist... What are you trying to do?
by L'In20Cible
Thu Dec 24, 2015 6:21 pm
Forum: Plugin Development Support
Topic: Hooking OnPlayerRunCmd
Replies: 4
Views: 3785

You could also try to get/set Player.buttons (points at m_nButtons) attribute.
by L'In20Cible
Thu Dec 24, 2015 3:24 am
Forum: Plugin Requests
Topic: Snowfall for Black Mesa
Replies: 29
Views: 21720

Winter is NOT coming !

by L'In20Cible
Sat Dec 19, 2015 8:05 pm
Forum: Plugin Development Support
Topic: ticks delays by name
Replies: 6
Views: 5089

There is no naming implementation for the simple fact that names would be shared between plugins which can cause issues. That, and that we try to prone OOP as much as we can. However, you could create a simple class inheriting of a dictionary: class NamedDelays(dict): def delay(self, nam...
by L'In20Cible
Sat Dec 19, 2015 7:53 pm
Forum: Plugin Development Support
Topic: Langstrings Options
Replies: 4
Views: 3507

Well, no. You cannot assign them an order cause that can change from a language to another and they need to be translated wherever they are in the sentence so they have to be named keywords. Actually, there is 2 styles currently implemented to convert keywords and this is going to change. The Templa...
by L'In20Cible
Sat Dec 19, 2015 4:44 pm
Forum: Plugin Development Support
Topic: Langstrings Options
Replies: 4
Views: 3507

Syntax: Select all

strings['EliminatedTarget'].get_string(language=None, target='foo', weapon='bar')
by L'In20Cible
Sat Dec 19, 2015 12:25 am
Forum: Plugin Development Support
Topic: More questions
Replies: 26
Views: 17973

Use get_command_string instead. get_arg_string, like the name is telling you, get the "arguments" as a string, not the entire command line.
by L'In20Cible
Fri Dec 18, 2015 9:35 am
Forum: Plugin Development Support
Topic: More questions
Replies: 26
Views: 17973

Also, you could replace the hard-coded values using their respective constants. from entities.constants import INVALID_ENTITY_INTHANDLE if player.get_property_int('m_hGroundEntity') == INVALID_ENTITY_INTHANDLE: from entities.constants import SolidType trigger_multiple.set_property_uc...
by L'In20Cible
Fri Dec 18, 2015 12:32 am
Forum: Plugin Development Support
Topic: More questions
Replies: 26
Views: 17973

1. How can i fire a event? es.event("initialize", "player_say") es.event("setint", "player_say", "userid", userid) es.event("setstring", "player_say", "text", text) es.event("fire",...
by L'In20Cible
Thu Dec 17, 2015 11:50 pm
Forum: Plugin Development Support
Topic: More questions
Replies: 26
Views: 17973

Actually, since your questions are not related to each others, I think you should create a new thread for each of them. I will be glad to provide some examples you asked for but quoting and answering multiples questions while editing seem to get messy rather quickly, lol.
by L'In20Cible
Thu Dec 17, 2015 6:36 am
Forum: Plugin Development Support
Topic: Port of IPToCountry and some questions to port from ES To SP
Replies: 25
Views: 16513

Please, post full code to reproduce and full traceback.
by L'In20Cible
Mon Dec 14, 2015 7:51 pm
Forum: Plugin Requests
Topic: Snowfall for Black Mesa
Replies: 29
Views: 21720

@OnLevelInit def level_init(map_name): for worldspawn in EntityIter("worldspawn"): break else: raise NotImplementedError("No world on round start ~ wut?") I think I would rather recommend using: from entities.constants import WORLD_ENTITY_INDEX @OnLevelIn...
by L'In20Cible
Sun Dec 13, 2015 12:30 pm
Forum: Plugin Development Support
Topic: say hook and a 2 questions
Replies: 6
Views: 4613

Well, I was talking in general. Tick listeners should only be used for time based tasks and will be costly if you interact with the engine (entities, players and stuff...). Since you asked about it, I thought I'd mention.
by L'In20Cible
Sun Dec 13, 2015 4:09 am
Forum: Plugin Development Support
Topic: say hook and a 2 questions
Replies: 6
Views: 4613

In most case, you should avoid using a tick listener and use a hook that brings the info you need to you instead of you querying it every frame. Tell us more, I'm sure there is a better solution.
by L'In20Cible
Sat Dec 05, 2015 11:25 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 86806

Syntax: Select all

PrecacheGeneric(PARTICLE_FILE, preload=True)
by L'In20Cible
Sat Dec 05, 2015 11:21 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 86806

You need to precache your pcf file:

Syntax: Select all

from engines.server import engine_server
from listeners import OnLevelInit

@OnLevelInit
def on_level_init(map_name):
engine_server.precache_generic('file.pcf', True)
by L'In20Cible
Thu Dec 03, 2015 1:45 am
Forum: Plugin Development Support
Topic: Modifying bot profile values
Replies: 4
Views: 3407

Well, from what I remember, you can configure as many profiles as you want and you can add a specific one using "bot_add <team> <profile>" or something like that.
by L'In20Cible
Thu Dec 03, 2015 12:07 am
Forum: Plugin Development Support
Topic: Modifying bot profile values
Replies: 4
Views: 3407

Why aren't you simply modifying the db?
by L'In20Cible
Wed Nov 25, 2015 1:14 pm
Forum: General Discussion
Topic: Weird behaviour during warmup
Replies: 7
Views: 6389

Player.is_fake_client, is a wrapper around PlayerInfo.is_fake_client which simply check if the FL_FAKECLIENT flag is set on the player. However, since anyone (plugins, scripts, etc.) can change players' flags, that method is not 100% accurate - and yes, checking against the SteamID is probably the b...
by L'In20Cible
Sat Nov 21, 2015 1:01 pm
Forum: Plugin Development Support
Topic: Restart the round
Replies: 30
Views: 18788

I tried putting the flag back right after executing endround , but it didn't work for me, so I decided to put the flag back when a new round starts. I guess this is caused by server_command adding the command to the parser which then executes waiting commands once a frame. You need to do something ...

Go to advanced search