Search found 778 matches

by L'In20Cible
Wed Nov 15, 2017 3:07 pm
Forum: Plugin Development Support
Topic: server init
Replies: 32
Views: 1760

Re: server init

I really don't understand what you are referring to by "native module", could you elaborate which modules exactly? The game binaries? They are the ones loading Source.Python so everything that is not related to the game-play (entities, stringtables, etc.) should be accessible when loading ...
by L'In20Cible
Wed Nov 15, 2017 2:58 pm
Forum: Plugin Development Support
Topic: server init
Replies: 32
Views: 1760

Re: server init

I think you are looking for the OnServerActivate listener or server_spawn event.
by L'In20Cible
Mon Nov 13, 2017 2:20 am
Forum: Plugin Development Support
Topic: [CSGO] Getting and setting player score
Replies: 6
Views: 603

Re: [CSGO] Getting and setting player score

What is your code?
by L'In20Cible
Mon Nov 13, 2017 1:50 am
Forum: Plugin Development Support
Topic: [CSGO] Getting and setting player score
Replies: 6
Views: 603

Re: [CSGO] Getting and setting player score

Player.kills/deaths

Syntax: Select all

player = Player(index)
player.kills = 0
player.deaths = 999
print(f'{player.name} is a noob, check the scoreboard!')
by L'In20Cible
Sun Nov 12, 2017 11:33 pm
Forum: Plugin Development Support
Topic: WeaponID
Replies: 9
Views: 657

Re: WeaponID

Kami wrote:The question is if the data is outdated or if I'm doing something wrong.

Probably is. The bastards at VALVe are changing weapons stuff daily for CS:GO. :tongue:
by L'In20Cible
Sun Nov 12, 2017 11:28 pm
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

lol. Hey, as long as it works, I'm good with it. Thank you! It might have a direct way to retrieve the origin by extracting the animation/pose parameter from the cs_player_shared.mdl/ak_anims_t/ct.mdl files but I'm really unsure about that. The bone might also be different for CS:GO, I extracted it...
by L'In20Cible
Sun Nov 12, 2017 9:46 am
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

Player doesn't have an eye_position attribute, I guess you meant eye_location. However, it returns player.origin + player.view_vector, and your code is the exact same thing, just differently written. ^^ EDIT: Quite crappy... but works! from engines.precache import Model from entities.constants impor...
by L'In20Cible
Sun Nov 12, 2017 9:09 am
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

sorry i misinserted the z offset xD what about this? EDIT: from mathlib import QAngle, Vector from players.entity import Player player = Player(1) angles = QAngle(*player.get_property_vector('m_angAbsRotation')) pos = player.get_property_vector('m_HackedGunPo...
by L'In20Cible
Sun Nov 12, 2017 8:51 am
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

well you dont have to test it, if you dont want to. it just sounded like you tested your code one moment earlier. so why are you saying that your code was pointing towards "(the front of its feet)"? looking at your actual code, i can say it probably just point towards to the worlds root a...
by L'In20Cible
Sun Nov 12, 2017 8:17 am
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

@L'In20Cible what if you test this code: I didn't test, but can already tells it won't help. Moving the z axis by 64 (or directly using player.view_offset.z) will only move the vector up without taking the player's angle into consideration and will be in front of the player's eyes no matter where t...
by L'In20Cible
Sun Nov 12, 2017 7:46 am
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

I'm trying to get the world position at the time a player shoots their weapon (or more precisely, on bullet_impact and OnTakeDamage). I did find a few SM plugins that use CBaseCombatCharacter::Weapon_ShootPosition(). I tried adding the virtual function to my entity data, but it gives an error (from...
by L'In20Cible
Sat Nov 11, 2017 11:53 pm
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

I can't seem to find ValveBiped.flash. That bone is on the weapon's world models: from studio.cache import model_cache models = ( 'models/weapons/w_rif_ak47.mdl', 'models/weapons/v_rif_ak47.mdl', 'models/player/t_phoenix.mdl' ) for model in models: print(model...
by L'In20Cible
Sat Nov 11, 2017 12:46 am
Forum: Plugin Development Support
Topic: Get muzzle position
Replies: 20
Views: 1536

Re: Get muzzle position

To get the muzzle location of an equipped weapon, you would need to get the position of the ValveBiped.weapon_bone bone of the player's model, get a rotation matrix to convert its position to world coordinates based on the player's origin/angles, then get the local bone associated with the muzzle at...
by L'In20Cible
Tue Nov 07, 2017 4:57 am
Forum: Whatever
Topic: Free games!!
Replies: 34
Views: 4751

Re: Free games!!

Thank you!
by L'In20Cible
Tue Nov 07, 2017 2:15 am
Forum: Plugin Requests
Topic: Hi New here
Replies: 29
Views: 2009

Re: Hi New here

Welcome to the forums!

What kind of gunmenu?
by L'In20Cible
Sun Nov 05, 2017 3:24 am
Forum: Plugin Requests
Topic: [HL2:DM] Modelshooser
Replies: 2
Views: 337

Re: [HL2:DM] Modelshooser

Setting for DM only red models and TDM blue and red models. The code you posted doesn't set model based on gamemode, but set a random model out of 72 to the players that are spawning. I'm not entirely sure what exactly you are looking for, could you elaborate? How exactly do you differentiate from ...
by L'In20Cible
Thu Nov 02, 2017 10:57 pm
Forum: Plugin Development Support
Topic: Bots: Console gets spammed with buy zone warning
Replies: 5
Views: 397

Re: Bots: Console gets spammed with buy zone warning

How about not removing the buyzones, but simply turning them off?

Syntax: Select all

for buyzone in EntityIter('func_buyzone'):
buyzone.call_input('Disable')
by L'In20Cible
Thu Nov 02, 2017 1:18 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 2058

Re: Two ways to give a weapon + something about CS:GO weapons

I don't know about the IDs, but just thought I would mention that you can directly use Weapon.item_definition_index. Also, I just noticed that you was printing __dict__. However, if you want to print the dynamic attributes of the entity you must use dir(weapon).
by L'In20Cible
Wed Nov 01, 2017 10:27 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 2058

Re: Two ways to give a weapon + something about CS:GO weapons

I won't be able to test that before the weekend, but there is a new method to create entities in CS:GO: https://github.com/alliedmodders/hl2sdk/commit/7a988dce0bd46c820002ea8169e259cdb8f11199 Interesting. I just did some quick tests and adding the following to Entity.create seems to work just fine:...
by L'In20Cible
Wed Nov 01, 2017 8:29 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 2058

Re: Two ways to give a weapon + something about CS:GO weapons

Well, then you don't have to set the model. And you need to set the origin of the weapon instead of calling the touch() method. The following doesn't create the named weapon where you are looking? weapon = Weapon.create(weapon_name) weapon.origin = player.view_coordinates weapon.spawn(&#...

Go to advanced search