Search found 15 matches
- Sat Sep 10, 2022 6:41 pm
- Forum: Plugin Development Support
- Topic: OnPlayerRunCommand not fired in TF2
- Replies: 7
- Views: 8225
Re: OnPlayerRunCommand not fired in TF2
Now it works. Thank you!
- Sat Sep 10, 2022 4:29 pm
- Forum: Plugin Development Support
- Topic: OnPlayerRunCommand not fired in TF2
- Replies: 7
- Views: 8225
Re: OnPlayerRunCommand not fired in TF2
Data seems to be up-to-date. Could you please set sp_logging_level to 4 in your core_settings.ini, restart your server, load your plugin and join your server. In your console log you should see the following entry if you join the server: [Source.Python] Initializing core hook (run_command)... [Sour...
- Sat Sep 10, 2022 11:56 am
- Forum: Plugin Development Support
- Topic: OnPlayerRunCommand not fired in TF2
- Replies: 7
- Views: 8225
Re: OnPlayerRunCommand not fired in TF2
I tried completely reinstalling the SP and running just the script above. The result is the same.
- Fri Sep 09, 2022 5:25 pm
- Forum: Plugin Development Support
- Topic: OnPlayerRunCommand not fired in TF2
- Replies: 7
- Views: 8225
OnPlayerRunCommand not fired in TF2
Hello! I try use OnPlayerRunCommand for TF2, but it not fired. from listeners import OnPlayerRunCommand def load(): print("Script run") @OnPlayerRunCommand def on_player_run_command(player, user_cmd): print("Hook") In the game I shot and jumped. No...
- Fri Sep 09, 2022 1:23 pm
- Forum: Plugin Development Support
- Topic: TF2 Conditions
- Replies: 5
- Views: 6206
Re: TF2 Conditions
Cool! It works.
I just corrected the deletion method a little bit, it missed True.
Thank you!
I just corrected the deletion method a little bit, it missed True.
Syntax: Select all
def remove_condition(player_index, condition):
RemoveCondition(pointer_from_index(player_index) + OFFSET_DT_TFPlayerShared, condition, True)
Thank you!
- Sun Sep 04, 2022 1:10 pm
- Forum: Plugin Development Support
- Topic: TF2 Conditions
- Replies: 5
- Views: 6206
Re: TF2 Conditions
I tried create funcs with memory package. But this is more complicated than the other functions. https://github.com/alliedmodders/sourcemod/blob/1fbe5e1daaee9ba44164078fe7f59d862786e612/extensions/tf2/natives.cpp#L220 from memory import find_binary, Convention, DataType from memory.helpers import Ty...
- Wed Aug 31, 2022 7:26 pm
- Forum: Plugin Development Support
- Topic: TF2 Conditions
- Replies: 5
- Views: 6206
TF2 Conditions
Hi!
There are TF2_AddCondition and TF2_RemoveCondition functions in sourcemod.
How to make similar on SP? (Or call them via sourcemod)
There are TF2_AddCondition and TF2_RemoveCondition functions in sourcemod.
How to make similar on SP? (Or call them via sourcemod)
- Wed Aug 31, 2022 3:12 pm
- Forum: Plugin Development Support
- Topic: Error with bots and PlayerDictionary
- Replies: 8
- Views: 3418
Re: Error with bots and PlayerDictionary
cssbestrpg wrote:If you don't have the build that fixes the issue, here is the tf2 build for it and follow the update guide to update it properly.
Yes, the error is gone. Thank you!
- Wed Aug 31, 2022 7:49 am
- Forum: Plugin Development Support
- Topic: Error with bots and PlayerDictionary
- Replies: 8
- Views: 3418
Re: Error with bots and PlayerDictionary
Thank you!
- Tue Aug 30, 2022 12:47 pm
- Forum: Plugin Development Support
- Topic: Error with bots and PlayerDictionary
- Replies: 8
- Views: 3418
Re: Error with bots and PlayerDictionary
from events import Event from players.entity import Player from players.helpers import index_from_userid from players.dictionary import PlayerDictionary from filters.players import PlayerIter players = PlayerDictionary() def load(): ''' Called when plugin is loaded '...
- Tue Aug 30, 2022 11:55 am
- Forum: Plugin Development Support
- Topic: Error with bots and PlayerDictionary
- Replies: 8
- Views: 3418
Re: Error with bots and PlayerDictionary
Hi. I want to use PlayerDictionary to store player data (for the game mod).
- Tue Aug 30, 2022 8:33 am
- Forum: Plugin Development Support
- Topic: Error with bots and PlayerDictionary
- Replies: 8
- Views: 3418
Error with bots and PlayerDictionary
Hello! I have code: from players.dictionary import PlayerDictionary from players.entity import Player class CustomPlayer(Player): points = 0 def has_c4(self): pass def create_player(index: int) -> CustomPlayer: player = CustomPlayer(index) return player players = PlayerDictionary(create_player) Acti...
- Sun Aug 28, 2022 10:31 am
- Forum: General Discussion
- Topic: Is client in game
- Replies: 4
- Views: 2487
Re: Is client in game
For example select a random player and spawn him. If the player is not yet in the game - there will be an error. In that case try something like this: from events import Event from players.entity import Player @Event('player_say') def player_say(args): userid = args.get_int&...
- Sun Aug 28, 2022 9:02 am
- Forum: General Discussion
- Topic: Is client in game
- Replies: 4
- Views: 2487
Re: Is client in game
For example select a random player and spawn him. If the player is not yet in the game - there will be an error.
- Fri Aug 26, 2022 11:36 pm
- Forum: General Discussion
- Topic: Is client in game
- Replies: 4
- Views: 2487
Is client in game
Hello!
I am a new user of source.python.
SourceMod has functions: IsClientConnected and IsClientInGame.
In Source.Python I found only the is_connected method in the Player class. Does it include an in-game check?
I am a new user of source.python.
SourceMod has functions: IsClientConnected and IsClientInGame.
In Source.Python I found only the is_connected method in the Player class. Does it include an in-game check?