AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cs_set_user_team and TeamInfo (https://forums.alliedmods.net/showthread.php?t=156505)

kotinha 05-07-2011 16:08

cs_set_user_team and TeamInfo
 
What's the difference between using cs_set_user_team() and this (except that cs_set_user_team only works witch counter-strike):
PHP Code:

public changeTeamInfo (playerteam[])
{
    
message_begin (MSG_ONEget_user_msgid ("TeamInfo"), _player)    // Tells to to modify teamInfo (Which is responsable for which time player is)
    
write_byte (player)                // Write byte needed
    
write_string (team)                // Changes player's team
    
message_end()                    // Also Needed



hleV 05-07-2011 16:13

Re: cs_set_user_team and TeamInfo
 
This doesn't change your team, only team info. You'd have to use set_pdata_int() with team offset to actually change the team.

cs_get_user_team() is more efficient.


All times are GMT -4. The time now is 04:19.

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