SA-MP Forums Archive
[Ajuda] Comando /agendarcadeia - 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] Comando /agendarcadeia (/showthread.php?tid=533301)



Comando /agendarcadeia - iWellCleber - 23.08.2014

Porque esse comando nгo estб agendando ?

if(strcmp(cmd, "/agendarcadeia",true) == 0)
{
if(admtrampando[playerid] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
new jogador[128], tempo[128], str[50];
jogador = strtok(cmdtext, idx);
tempo = strtok(cmdtext, idx);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; }
new offset = idx; new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; }
result[idx - offset] = EOS;
if(!strlen(jogador) || !strlen(tempo) || !strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /agendar [Nome] [Tempo] [Motivo]");
for(new x = 0, y = GetMaxPlayers(); x != y; x++)
{
if(IsPlayerConnected(x))
{
new nome[24];
GetPlayerName(x, nome, MAX_PLAYER_NAME);
if(!strcmp(nome, jogador)) return SendClientMessage(playerid, COLOR_GREY, " O jogador estб online... Use o comando comum para prende-lo. !");
}
}
format(str,sizeof(str), "Contas/%s.ini", jogador);
if(!dini_Exists(str)) return SendClientMessage(playerid, COLOR_GREY, " Nome Invalido! !");
format(string, sizeof(string), "O admin %s agendou %s, %d minutos, Motivo: %s",PlayerName(playerid), jogador, strval(tempo), result);
SendClientMessageToAll(COLOR_LIGHTRED, string);
dini_IntSet(str, "pJailed", 6);
dini_IntSet(str, "pJailTime", strval(tempo) * 60);
return 1;
}

alguem faz um sistema certo de /agendarcadeia pra mim ? pf
ou me ajuda a consertar o codigo


Re: Comando /agendarcadeia - iWellCleber - 23.08.2014

se alguem for fazer de preferencia em strcmp igual meu gm


Re: Comando /agendarcadeia - ipsLuan - 23.08.2014

Este cуdigo estб muito ruim, aconselho a pegar o GM do PlayCity...


Re: Comando /agendarcadeia - iWellCleber - 24.08.2014

Ja tentei de tudo porisso estou pedindo pra me ajudarem a consertar o codigo
ou fazerem um sistema de agendar cadeia que funcione no meu gm, que й em strcmp
me ajudem pf