Quote:
Originally Posted by Natsheh
Why don't you initiate the array as the following it will be less complex and easier to understand .
PHP Code:
#define MAX_WARRIORS_TYPES 3 #define MAX_ENT_PER_WARRIOR 4
new __int_TransEnts[MAX_PLAYERS+1][MAX_WARRIORS_TYPES][MAX_ENT_PER_WARRIOR]
RemovePlayerTransEntities( id, WarriorType ) { for(new i; i < MAX_ENT_PER_WARRIOR; i++) { if( __int_TransEnts[id][WarriorType][i] > 0 ) { remove_entity(__int_TransEnts[id][WarriorType][i]); __int_TransEnts[id][WarriorType][i] = 0; } } } RemovePlayerTransEntitiesByArray( id, WarriorType, const Array[] ) { for(new i, j, sizeofArray = sizeof Array; i < MAX_ENT_PER_WARRIOR; i++) { for(j = 0; j < sizeofArray; j++) { if( __int_TransEnts[id][WarriorType][i] == Array[j] ) { remove_entity(__int_TransEnts[id][WarriorType][i]); __int_TransEnts[id][WarriorType][i] = 0; break; } } } }
Again it will be much simpler if you explained what are you trying to achieve....
|
First of all, the code you wrote has nothing to do with what I did, second, I already solved it 1000 times simpler than that, I see that in all the posts you don't understand such simple things, and not only mine.