Page 1 of 1

[CSGO] Problem with clan tag

Posted: Sat Mar 11, 2017 8:38 pm
by existenz
Hey Everyone !

I need your help and threethings.

The first :

I want to change the player's clan tag, but it does not work. No mistakes, but nothing happens.
Maybe i used the wrong way, but i have just found that.

Syntax: Select all

@Event('player_spawn')
def _on_player_spawn(event_data):
player = Player.from_userid(event_data['userid'])
if player.steamid == 'BOT':
return

player.clan_tag = "Test"


The second :

I want to know if it's possible like with Sourcemod to edit client cookie (SetClientCookie / GetClientCookie) ?
I found nothing on it for Sourcepython.

The third :

I want to give an helmet and it does not work.

Syntax: Select all

player.has_helmet = True


Sincerly Existenz.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 10:33 am
by Ayuto
The clan tag issue will be fixed with the next version:
https://github.com/Source-Python-Dev-Te ... e87288cb60

Regarding the cookie question: i think you are looking for our settings module:
http://wiki.sourcepython.com/developing ... e-settings

What does "it does not work" mean? I think you should get an exception, because "has_helmet" should only exist in CS:S:
https://github.com/Source-Python-Dev-Te ... has_helmet

Edit: In future, please create one thread for each question.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 10:51 am
by existenz
Thanks for your answer.
I will look at the settings package.

So we can't give an helmet in Csgo ?

Sorry I thought it was better one post to avoid spam.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 1:51 pm
by Kill
existenz wrote:Thanks for your answer.
I will look at the settings package.

So we can't give an helmet in Csgo ?

Sorry I thought it was better one post to avoid spam.


I believe

Syntax: Select all

has_helmet
only tells if a player has one or not, not give it.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 2:14 pm
by existenz
I don't know, but i know if I do that :

Syntax: Select all

player.has_defuser = True


I can give a defuser so i think that's could work for has_helmet. But no property helmet in csgo sp.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 2:31 pm
by satoon101
Ayuto is right in that we do not currently have has_helmet available on CS:GO. I will add that shortly. It will not raise an error, though, since we allow plugin developers to set their own custom attributes with the Entity based classes.

For a simple example of PlayerSettings, look at this plugin:
https://github.com/satoon101/MostDamage ... _damage.py

For a more complex example:
https://github.com/GunGame-Dev-Team/Gun ... ettings.py
https://github.com/GunGame-Dev-Team/Gun ... ettings.py
https://github.com/GunGame-Dev-Team/Gun ... ettings.py

There are still things that need to be worked on for the player settings. Booleans are currently not supported, but are being worked on in a feature branch. Integer/float settings are currently not able to be changed via the settings menu. Once those are completed, I will update the wiki to include a comprehensive example.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 2:37 pm
by existenz
I have made a Vip plugin in Sourcemod which used client cookie to store player enable features without Db. This works event if player leave server and rejoin after some day. I will store only boolean or interger

That is possible with Sourcpeython ?

I don't really understand your example :s

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 3:03 pm
by satoon101
To test my first example, first open your server's ../cfg/source-python/core_settings.ini. Under the USER_SETTINGS section, set the commands for players to use to open the settings menu. Install the most_damage plugin and load it. On the server, use one of the commands to open the menu and navigate through it to change your specific setting.

There is more to the PlayerSettings than even that, as you can actually use something like the following in your client cfg files to set your settings for a specific plugin that will be recognized across all servers that run that specific plugin:

Code: Select all

setinfo md_location 2

So, if I set that in my client's ../cfg/autoexec.cfg file, when I log onto any server running the most_damage plugin, it will always use "2" as the location.

Also, when using the settings menu instead, changes are only saved on level change. So, if you change a setting and the server crashes or is restarted prior to the map ending, your change would not have been saved.

Re: [CSGO] Problem with clan tag

Posted: Sun Mar 12, 2017 5:16 pm
by existenz
Ok thanks. I will try.