16.11.2018, 21:51
Quando coloco um portao e digito /guardarportao o comando fica dando pra usar infinitamente e bugando portгo, pegando varios portхes
Код:
CMD:guardarportao(playerid, params[])
{
new ta,dono;
for(new i; i<300; i++)
{
if(IsPlayerInRangeOfPoint(playerid,5, SistemaPortao[i][PortaoX],SistemaPortao[i][PortaoY],SistemaPortao[i][PortaoZ]))
{
ta = 1;
if(!strcmp(NomePlayer(playerid), SistemaPortao[i][PortaoDono]))
{
dono = 1;
for(new d = 0; d<75; d++)
{
if(InventarioInfo[playerid][d][iSlot] == 19382)
{
InventarioInfo[playerid][d][iSlot] = 980;
InventarioInfo[playerid][d][iUnidades] = 1;
new Filea[40];
format(Filea,40,"Portoes/Portao_%d.ini",i);
if(DOF2_FileExists(Filea)){
DOF2_RemoveFile(Filea);
}
DestroyDynamicObject(SistemaPortao[i][PortaoObj]);
DestroyDynamic3DTextLabel(SistemaPortao[i][Portao3d]);
SendClientMessage(playerid, -1, "{00ffff}• {ffffff}Vocк guardou este portгo no seu Inventario !");
return 1;
}
}
SendClientMessage(playerid, 0xFF6347AA, "* Seu inventбrio estб cheio!");
return 1;
}
}
}
if(ta == 0) return SendClientMessage(playerid,-1,"Vocк nгo esta Proximo a nenhum portao !");
if(dono == 0) return SendClientMessage(playerid,-1,"Vocк nao й dono deste portao !");
return 1;
}


