[Ajuda] Agendar Cadeia.
#2

Quote:
Originally Posted by CSSDean
Посмотреть сообщение
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:

PHP код:
if(!strcmp(cmd"/aprenderoff"true))
    {
        if(
aInfo[playerid][Admin] == 1)
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOR_ERRO"Uso vбlido: correto /aPrenderOFF [Nick] [Tempo] [Motivo]");
                return 
1;
            }
            
format(gFilesizeof(gFile), "Contas/%s.ini"tmp);
              if(!
fexist(gFile))
            {
                
SendClientMessage(playeridCOR_ERRO"Nгo existe nenhuma conta com esse nick!");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
              if(! 
strlen(tmp))
               {
                
SendClientMessage(playeridCOR_ERRO"Uso vбlido: /aPrenderOFF [Nick] [Tempo] [Motivo]");
                return 
1;
               }
               new
                   
iTempo strval(tmp)
               ;
               if(
iTempo || iTempo 600)
               {
                
SendClientMessage(playeridCOR_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(playeridCOR_ERRO"Uso vбlido: /aPrenderOFF [Nick] [Tempo] [Motivo]");
                  return 
1;
            }
            
SendClientMessage(playerid0x33CCFFAA"(PuniзгoOff) Conta punida com sucesso!");
            
WE_SetInt(gFile"Abuser"1);
            
WE_SetInt(gFile"Preso"iTempo*60);
        }
        else
        {
            
SendClientMessage(playeridCOR_ERRO"Vocк nгo tem permissгo!");
        }
        return 
1;
    } 
PS: esse cmd й da GM "[WE] World Evolution RPG [WE]" eu a peguei para estuda-la.
Tente colocar uma funзгo em:
PHP код:
public OnPlayerSpawn(playerid
checando assim que o o player spawnar se ele estб preso ou nгo.
Reply


Messages In This Thread
Agendar Cadeia. - by CSSDean - 06.10.2017, 15:14
Re: Agendar Cadeia. - by Gguiz - 06.10.2017, 22:20
Re: Agendar Cadeia. - by CSSDean - 07.10.2017, 02:17
Re: Agendar Cadeia. - by C4rtm4n - 07.10.2017, 04:47
Re: Agendar Cadeia. - by ipsLuan - 07.10.2017, 12:20

Forum Jump:


Users browsing this thread: 1 Guest(s)