Master Reset
Hey there,
I added a small "reset" and "master reset" function in my plugin that resets user deaths and frags, Reset system is working,Changing the deaths and frags to zero; PHP Code:
PHP Code:
I know these errors are because of that O zero index,But I don't know how to do trigger it for all players. Note: Master Reset will be used by admins,I will add admins checks later on. |
Re: Master Reset
Use get_players with flag "h" and loop though the list.
|
Re: Master Reset
loop through the players. not using id as 0.
Because you're learning...i throw you a bone. get_players(players, num, "h") |
Re: Master Reset
I searched wiki about get_players,
Tell me why to use num? and "h" will skip HLTV,What is HLTV why to skip it? By the way,I haven't done looping yet since beginning(by myself),Can you explain me? I have read tutorials about it,But need little more about looping. I know,I am asking allot about these,I am sure you will help,Thanks! |
Re: Master Reset
Haven't we already told you to read the documentation?
http://www.amxmodx.org/doc/index.htm...g%2Fprimer.htm Learn before you ask again. We get grouchy when you ask stupid, remedial, basic questions. |
Re: Master Reset
Here is an example of looping (from my experience xD):
PHP Code:
|
Re: Master Reset
Quote:
1. h needs to be in quotes. its passed as a string 2. i is an index of the players array (you're iterating through it), not playerID. players is an array of valid playerIDs. EDIT: did you guys read the wiki at all!? It tells you THIS EXACT CODE on the page. GO! |
Re: Master Reset
Quote:
Quote:
PHP Code:
|
Re: Master Reset
Quote:
and to make it even faster.... Code:
new player = players[i] |
Re: Master Reset
Quote:
|
| All times are GMT -4. The time now is 06:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.