Finding values
Happy holidays to all amxx patrons. I'm trying to write a plugin for my server and I'm have trouble with two things, since I'm still new to scripting and constantly learning. Anyways, 1. How do I find a players number of consecutive kills? 2. How do I find/catch/determine the start of a new round?
Any help anyone can give would be appreiciated. Thanks and Happy holidays once again. |
I'm doing this all from my head as we're about to have guests over so I can't look up and give you exact answers.
Quote:
Quote:
|
Thanks for the suggestion brad. I think I found out how to capture a players consecutive kill value. I tried a global value like u said. The round start is a bit tricky. I found your bad camper sma which had the event_round_start in it, but it had a different set, i copied and tried to get to it run the commands I want to at round start but it keeps saying argument type mismatch. any suggestions?
|
Anybody know how to fix an "array must be indexed error" when compiling?
|
Quote:
|
1: in ur plugin_init u need to register a death event
Code:
2. in ur plugin_init function u need to add a logevent of start round Code:
hope i helped:) Quote:
new array[num] the num must be bigger in 1 than what u want example: if u need 32 players ur array will be players[33] cuz it starts from 0 and ends in 32 u CANT do players[33] = 5 (for example) .. that will give u index error. (if u can also post ur code here that will be helpful) |
thanks for the help so far guys...and yeah, the source code would be helpful. this is what i have so far
[small] removed source code due to rewriting it, will repost source code once finished /*small ^^^^Sorry bout that guys^^^^^ /small*/ |
well ur array is [32][2] and ur comparing only 1 ( g_streak[killer] )
im guessing the [2] was for the team or something. So u either do g_streak[killer][1] or g_streak[killer][0] |
thanks for the tip freecode, i'll give it a try. from what you saw, did i do most everything correct? in theory, would my code work or do you see any discrepencies there might be? or also if any experienced amxx scripter. im open to learning.
*EDIT To freecode, ur tip worked, it compiled with not a single error. but, it compiled on all values, 0 - 2. perhaps you could help to explain this type of value to me. this was a suggestion given to me by another scripter that i frequently chat with, but i do not fully understand its usage, purpose, etc. except from what i assume is its what tracks consecutive kills. please help. thanks again to all amxx scripters willing to help a newb on this. *EDIT Figured out how to use that specific array. Thanks to all |
| All times are GMT -4. The time now is 15:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.