07.01.2013, 08:13
Buenas a Todos, Kisiera saber como hacer para contar objetos globales creados, osea cree 10 objetos globales y los defini con variables y con su array correspondiente, y con un comando lo voy destroyando.
y lo ke kiero hacer es chekear si hay de 3 objetos para abajo creados si no lo hay retonara un return con un SendClientMessage.
he intentado esto pero no funciona:
Si me pueden ayudar, selos agradezco .
Desde ya muchas Gracias
y lo ke kiero hacer es chekear si hay de 3 objetos para abajo creados si no lo hay retonara un return con un SendClientMessage.
he intentado esto pero no funciona:
pawn Код:
stock contarobjeto()
{
new count=0;
for(new x=0; x<10; x++) {
new Float:pos[3];
GetDynamicObjectPos(objeto[x], pos[0], pos[1], pos[2]);
if(objeto[x] >= 0) count++;
if(count <= 3) return 1;
}
return 0;
}
if(contarobjeto()) return SendClientMessage(playerid, -1, " Los Objetos Estan Creados Aun!");
Desde ya muchas Gracias