AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] cs_set_user_team / jointeam - joinclass (https://forums.alliedmods.net/showthread.php?t=301409)

Depresie 09-19-2017 17:44

[HELP] cs_set_user_team / jointeam - joinclass
 
I know that using cs_set_user_team on a player who haven't yet selected a team and a class will not work properly because some required fields by the game are not yet set

I was wondering what those fields are, and if it is possible to set them manually from a plugin

KiLLeR. 09-19-2017 18:03

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
If the user haven't selected a team, then the result must be CS_TEAM_UNASSIGNED which is 0.

Depresie 09-20-2017 04:46

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
You didn't understand my point... read again :)

siriusmd99 09-20-2017 06:20

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
Why setting fields manually if you can just force engine to join team and joinclass.
Or maybe you want just to know which are those fields so you can use them in other purposes?

HamletEagle 09-20-2017 09:13

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
Quote:

Originally Posted by siriusmd99 (Post 2549841)
Why setting fields manually if you can just force engine to join team and joinclass.

This. Anyway, see by yourself what game does:
Choose team: https://github.com/s1lentq/ReGameDLL...ient.cpp#L1491
Choose class:
https://github.com/s1lentq/ReGameDLL...ient.cpp#L1330

Depresie 09-20-2017 12:30

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
do you mind explaining me what this does "->"
PHP Code:

player->m_flRadioTime gpGlobals->time 1.5f


klippy 09-20-2017 13:17

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
Member access operator. Accesses a class/struct member.

Depresie 09-20-2017 18:15

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
Still don't get what's "missing" any ideas what is missing that renders the player frozen and being teleported around by the "unassigned camera"?

HamletEagle 09-21-2017 11:41

Re: [HELP] cs_set_user_team / jointeam - joinclass
 
https://github.com/s1lentq/ReGameDLL...ayer.cpp#L3444

Set m_iJoiningState offset.

Code:

player->m_flRadioTime = gpGlobals->time + 1.5f;
In simple words it sets m_flRadioTime offset on the "player" entity. It's like you would do set_pdata_float(player, m_flRadioTime, ...).


All times are GMT -4. The time now is 17:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.