01.08.2012, 01:45
Is this possible? I need something like this "new array = array();" like you'd do in PHP.
Thanks.
Thanks.
stock func()
{
return 'A';
}
main ()
{
new array[4];
array[0] = func();
printf("%c", array);
}
I want to be able to add ints to an array. I have no idea how I can explain it.. Something like, when I type a command which chooses a random number, I want that random number to be added to an array.
|
main ()
{
new array[4];
for(new i = 0; i < sizeof(array); i++)
{
array[i] = random(10);
//printf("%d", array[i]);
}
}
for(new i = 0; i < sizeof(UsedObjsID); i++) {
if(ChosenObj == UsedObjsID[i]) {
ChosenObj = randomex(0, TotalObjs);
format(string, sizeof string, "INFO: {FFFFFF}ObjectID: %d has already been used! Looking for another object", ChosenObj-1);
SendClientMessageToAll(COLOR_ASKQ, string);
format(string, sizeof string, "TEST: {FFFFFF}ObjectID: %d", UsedObjsID[i]);
SendClientMessageToAll(COLOR_ASKQ, string);
return 1;
}
}