[CSGO] Problem with clan tag

Please post any questions about developing your plugin here. Please use the search function before posting!
existenz
Senior Member
Posts: 111
Joined: Thu Feb 09, 2017 3:33 pm
Location: France
Contact:

[CSGO] Problem with clan tag

Postby existenz » Sat Mar 11, 2017 8:38 pm

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.
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [CSGO] Problem with clan tag

Postby Ayuto » Sun Mar 12, 2017 10:33 am

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.
existenz
Senior Member
Posts: 111
Joined: Thu Feb 09, 2017 3:33 pm
Location: France
Contact:

Re: [CSGO] Problem with clan tag

Postby existenz » Sun Mar 12, 2017 10:51 am

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.
User avatar
Kill
Member
Posts: 88
Joined: Wed Aug 31, 2016 10:05 pm

Re: [CSGO] Problem with clan tag

Postby Kill » Sun Mar 12, 2017 1:51 pm

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.
existenz
Senior Member
Posts: 111
Joined: Thu Feb 09, 2017 3:33 pm
Location: France
Contact:

Re: [CSGO] Problem with clan tag

Postby existenz » Sun Mar 12, 2017 2:14 pm

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.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: [CSGO] Problem with clan tag

Postby satoon101 » Sun Mar 12, 2017 2:31 pm

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.
Image
existenz
Senior Member
Posts: 111
Joined: Thu Feb 09, 2017 3:33 pm
Location: France
Contact:

Re: [CSGO] Problem with clan tag

Postby existenz » Sun Mar 12, 2017 2:37 pm

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
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: [CSGO] Problem with clan tag

Postby satoon101 » Sun Mar 12, 2017 3:03 pm

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.
Image
existenz
Senior Member
Posts: 111
Joined: Thu Feb 09, 2017 3:33 pm
Location: France
Contact:

Re: [CSGO] Problem with clan tag

Postby existenz » Sun Mar 12, 2017 5:16 pm

Ok thanks. I will try.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: Bing [Bot] and 18 guests