Search found 652 matches

by L'In20Cible
Sat Mar 11, 2017 5:36 pm
Forum: Plugin Requests
Topic: [HL2:DM] Let bodies drop something
Replies: 23
Views: 661

Re: [HL2:DM] Let bodies drop something

Painkiller wrote:The model is always pink and black.

That's normal. Into item_equipment.vmt, you can see the path of the vtf:

Code: Select all

models/items/item_equipment

So you need to place the file item_equipment.vmt and item_equipment.vtf file into the ../materials/models/items/* directory.
by L'In20Cible
Tue Feb 28, 2017 12:14 pm
Forum: Plugin Development Support
Topic: Error on take_damage
Replies: 10
Views: 126

Re: Error on take_damage

There is also a "Select all" option as header of the code block. ;)
by L'In20Cible
Tue Feb 28, 2017 8:59 am
Forum: Plugin Development Support
Topic: Error on take_damage
Replies: 10
Views: 126

Re: Error on take_damage

deal_damage is in your code:

Syntax: Select all

def deal_damage(victim_handle, damage, attacker_handle, weapon_handle):
by L'In20Cible
Mon Feb 27, 2017 11:42 am
Forum: Plugin Development Support
Topic: Error on restrict weapon
Replies: 8
Views: 216

Re: Error on restrict weapon

Add this check prior any other code into your _on_player_spawn method:

Syntax: Select all

#Is the player in a valid team?
if player.team <= 1:
return
This happens because that event is called when the players are joining the server before they actually select a team.
by L'In20Cible
Sun Feb 26, 2017 8:10 am
Forum: General Discussion
Topic: Disable choose team
Replies: 5
Views: 430

Re: Disable choose team

Along with blocking jointeam, I think you are looking to block joingame which is responsible to send the team menu when you click "OK" on the MOTD.
by L'In20Cible
Tue Feb 21, 2017 10:19 pm
Forum: Plugin Development Support
Topic: Apply skin cause csgo game crash
Replies: 16
Views: 276

Re: Apply skin cause csgo game crash

Probably crashes cause the toilet is a dynamic model which cannot be ragdolled. You could hook player deaths and reset their model to the original or prevent the ragdoll from being created in the first place.
by L'In20Cible
Tue Feb 21, 2017 3:17 am
Forum: Plugin Development Support
Topic: Performance (Repeat)
Replies: 1
Views: 66

Re: Performance (Repeat)

Depend of your implementation. If you loop through all players creating new instances (via PlayerIter, for example), then yes, it can be very slow. On the other hand, if you cache the instances (using PlayerDictionary, for example) then you can gain performance. However, performance should be consid...
by L'In20Cible
Sat Feb 11, 2017 7:19 am
Forum: Plugin Development Support
Topic: HL2DM Changing weapon model not working
Replies: 2
Views: 103

Re: HL2DM Changing weapon model not working

If I remember right, you cannot set the model prior the weapon being physically spawned (the engine lookup the model from the scripts) and that changing m_szModelName/m_nModelIndex (properties wrapped by Entity.model) won't affect its rendering once spawned. I think the following should works: ent.s...
by L'In20Cible
Fri Feb 10, 2017 10:12 am
Forum: Plugin Development Support
Topic: Error on restrict weapon
Replies: 8
Views: 216

Re: Error on restrict weapon

As a side note, the following line:

Syntax: Select all

player.drop_weapon(weapon.pointer, None, None)
Could simply be:

Syntax: Select all

player.drop_weapon(weapon)
by L'In20Cible
Sat Feb 04, 2017 11:09 am
Forum: Plugin Development Support
Topic: Hide player chat
Replies: 8
Views: 220

Re: Hide player chat

ah nice you changed your profile pic on all your accounts after i suggested that they represent your criminal activities :D, Of course, I just woke up and changed my avatar cause of your comment back in october. Trust me, you are the last reason why I would do anything. i think we should wait for w...
by L'In20Cible
Sat Feb 04, 2017 10:00 am
Forum: Plugin Development Support
Topic: Hide player chat
Replies: 8
Views: 220

Re: Hide player chat

yes you can, but usermsgs are useful when you create customized block filters. in your case, if you merely try to toggle there is a m_iHideHUD property on the player. cant test it right now but should go sthn like this: from players.constants import HideHudFlags player.set_property_int("m_...
by L'In20Cible
Thu Feb 02, 2017 7:58 pm
Forum: Plugin Requests
Topic: [HL2:DM] Let bodies drop something
Replies: 23
Views: 661

Re: [HL2:DM] Let bodies drop something

Did you try setting the model after the spawn() call? Pretty sure the model is retrieved from the scripts when the entity is being spawned.
by L'In20Cible
Tue Jan 31, 2017 12:31 am
Forum: Plugin Requests
Topic: [HL2:DM] Let bodies drop something
Replies: 23
Views: 661

Re: [HL2:DM] Let bodies drop something

It could works, yes. But since your version is using StartTouch instead of Touch, you could switch to the OnEntityOutput listener. Could also use Entity.delay to remove the packs. However, after looking into both codes again, the first code he posted was crashing even if the parent call was ignored ...
by L'In20Cible
Mon Jan 30, 2017 2:25 pm
Forum: Plugin Requests
Topic: [HL2:DM] Let bodies drop something
Replies: 23
Views: 661

Re: [HL2:DM] Let bodies drop something

It does crash for the same reason as this: viewtopic.php?p=9615#p9615

Syntax: Select all

void CBaseEntity::StartTouch( CBaseEntity *pOther )
{
// notify parent
if ( m_pParent != NULL )
m_pParent->StartTouch( pOther );
}
by L'In20Cible
Wed Jan 25, 2017 1:47 am
Forum: Plugin Development Support
Topic: spawn entity with index only
Replies: 6
Views: 154

Re: spawn entity with index only

Entity.model_name and Entity.model_index are wrapping existing properties/keyvalues of the entity itself and I don't believe it to be our role to override them to allow different types (would add unnecessary isinstance checkings). We already added an Entity.model property to make it easier to set a ...
by L'In20Cible
Wed Jan 25, 2017 1:31 am
Forum: Plugin Development Support
Topic: spawn entity with index only
Replies: 6
Views: 154

Re: spawn entity with index only

That is not how it works. The entity itself doesn't network the model name to clients (m_szModelName is not networkable while m_nModelIndex is). But the entity creation needs the model name to instantiate the entity (for debugging if you try to set a static model to a physic entity, etc.) and is res...
by L'In20Cible
Wed Jan 25, 2017 12:33 am
Forum: Plugin Development Support
Topic: set/unset parent
Replies: 7
Views: 195

Re: set/unset parent

You can directly pass an Entity instance to set_parent, no need to retrieve its pointer yourself.
by L'In20Cible
Wed Jan 25, 2017 12:31 am
Forum: Plugin Development Support
Topic: EntityPreHook "touch" crashing
Replies: 22
Views: 595

Re: EntityPreHook "touch" crashing

Totally. If you return False, the engine's code won't be executed. And since you need to touch the weapons to pick them up... I assume the pickup is handled by the m_pfnTouch function.

Go to advanced search