SA-MP Forums Archive
[Problema] Servidor se cierra al crear clan. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Problema] Servidor se cierra al crear clan. (/showthread.php?tid=635551)



[Problema] Servidor se cierra al crear clan. - Daniielk - 09.06.2017

Me explican porque razуn al colocar /clan crear raramente de la nada se me apaga la consola? llevo horas buscando soluciуn constante, no me funciona nada :/


Re: [Problema] Servidor se cierra al crear clan. - Toroi - 09.06.2017

Tienes un error en la linea 4534 de tu gamemode, pero el compilador no te avisa. Revisala y prueba de nuevo el comando.


Respuesta: Re: [Problema] Servidor se cierra al crear clan. - Daniielk - 09.06.2017

Quote:
Originally Posted by Toroi
Посмотреть сообщение
Tienes un error en la linea 4534 de tu gamemode, pero el compilador no te avisa. Revisala y prueba de nuevo el comando.
No me da ningъn tipo de error el compilador, quieres ver el cmd?


Re: Respuesta: Re: [Problema] Servidor se cierra al crear clan. - Toroi - 09.06.2017

Quote:
Originally Posted by Daniielk
Посмотреть сообщение
No me da ningъn tipo de error el compilador, quieres ver el cmd?
Seria lo mas lуgico de hacer, comparte el cуdigo.


Respuesta: [Problema] Servidor se cierra al crear clan. - Daniielk - 09.06.2017

CMD:clan(playerid,params[])
{
new tmp[64];
new tmp2[64];
if(sscanf(params,"s[64]s[64]",tmp,tmp2))
return SendClientMessage(playerid,sex, "** Usa: /clan [crear/invitar/entrar/salir/stats].");

if(!strcmp(tmp, "crear", true))
{
if(isnull(tmp2))
return SendClientMessage(playerid,yellow, "** Usa: /clan crear [NOMBRE].");
if(strlen(tmp2) < 3 || strlen(tmp2) > 6)
return SendClientMessage(playerid,yellow, "** El nombre debe tener de 3 a 6 caracteres.");
if(!IsValidName(tmp2))
return SendClientMessage(playerid,yellow, "** Ese nombre no es valido.");
if(Cuentas[playerid][Clan]>0)
return SendClientMessage(playerid,yellow, "** Ya tienes un clan, usa /clan salir.");
if(GetPlayerMoney(playerid)<8000000)
return SendClientMessage(playerid,yellow, "** Debes tener 8000000$ para la creaciуn de tu clan.");
new gangid = 0;
for(new i; i < GANG_NUMBER; i++)
{
new file[100];
format(file, sizeof(file), GANG_FILE, i);
if(dini_Exists(file))
{
new gname[15];
strcat(gname, dini_Get(file, "GANG_NAME"),15);
if(strfind(tmp2, gname, true) == 0)
return SendClientMessage(playerid,yellow, "** Ya se encuentra un clan con ese nombre.");
}
else
if(!dini_Exists(file) && i != 0)
gangid = i;

}

if(gangid == 0)
{
GANG_NUMBER++;
gangid = GANG_NUMBER;
}
dini_IntSet(CFG,"GANG_NUMBER",GANG_NUMBER);

new gfile[60];
format(gfile, sizeof(gfile), GANG_FILE, gangid);
dini_Create(gfile);
format(GangInfo[gangid][GANG_NAME], sizeof(tmp2), "%s", tmp2);
dini_Set(gfile, "GANG_NAME", GangInfo[gangid][GANG_NAME]);
dini_IntSet(gfile, "GANG_ID", gangid);
dini_IntSet(gfile,"GANG_MEMBERS",0);
GangInfo[gangid][GANG_ID] = gangid;
GangInfo[gangid][GANG_MEMBERS] = 0;
GangInfo[gangid][GANG_COLOR] = RandomColors[gangid];
format(gfile, sizeof(gfile), "** Creaste exitosamente el clan %s por 8000000$.", GangInfo[gangid][GANG_NAME]);
SendClientMessage(playerid,yellow, gfile);
DineroUsuario(playerid,-8000000);
GuardarCuenta(playerid);
JoinGang(playerid, gangid);
}