Quote:
Originally Posted by pokemonmaster
Here is an example of looping (from my experience xD):
PHP Code:
public cmd_mreset(id) {
new players[32], count get_players(players, count, h)
for(new i; i<count; i++) { cs_set_user_deaths(i, 0) set_user_frags(i, 0) // This as I know needs the fun include } }
|
two things wrong.
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!
__________________