Search found 43 matches

by battleweaver
Tue Dec 05, 2017 1:06 pm
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 13088

Re: Way to reverse the spawn?

@EntityPreHook(EntityCondition.equals_entity_classname(*weapon_index.keys()), 'start_touch') def pre_start_touch(stack): print(f'----------------------------------') entity = make_object(Entity, stack[0]) print (f"{entity.inde...
by battleweaver
Fri Dec 01, 2017 8:15 pm
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 8548

Re: Kick menu->reason: other->text input

Checked new build. Now the message appears in popup window. Thank you!
by battleweaver
Fri Dec 01, 2017 5:16 pm
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 13088

Re: Way to reverse the spawn?

So how to de-spawn a weapon? I don't know what you're trying to do there, but if you really need, you can teleport the weapon outside of the playable area. Or make it non-solid and prevent it from being transmitted to clients. Just don't teleport it inside of touch-related hooks. They don't like it...
by battleweaver
Fri Dec 01, 2017 1:21 pm
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 13088

Way to reverse the spawn?

Hi, guys. Situation: CS:GO I have a data structure {uniqueID : weapon_entity}, which I recieve from, say, outer space. During the match i want to organize some sort of inventory. The prototype instance of my inventory is dict (player_id : [weapon entities he has ]). I add weapon entites to inventory...
by battleweaver
Wed Nov 29, 2017 8:00 am
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 8548

Re: Kick menu->reason: other->text input

Sourcemod KickClient(client, "Game ended");
https://ibb.co/mmQpkG
SourcePython player.kick("End of game")
https://ibb.co/eLmjKb

As you can see, everybody is right somehow :)
by battleweaver
Tue Nov 28, 2017 12:44 pm
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 8548

Re: Kick menu->reason: other->text input

What if I want to show reason to a player after I kicked him? player.kick("reason") shows reason only in console.
I mean, something else than "You were kicked from server" popup window.

Sourcemod version is: KickClient(client, "You were kicked");
by battleweaver
Fri Nov 24, 2017 12:41 pm
Forum: Code examples / Cookbook
Topic: Server, Client, and Say Commands
Replies: 10
Views: 35331

Re: Server, Client, and Say Commands

Ayuto wrote:Hmm, the immediate execution of the server command doesn't seem to work in certain cases. In this case use queue_server_command.

Works as you predicted. Thanks a lot!
by battleweaver
Thu Nov 23, 2017 10:28 am
Forum: Code examples / Cookbook
Topic: Server, Client, and Say Commands
Replies: 10
Views: 35331

Re: Server, Client, and Say Commands

IIRC, it should raise an exception, because "bot_kick all" is not a server command, but a server command plus an argument. Try this instead: execute_server_command('bot_kick', 'all') Test case: "sp_version" = "607", deathmatch gamemode from comm...
by battleweaver
Wed Nov 22, 2017 10:44 am
Forum: Code examples / Cookbook
Topic: Server, Client, and Say Commands
Replies: 10
Views: 35331

Re: Server, Client, and Say Commands

A problem though.
It worked correctly, but server did not recognize the other command: execute_server_command('bot_kick all')
by battleweaver
Tue Nov 21, 2017 4:05 pm
Forum: Code examples / Cookbook
Topic: Server, Client, and Say Commands
Replies: 10
Views: 35331

Re: Server, Client, and Say Commands

Guys, thank you very much! I was so inattentive while reading wiki.
by battleweaver
Tue Nov 21, 2017 10:01 am
Forum: Code examples / Cookbook
Topic: Server, Client, and Say Commands
Replies: 10
Views: 35331

Re: Server, Client, and Say Commands

Say, I have an endless warmup period, then i want to execute "mp_warmup_end" at server side. How can I execute this command directly from plugin?
by battleweaver
Mon Nov 20, 2017 12:10 pm
Forum: Plugin Releases
Topic: GunGame v1.3.2
Replies: 46
Views: 70343

Re: GunGame v1.0.2

Good day everyone!
I tried chicken_hunt.cfg (custom and deathmatch game_type/mode CS:GO) and I did not get it. What is the main feature of this mode?
by battleweaver
Thu Nov 02, 2017 9:05 am
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

Tested new build. Works correctly. Thank you! And i would like to continue the discussion about item IDs. There is parameter m_AttributeManager.m_Item.m_iItemDefinitionIndex , which stores economy ID of an item. In comparison with traditional weapon ID, economy ID is always unique. The issue I encou...
by battleweaver
Wed Nov 01, 2017 9:08 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

The following doesn't create the named weapon where you are looking? weapon = Weapon.create(weapon_name) weapon.origin = player.view_coordinates weapon.spawn() [/quote] Yes. No weapon created. While it returns {'_index': 199} origin Vector(1243.64990234375, -1099.694091796875, -199.3...
by battleweaver
Wed Nov 01, 2017 8:23 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

Move the spawn() call before setting the model. I did as you suggested. weapon = Weapon.create(weapon_name) print (weapon.__dict__) weapon.spawn() weapon.model = Model(string_tables[Model.precache_table][weapon.world_model_index]) Result is the same. My goal is to sp...
by battleweaver
Wed Nov 01, 2017 7:56 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

from commands.typed import TypedSayCommand from memory import make_object from messages import SayText2 from players.entity import Player from weapons.entity import Weapon from mathlib import Vector from engines.precache import Model from stringtables import string_tables @TypedSayCommand('...
by battleweaver
Wed Nov 01, 2017 2:10 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

Some fresh data. from commands.typed import TypedSayCommand from memory import make_object from messages import SayText2 from players.entity import Player from weapons.entity import Weapon from mathlib import Vector @TypedSayCommand('!gimme') def cmd_on_gimme(command_info, weapon...
by battleweaver
Wed Nov 01, 2017 8:49 am
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

About item IDs. Maybe, we should use economy ID(https://tf2b.com/itemlist.php?gid=730) instead of class weapon ID?
by battleweaver
Tue Oct 31, 2017 11:27 am
Forum: Plugin Development Support
Topic: [CSGO] Ammo problem
Replies: 9
Views: 9268

Re: [CSGO] Ammo problem

About skins: Long story short: it is possible. The only thing you need is to set a valid number in skin property. (hint: m_nFallbackPaintKit and other props) Now, why Valve bans this. It is not allowed to play with skins you do not own. But such trick can be used, for example, to force player use de...
by battleweaver
Mon Oct 30, 2017 12:25 pm
Forum: Code examples / Cookbook
Topic: Two ways to give a weapon + something about CS:GO weapons
Replies: 21
Views: 59456

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

Guys, I did not find any info about weapon.spawn() you mentioned in second approach. Wiki does not know about it.
My goal is to spawn a weapon at specific coordinatess (CS:GO if it is important). Should i use spawn + teleport or somehow spawn() alone handles this?

Go to advanced search