Log event , global variables troubles
Hello i need some help to make some ideas about scripting regarding log events and global variables and the way they are mainained
sorry if i don't express myself write but I am at the begining ( only 3 posts :D ) first of all here is the entire source from the plugin i want to modify :D http://files.filefront.com/xPaw+Antirusher...;/fileinfo.html i want to do the followings 1. In the plugin it is set that a certain type of punishment is applied to the rushers depending on the cvar set by amx_antirusher_action i want to make this punishment dinamic and to set the punishment by itself dependending on how many times the player has rushed i thought of making a global array g_playerp[32] and here to set the number of rushes made i know that if i declare [b] new g_playerp[32]=0 all of the fields will be set to 0 ( please corect me if I am wrong) so..when you get to the punishment part ( M_Antirusher Punishments it is highlighted by comments :D ) i thought that this could be enough to change from the whole punishplayer function PHP Code:
i want to determine the punishments by the authID, i also think that after banPlayer(id) i shoudl initialize to 0 the g_playerp[i] according to that authID because it leaves the server and it changes :D another thing that i want to do is "play" with the events what i mean by that is to count the number of wins that CTs and T have and to set a task that checks if the difference between the CT and the T score is more then 10 ( 2 global variables g_ctwin-g_twin>=10 ) and only then change the cvar amx_antirusher to 1 ( at de_ maps ) so when that happens some cvars get changed - amx_antirusher = 1i found something for the event logging but don't know if it's enough to count in the plugin_init() Code:
register_logevent("t_round_end",2, "3=Terrorists_Win");PHP Code:
another thing is to "delay" the punishments. for example a player crosses the rush limit and it gets slaped or warned beeing the first time i want the next punishment wouldn't be apllied as soon as he gets back rushing ( i mean a delay of half of minute or something like that) i think that a solution might be to change the g_playerp array type and make it a double one like g_playerp[32][2] where g_playerp[i][1] shows the value of the rushes and g_playerp[i][2] will show the last time he was punished ( putting the value in by get_round_time ) for now these are my questions and i will try to find some answers in the morning by myself if noone helps me.... ( i hope it won't be the case :D ) thank you in advance :D |
| All times are GMT -4. The time now is 16:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.