Raised This Month: $ Target: $400
 0% 

AddToFullPack set_es() for player team?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-15-2009 , 11:25   AddToFullPack set_es() for player team?
Reply With Quote #1

how can i change player team with set_es() so i can addtofullpack?
Owyn is offline
Send a message via ICQ to Owyn
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-15-2009 , 11:31   Re: AddToFullPack set_es() for player team?
Reply With Quote #2

It's very interesting for me to, because i'm noob in fakemeta
Waiting for an answer of more professional scripter
TheRadiance is offline
Send a message via ICQ to TheRadiance
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-15-2009 , 12:12   Re: AddToFullPack set_es() for player team?
Reply With Quote #3

Quote:
HOST - Receiver
ENT - Sender
so you can do like
PHP Code:
if( get_user_team(ent) == ) {
    
// ...

__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2009 , 12:18   Re: AddToFullPack set_es() for player team?
Reply With Quote #4

Not sure it would work on cs, but you can try to set ES_Team
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-15-2009 , 12:32   Re: AddToFullPack set_es() for player team?
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Not sure it would work on cs, but you can try to set ES_Team
set_es(es_handle, ES_Team, "1");


looks like working but server still sends correct information about player team =\

Last edited by Owyn; 03-15-2009 at 15:05.
Owyn is offline
Send a message via ICQ to Owyn
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 03-16-2009 , 23:18   Re: AddToFullPack set_es() for player team?
Reply With Quote #6

Quote:
Originally Posted by .Owyn.
looks like working but server still sends correct information about player team =\
If you want this for CS, you should instead send a TeamInfo message like this:
Code:
message_begin( MSG_BROADCAST, get_user_msgid("TeamInfo") ) write_byte( 5 ) // player index write_string( "CT" ) // team: "UNASSIGNED", "TERRORIST", "CT", or "SPECTATOR" message_end( )

Note that the actual player's team will not be changed. For that you have to set the corresponding offset ( set_pdata_int( id, 114, team ) ).

Also, you can use the destination MSG_ALL if you want the team message to be reliable (i.e. always arrive to clients). Be careful about sending too many reliable messages at once though: you can easily overflow clients or even crash the server!
__________________
MeRcyLeZZ is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:50.


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