"Deleted code is debugged code." - Jeff Sickel "Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes." - Richard Hamming
players = getPlayers(); // Fuck your utility functions :) for( i = 0; i < players.size; i++ ) { // Players is an array, why are you setting a variable on an array? // Changed it to the i-th element of the array players[i].maxhealth = 100; // Change this line players[i].health = players[i].maxhealth; }
Last Edit: May 26, 2016, 05:03:14 pm by JR-Imagine
players = getEntArray( "player", "classname" ); // Fuck your utility functions :) for( i = 0; i < players.size; i++ ) { // Players is an array, why are you setting a variable on an array? // Changed it to the i-th element of the array players[i].maxhealth = 100; // Change this line players[i].health = players[i].maxhealth; }
theres not really any diffrence... u just wanted to b cool and confussing to people who are new to scripting so u used a diffrent method of gethering player data. ohhh... shit i forgot the s thx 4 remembering, i wrote that right b4 i left to go to a mass 4 my school cuz... they wont allow me to graduate if i dont
theres not really any diffrence... u just wanted to b cool and confussing to people who are new to scripting so u used a diffrent method of gethering player data. ohhh... shit i forgot the s thx 4 remembering, i wrote that right b4 i left to go to a mass 4 my school cuz... they wont allow me to graduate if i dont
I wanted to be cool? If by "be cool" you mean not call a utility function which literally just returns the result of getPlayers() and waste execution time, then yes, I wanted to be cool. (Pro tip: Before using a utility function, check what it does to make sure it's not completely useless. )
I do a lot of CoD4 stuff so I forgot getPlayers() was even a thing, figured get_players() would just call getEntArray(), guess not. getEntArray() will obviously be less efficient, therefore edited my previous post.
Anyways, main point was that you were setting the variables on the array instead of the element.
Last Edit: May 26, 2016, 05:05:50 pm by JR-Imagine