25.05.2016, 17:30
PHP код:
if(PickUp[0] == 0) PickUp[0] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
else if(PickUp[1] == 0) PickUp[1] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
else if(PickUp[2] == 0) PickUp[2] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
else if(PickUp[3] == 0) PickUp[3] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
else if(PickUp[4] == 0) PickUp[4] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
else if(PickUp[5] == 0) PickUp[5] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
//Etc... Hasta 100 veces.
Intente con "for(new %0 = %2; %0 < %1; %0++)" repitiendolo 100 veces, asн:
PHP код:
#define Loop(%0,%1,%2) for(new %0 = %2; %0 < %1; %0++)
Loop(i,100,0) if(PickUp[i] == 0) PickUp[i] = CreatePickup(1279, 1, Float:x, Float:y, Float:z, 0);
їAlguna idea? Doy +rep