Thread: [Solved] loop entitys
View Single Post
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 11-16-2022 , 14:23   Re: loop entitys
Reply With Quote #7

Quote:
Originally Posted by Natsheh View Post
What simpler with this ?

PHP Code:
removeTransEntsClient, {0,1,2,3,100} ); 
You're hardcoding some values in the script which its not needed at all and those numbers have absolute no meaning atleast try to make them readable so people understand what is happening in your code.
They are the cells that it will read, 100 is to tell it that I have reached this far, so, end of the loop, too simple

PHP Code:

                             removeTransEnts
Client, {0,1,2,100} );

                             
setEntRemove__int_TransEnts[Client][0] );
                             
setEntRemove__int_TransEnts[Client][1] ); 
                             
setEntRemove__int_TransEnts[Client][2] ); 
other example:

PHP Code:
                             removeTransEntsClient, {6,5,4,3,100} );

                             
setEntRemove__int_TransEnts[Client][6] ); 
                             
setEntRemove__int_TransEnts[Client][5] );
                             
setEntRemove__int_TransEnts[Client][4] ); 
                             
setEntRemove__int_TransEnts[Client][3] ); 
Well if you don't understand it's obvious that it wouldn't make sense

If you still do not understand you should read better, I explain it in detail above
https://forums.alliedmods.net/showpo...00&postcount=3

Last edited by MrPickles; 11-16-2022 at 14:28.
MrPickles is offline