View Full Version : Multiple problems [y_iter + ColAndreas]

30/06/2017, 11:24 AM
Hello, I've 2 problems:

1) Isn't impossible to use CA_ContactTest from Colandreas with this object (http://dev.prineside.com/en/gtasa_samp_model_id/model/19089-Rope3/)? It's returning 0 everytime (when the object in under/top/on the ground).

2) I've a problem with y_iterate. I can't add an element for a specific value. Only for the factionid 1, it's working.
Iter_Add(f_OwnedWeapons<factionid>, weaponid);
printf("Iter_Add - Weaponid : %i added", weaponid);
if(!Iter_Contains(f_OwnedWeapons<factionid>, weaponid))
printf("Iter_Contains - Weaponid : %i doesn't added!!", weaponid);
printf("All is good for weapon %i", weaponid);

[12:13:21] Iter_Add - Weaponid : 43 added
[12:13:21] Iter_Contains - Weaponid : 43 doesn't added!!
[12:13:21] INFO [core/faction/save] : [42] Weapon Camera (43) with 5 ammos for faction United States Army (5)
[12:13:24] Iter_Add - Weaponid : 45 added
[12:13:24] All is good for weapon 45
[12:13:24] INFO [core/faction/save] : [43] Weapon Infrared (45) with 5 ammos for faction United States Army (5)

30/06/2017, 12:31 PM
1) ColAndreas works with collision boxes. Hence the "col" in the name. This particular object has no collision box (it even says so on the page you linked to) which means ColAndreas cannot detect it.

2) Is it even possible to use 2D-arrays with foreach/y_iterate?

30/06/2017, 03:40 PM
1) I see. Thanks for your answer
2) Yes is it ! This is first I time I see that problem.

Edit: I've no other way to solve the problem? :(
Edit2: Of course, it's normal if multiple faction have the same weapon. That's why eh