[Ajuda] /limparlider bugado - 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: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /limparlider bugado (
/showthread.php?tid=437248)
/limparlider bugado -
MoitaGreen - 14.05.2013
Tipo, o meu comando /limparlider ta normal msm, o unico problema, e que quando o cara ta off aparece q limpou a vaga, mais ai quando o cara loga ele continua de lider, add algo ai pra fazer qndo o cara logar o lider dele sai sla.
Код:
if (strcmp("/limparlider", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Somente admins Zone ou dono podem usar este comando!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparlider [organizaзгo]");
return 1;
}
new Vaga2 = strval(tmp);
if(Vaga2 < 1 || Vaga2 > 30) { SendClientMessage(playerid, COLOR_GREY, "Vaga mнnima 1 mбximo 30!"); return 1; }
new id=GetPlayerID(InfoOrg[Vaga2][Lider]);
format(string, sizeof(string), "ADMIN: %s limpou a vaga %d do lнder %s",PlayerName(playerid), Vaga2, InfoOrg[Vaga2][Lider]);
LideresLog(string);
if(IsPlayerOnline(InfoOrg[Vaga2][Lider])) DemitirLider(id);
strmid(InfoOrg[Vaga2][Lider], "Ninguem", 0, strlen("Ninguem"), 255);
format(gstring, 128, "ORG Arquivos/Org%d.cfg", Vaga2);
dini_Set(gstring,"Lider","Ninguem");
format(string, sizeof(string), "Vocк limpou o lнder da organizaзгo Nє %d",Vaga2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
Re: /limparlider bugado -
bruxo00 - 14.05.2013
Muito provavelmente й o sistema de ler/escrever no ficheiro .ini.
Aconselho-o a fazer Debug para encontrar os bug's mais facilmente.
Re: /limparlider bugado -
MoitaGreen - 14.05.2013
Oq e fazer " debug " ?