23.08.2014, 20:03
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
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