Search found 1259 matches

by L'In20Cible
Thu Jun 05, 2014 11:35 pm
Forum: Plugin Development Support
Topic: AcceptEntityInput
Replies: 10
Views: 15750

I see, i cannot test myself im on my phone lost in the.mountains
by L'In20Cible
Thu Jun 05, 2014 9:31 pm
Forum: Plugin Development Support
Topic: AcceptEntityInput
Replies: 10
Views: 15750

Well its normal you tell the game the bullet has passed 2 objects before hurting the player so less damage is.expected
by L'In20Cible
Wed Jun 04, 2014 5:17 pm
Forum: Plugin Development Support
Topic: AcceptEntityInput
Replies: 10
Views: 15750

The damages are adjusted depending the type you use
by L'In20Cible
Sat May 17, 2014 12:03 pm
Forum: Plugin Development Support
Topic: Nesting damage
Replies: 6
Views: 13673

Thats because PlayerEntity.isdead is broken use PlayerEntity.pl.deadflag instead.
by L'In20Cible
Mon May 12, 2014 10:14 am
Forum: Plugin Development Support
Topic: Radar possebilities?
Replies: 15
Views: 27665

Something like this should works: from entities import EntityGenerator from filters.players import PlayerIter from listeners.tick import Tick for player_manager in EntityGenerator('cs_player_manager'): break @Tick def tick_listener(): for index in PlayerIter('alive...
by L'In20Cible
Thu May 08, 2014 6:58 pm
Forum: Plugin Development Support
Topic: listeners Tick
Replies: 4
Views: 8602

About _globals, I just ended up putting the GlobalVars singleton into core.py, unless you have a better place to put it, I don't see any benefit having a package for a single variable. As for _constants, most of them will be moved into players/entities.constants and the remaining will stay into cons...
by L'In20Cible
Thu May 08, 2014 4:59 am
Forum: Plugin Development Support
Topic: listeners Tick
Replies: 4
Views: 8602

Syntax: Select all

from listeners.tick import Tick
by L'In20Cible
Tue May 06, 2014 10:46 pm
Forum: News & Announcements
Topic: Syntax Highlighting is back!!!
Replies: 11
Views: 43288

Just noticed an issue, tho. Every 55 characters, there is 2 extra spaces added into Python blocks. Example here. If you go into Edit Mode, you will see the code is correct but there is extra spaces when displayed.
by L'In20Cible
Tue May 06, 2014 10:41 pm
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 407803

No need of a signature. from entities.helpers import edict_from_index from players.entity import PlayerEntity from players.helpers import index_from_userid from tools import ServerTools def give_item(player, item): '''Give an item to the given player.''' # Ghosts can&...
by L'In20Cible
Mon May 05, 2014 10:30 pm
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 407803

Weapon functionalities are not updated yet. Also, I'd rather suggest you using PlayerIter instead of PlayerGenerator . from filters.players import PlayerIter for index in PlayerIter(return_types='index'): print('A player was found at index {0}!'.format(index))
by L'In20Cible
Mon May 05, 2014 10:24 pm
Forum: News & Announcements
Topic: Syntax Highlighting is back!!!
Replies: 11
Views: 43288

What a nice feeling to my eyes!!!
by L'In20Cible
Mon May 05, 2014 9:32 pm
Forum: Plugin Development Support
Topic: Where did conversions_c move to?
Replies: 2
Views: 5960

Here is a list of where things has been moved: basetypes_c -> basetypes bot_c -> bots command_c -> _commands -> commands constants_c -> constants conversions_c -> _conversions -> players/entity.helpers cvar_c -> _cvars -> cvars datamap_c -> datamaps dump_c -> _dump effects_c -> _effects -> effects e...
by L'In20Cible
Mon May 05, 2014 9:24 pm
Forum: Code examples / Cookbook
Topic: Damaging a player
Replies: 12
Views: 32251

Hit group is an integer:

Code: Select all

#define   HITGROUP_GENERIC   0
#define   HITGROUP_HEAD      1
#define   HITGROUP_CHEST      2
#define   HITGROUP_STOMACH   3
#define HITGROUP_LEFTARM   4   
#define HITGROUP_RIGHTARM   5
#define HITGROUP_LEFTLEG   6
#define HITGROUP_RIGHTLEG   7
#define HITGROUP_GEAR      10
by L'In20Cible
Sat May 03, 2014 9:21 pm
Forum: Plugin Development Support
Topic: Handling unicode characters
Replies: 7
Views: 12582

This will open your file in UTF-8 but it won't change the encoding of the strings it contains. Since the default encoding used by print is sys.stdout.encoding (which is set to cp850), you will rather have to encode it into UTF8 to then decode it back in order to print it...
by L'In20Cible
Sat May 03, 2014 8:23 pm
Forum: Plugin Development Support
Topic: Handling unicode characters
Replies: 7
Views: 12582

Syntax: Select all

>>> data = pickle.load(open('playerdict.txt','rb'), encoding='utf-8')
by L'In20Cible
Sat May 03, 2014 5:53 pm
Forum: Plugin Development Support
Topic: Handling unicode characters
Replies: 7
Views: 12582

Well, it is hard to say what is the main problem without any code to reproduce it. I made some testing on my side and it is working just fine...
by L'In20Cible
Thu Apr 17, 2014 8:56 pm
Forum: Plugin Development Support
Topic: Values returning 'None' for variables
Replies: 6
Views: 10327

satoon101 wrote:Actually, you just need to change __init__ to __new__ with the super line.
He will also need to add "self" as first argument since __new__ is a static method.
by L'In20Cible
Thu Apr 17, 2014 9:12 am
Forum: General Discussion
Topic: gamethread
Replies: 7
Views: 11147

Well, your syntax for gamethread is wrong. It should be:

Code: Select all

import gamethread

gamethread.delayed(delay_time, myCallback, args)
Anyways, to answer your question, yes there is:

Code: Select all

from tick.delays import TickDelays

TickDelays.delay(delay_time, myCallback, *args)
by L'In20Cible
Thu Apr 17, 2014 5:10 am
Forum: Plugin Development Support
Topic: Values returning 'None' for variables
Replies: 6
Views: 10327

Well, replace the following line: self = super(dndPlayer, self).__init__(index) To the following one: self = PlayerEntity.__new__(dndPlayer, index) Please, always post your complete code so we don't have to guess your imports and/or custom global variables (such as PlayerDataDictionary) when trying ...

Go to advanced search