Raised This Month: $ Target: $400
 0% 

External buffer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
portocala
Member
Join Date: Jun 2010
Old 02-04-2011 , 13:44   External buffer
Reply With Quote #1

1. Is there any way to use an external buffer between plugins ? Something bigger, like array[512], or something[32][512]. I want to access these multi-dimensional arrays from any plugin.

2. How can I get user team from engine (cstrike) ? I'm not talking about cs_get_user_team or get_user_team; I want to get the team that the engine is based on when it decides the nickname color in chat.
This plugin (https://forums.alliedmods.net/showthread.php?p=423848) is faking the game to believe that the admin with flag "d" is spectator, so he can watch all players Therefore, I want to get the authentic team name (shown in scoreboard). cs_get_user_team is always returning "spectator" (even if the player is shown to be CT in scoreboard) and get_user_team is returning a wrong team too in some situations.

I must get the team from chat color or scoreboard... I hope you understand what I mean.

Thank you!
portocala is offline
crazy.cipry
Member
Join Date: Dec 2008
Location: Romania
Old 02-04-2011 , 14:09   Re: External buffer
Reply With Quote #2

1. I think it's not possible. You can do this using files or mysql (which is faster).
crazy.cipry is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 02-04-2011 , 21:07   Re: External buffer
Reply With Quote #3

Quote:
Originally Posted by crazy.cipry View Post
1. I think it's not possible. You can do this using files or mysql (which is faster).
Also, you can make a plugin API. If you were using single cells, XVars would be best..

Your second problem.. well, the plugin stores the player's team in a variable and restores it at new round

You could hook the TeamInfo event and make a variable that stores a team, then set the team every time TeamInfo is sent. That would be what is displayed in the scoreboard.
Elusive138 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-04-2011 , 21:28   Re: External buffer
Reply With Quote #4

Quote:
Originally Posted by Elusive138 View Post
Also, you can make a plugin API. If you were using single cells, XVars would be best..
Plugin API is the best method for this situation. XVars do not work for arrays.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 02-04-2011 , 22:22   Re: External buffer
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Plugin API is the best method for this situation. XVars do not work for arrays.
In other words, Arrays are not single cells Sorry if I caused any confusion.
Elusive138 is offline
portocala
Member
Join Date: Jun 2010
Old 02-06-2011 , 04:16   Re: External buffer
Reply With Quote #6

Great answers, thx!
portocala is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-06-2011 , 04:29   Re: External buffer
Reply With Quote #7

You may have in mind that real teams are those you get using cs_get_user_team, and that TeamInfo is only used for visual purpose.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 02-06-2011 , 05:52   Re: External buffer
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
You may have in mind that real teams are those you get using cs_get_user_team, and that TeamInfo is only used for visual purpose.
But isn't TeamInfo used to update the team on the scoreboard? Or was that ScoreInfo? Either way, that's probably the best way to get the team that is displayed on the scoreboard.
Elusive138 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-06-2011 , 15:47   Re: External buffer
Reply With Quote #9

Quote:
Originally Posted by Elusive138 View Post
But isn't TeamInfo used to update the team on the scoreboard? Or was that ScoreInfo? Either way, that's probably the best way to get the team that is displayed on the scoreboard.
TeamInfo is used for the chat colors.
ScoreInfo is used for the scoreboard info (kills, deaths, team).
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-06-2011 , 16:47   Re: External buffer
Reply With Quote #10

TeamInfo affects ScoreBoard color, i'm not sure ScoreInfo has any effect on color.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 23:25.


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