06.10.2017, 15:14
olб! peguei um sistema de agendar prisгo,porem quando agendo a prisгo do jogador e o mesmo loga o jogador nгo vai preso. Alguem pode ajudar? Obrigado!!
CMD:
PS: esse cmd й da GM "[WE] World Evolution RPG [WE]" eu a peguei para estuda-la.
CMD:
PHP код:
if(!strcmp(cmd, "/aprenderoff", true))
{
if(aInfo[playerid][Admin] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_ERRO, "Uso vбlido: correto /aPrenderOFF [Nick] [Tempo] [Motivo]");
return 1;
}
format(gFile, sizeof(gFile), "Contas/%s.ini", tmp);
if(!fexist(gFile))
{
SendClientMessage(playerid, COR_ERRO, "Nгo existe nenhuma conta com esse nick!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(! strlen(tmp))
{
SendClientMessage(playerid, COR_ERRO, "Uso vбlido: /aPrenderOFF [Nick] [Tempo] [Motivo]");
return 1;
}
new
iTempo = strval(tmp)
;
if(iTempo < 1 || iTempo > 600)
{
SendClientMessage(playerid, COR_ERRO, "Tempo somente de 1 а 600 minutos ! ");
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, COR_ERRO, "Uso vбlido: /aPrenderOFF [Nick] [Tempo] [Motivo]");
return 1;
}
SendClientMessage(playerid, 0x33CCFFAA, "(PuniзгoOff) Conta punida com sucesso!");
WE_SetInt(gFile, "Abuser", 1);
WE_SetInt(gFile, "Preso", iTempo*60);
}
else
{
SendClientMessage(playerid, COR_ERRO, "Vocк nгo tem permissгo!");
}
return 1;
}