24.11.2012, 17:23
Alguem me sabe explicar onde esta o erro?
Eu entro in game agendo cadeia e tudo bem.
mas quando loga ele nгo pega cadeia, e outras nem da para loga '-'
Code:
Eu entro in game agendo cadeia e tudo bem.
mas quando loga ele nгo pega cadeia, e outras nem da para loga '-'
Code:
Код:
if(strcmp(cmd,"/agendarcadeia",true)==0 || strcmp(cmd,"/punirnick",true)==0 || strcmp(cmd,"/agendar",true)==0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] < 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
return 1;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"USE: /agendarcadeia [Nick] [Tempo] [Motivo]");
return 1;
}
if(strcmp(tmp,"Fellipe_Lima",true)==0 || strcmp(tmp,"Hard_Insane",true)==0 || strcmp(tmp,"Vicente_Trudes",true)==0)
{
return 1;
}
new tempo[20];
new tempo2;
tempo = strtok(cmdtext, idx);
tempo2 = strval(tempo);
if(!strlen(tempo))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /agendarcadeia [Nick] [Tempo] [Motivo]");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /agendarcadeia [Nick] [Tempo] [Motivo]");
return 1;
}
new arquivo[64];
format(arquivo, sizeof(arquivo), "%s.ini",tmp);
if(!dini_Exists(arquivo))
{
SendClientMessage(playerid,COLOR_GRAD1,"[BGL] Conta nгo encontrada.");
return 1;
}
else
{
dini_IntSet(arquivo,"Jailed", 9);
dini_IntSet(arquivo,"JailTime", tempo2*60);
OnPlayerSave(i);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
{
format(string, 128, "[Agendar-carandiru]: Chuck puniu a conta %s por %d minutos. Motivo: %s.",tmp,tempo,result);
ABroadCast(COLOR_LIGHTRED,string,1);
}
else
{
format(string, 128, "[Agendar-carandiru]: %s puniu a conta %s por %d minutos. Motivo: %s.", sendername,tmp,tempo,result);
ABroadCast(COLOR_YELLOW,string,1);
}
}
return 1;
}
}


