[Ajuda] Puniзгo Offline
#1

Eu tentei colocar uma mensagem global para que todos vissem quem eu estou punindo offline, mas eu fico com esse erro:

Код:
D:\A L.H Server\gamemodes\LosHermanos.pwn(45062) : error 017: undefined symbol "id"
PHP код:
SendClientMessage(playerid0x33CCFFAA"| PuniзгoOff | Conta punida com sucesso!");
            
SendClientFormatAll(COR_VERDE"{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)"PlayerName(playerid), PlayerName(id), iTemporesult);
            
WE_SetInt(gFile"Abuser"1);
            
WE_SetInt(gFile"Preso"iTempo*60); 
Eu queria deixar mais ou menos assim:

PHP код:
             SendClientFormat(idCOR_VERDE"{57FF03}| PUNIЗГO | Vocк foi preso por %d Minutos"iTempo);
            
SendClientFormat(playeridCOR_ERRO"{57FF03}| INFO | Vocк prendeu o(a) jogador(a) %s por %d Minutos"PlayerName(id), iTempo);
             
SendClientFormatAll(COR_VERDE"{57FF03}| SERVER-ADMIN | O Administrador(a) %s prendeu o(a) jogador(a) %s por %d minutos (Motivo: %s)"PlayerName(playerid), PlayerName(id), iTemporesult);
            
format(gFilesizeof(gFile), "Contas/%s.ini"PlayerName(id));
            
WE_SetInt(gFile"Abuser"1); 
Reply
#2

Код:
             SendClientFormat(playerid, COR_VERDE, "{57FF03}| PUNIЗГO | Vocк foi preso por %d Minutos", iTempo); 
            SendClientFormat(playerid, COR_ERRO, "{57FF03}| INFO | Vocк prendeu o(a) jogador(a) %s por %d Minutos", PlayerName(id), iTempo); 
             SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Administrador(a) %s prendeu o(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result); 
            format(gFile, sizeof(gFile), "Contas/%s.ini", PlayerName(id)); 
            WE_SetInt(gFile, "Abuser", 1);
Tenta Esse
Reply
#3

Quote:
Originally Posted by GabrielMT
Посмотреть сообщение
Код:
             SendClientFormat(playerid, COR_VERDE, "{57FF03}| PUNIЗГO | Vocк foi preso por %d Minutos", iTempo); 
            SendClientFormat(playerid, COR_ERRO, "{57FF03}| INFO | Vocк prendeu o(a) jogador(a) %s por %d Minutos", PlayerName(id), iTempo); 
             SendClientFormatAll(COR_VERDE, "{57FF03}| SERVER-ADMIN | O Administrador(a) %s prendeu o(a) jogador(a) %s por %d minutos (Motivo: %s)", PlayerName(playerid), PlayerName(id), iTempo, result); 
            format(gFile, sizeof(gFile), "Contas/%s.ini", PlayerName(id)); 
            WE_SetInt(gFile, "Abuser", 1);
Tenta Esse
Man esse й como eu queria que ficasse, ou seja, o que eu peguei de exemplo. O que esta dando erro й esse:

PHP код:
SendClientMessage(playerid0x33CCFFAA"| PuniзгoOff | Conta punida com sucesso!"); 
            
SendClientFormatAll(COR_VERDE"{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)"PlayerName(playerid), PlayerName(id), iTemporesult); 
            
WE_SetInt(gFile"Abuser"1); 
            
WE_SetInt(gFile"Preso"iTempo*60); 
Reply
#4

Quote:
Originally Posted by Nexcau
Посмотреть сообщение
Man esse й como eu queria que ficasse, ou seja, o que eu peguei de exemplo. O que esta dando erro й esse:

PHP код:
SendClientMessage(playerid0x33CCFFAA"| PuniзгoOff | Conta punida com sucesso!"); 
            
SendClientFormatAll(COR_VERDE"{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)"PlayerName(playerid), PlayerName(id), iTemporesult); 
            
WE_SetInt(gFile"Abuser"1); 
            
WE_SetInt(gFile"Preso"iTempo*60); 
voзк nгo definiu a variavel de id
Reply
#5

Simbolo nгo definido (id).

PHP код:
new id
Reply
#6

Mas tem como eu trocar a variavel id > para a acc que foi punida ?

Por que tipo o comando й /prenderoff [Conta]
Reply
#7

Quote:
Originally Posted by Nexcau
Посмотреть сообщение
Mas tem como eu trocar a variavel id > para a acc que foi punida ?

Por que tipo o comando й /prenderoff [Conta]
Tem sim! Poste seu comando para que possamos ajudar mais..
Reply
#8

Quote:
Originally Posted by HoodScript
Посмотреть сообщение
Tem sim! Poste seu comando para que possamos ajudar mais..
Ok

PHP код:
    if(!strcmp(cmd"/aprenderoff"true))
    {
        if(
aInfo[playerid][Admin] == || aInfo[playerid][Moderador] == || aInfo[playerid][Ajudante] == && aInfo[playerid][SubStaff] = 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!");
            
SendClientFormatAll(COR_VERDE"{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)"PlayerName(playerid), PlayerName(id), iTemporesult);
            
WE_SetInt(gFile"Abuser"1);
            
WE_SetInt(gFile"Preso"iTempo*60);
        }
        else
        {
            
SendClientMessage(playeridCOR_ERRO"Vocк nгo tem permissгo!");
        }
        return 
1;
    } 
Reply
#9

Espero ter ajudado.

PHP код:
if(!strcmp(cmd"/aprenderoff"true)) 
{
if(
aInfo[playerid][Admin] == || aInfo[playerid][Moderador] == || aInfo[playerid][Ajudante] == && aInfo[playerid][SubStaff] = 1
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Vocк nгo tem permissгo para usar este comando!");
new 
tmp[256], tmp2[256], tmp3[256], idx;
tmp strtok(paramsidx);
tmp2 strtok(paramsidx);
tmp3 strtok2(paramsidx);
if(!
strlen(tmp)||!strlen(tmp2)||!strlen(tmp3))
return 
SendClientMessage(playerid,COR_USOCORRETO,"Uso: /agendarcadeia [nick] [minutos] [motivo]");
if(
strval(tmp2) > 600)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: O mбximo de minutos й 600!");
if(
strval(tmp2) == 0)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Para soltar alguйm use /soltar [id].");
if(
strval(tmp2) < 0)
return 
SendClientMessage(playerid,COR_USOCORRETO,"Uso: /agendarcadeia [nick] [minutos] [motivo]");
new 
file[256];
format(file,256,"Presos/%s.ini",tmp);//PASTA ONDE A OS PLAYERS FICAM PRESOS ..
DOF2_CreateFile(file);
DOF2_SetInt(file,"Minutos"strval(tmp2));
DOF2_SetString(file,"AdminName"getPName(playerid));
DOF2_SetString(file,"Motivo"tmp3);
DOF2_SaveFile();
SendClientFormatAll(playeridCOR_PRINCIPAL"» Vocк agendou a prisгo de '%s', '%d' minutos, motivo de: '%s'"tmpstrval(tmp2), tmp3);
return 
1;

Reply
#10

Quote:
Originally Posted by Rato22
Посмотреть сообщение
Espero ter ajudado.

PHP код:
if(!strcmp(cmd"/aprenderoff"true)) 
{
if(
aInfo[playerid][Admin] == || aInfo[playerid][Moderador] == || aInfo[playerid][Ajudante] == && aInfo[playerid][SubStaff] = 1
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Vocк nгo tem permissгo para usar este comando!");
new 
tmp[256], tmp2[256], tmp3[256], idx;
tmp strtok(paramsidx);
tmp2 strtok(paramsidx);
tmp3 strtok2(paramsidx);
if(!
strlen(tmp)||!strlen(tmp2)||!strlen(tmp3))
return 
SendClientMessage(playerid,COR_USOCORRETO,"Uso: /agendarcadeia [nick] [minutos] [motivo]");
if(
strval(tmp2) > 600)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: O mбximo de minutos й 600!");
if(
strval(tmp2) == 0)
return 
SendClientMessage(playeridCOR_ERRO"ERRO: Para soltar alguйm use /soltar [id].");
if(
strval(tmp2) < 0)
return 
SendClientMessage(playerid,COR_USOCORRETO,"Uso: /agendarcadeia [nick] [minutos] [motivo]");
new 
file[256];
format(file,256,"Presos/%s.ini",tmp);//PASTA ONDE A OS PLAYERS FICAM PRESOS ..
DOF2_CreateFile(file);
DOF2_SetInt(file,"Minutos"strval(tmp2));
DOF2_SetString(file,"AdminName"getPName(playerid));
DOF2_SetString(file,"Motivo"tmp3);
DOF2_SaveFile();
SendClientFormatAll(playeridCOR_PRINCIPAL"» Vocк agendou a prisгo de '%s', '%d' minutos, motivo de: '%s'"tmpstrval(tmp2), tmp3);
return 
1;

Nгo man eu quero, que apareзa a conta no chat-global, ou seja, eu queria o simbolo para substituir o (id) pela conta:

PHP код:
SendClientFormatAll(COR_VERDE"{57FF03}| SERVER-ADMIN | O Staffer %s agendou a prisгo do(a) jogador(a) %s por %d minutos (Motivo: %s)"PlayerName(playerid), PlayerName(id), iTemporesult); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)