[AJUDA] Erro: Comando desconhecido
#1

Eu queria saber como faz pra colocar essa mensagem: "[ERRO] Comando desconhecido" quando alguem coloca um comando errado.

E alem disso queria saber como faz pra colocar aquela mensagem na cabeзa do administrador: "Administrador: Posso Ajudar ?!" e "AFK: Administrador Ausente !"
Reply
#2

No return da public OnPlayerCommandText, ao inves de usar
pawn Код:
return 0;
}
use:
pawn Код:
return SendClientMessage(playerid, COR, "[ERRO] Comando desconhecido");
}
Sobre colocar essa mensagem acima do admin, veja essa funзгo

https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Reply
#3

no OnPlayerCommandText tem isso aqui:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new playermoney;
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new cmd[256];
    new tmp[256];
    new giveplayerid, moneys, idx;
    cmd = strtok(cmdtext, idx);
Entгo como eu vo colocar la ?
Reply
#4

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
no OnPlayerCommandText tem isso aqui:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new playermoney;
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new cmd[256];
    new tmp[256];
    new giveplayerid, moneys, idx;
    cmd = strtok(cmdtext, idx);
Entгo como eu vo colocar la ?
coloque no ъltimo return da public.
Reply
#5

nao tem nenhum return a public ta assim
Reply
#6

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
nao tem nenhum return a public ta assim
WTF ?!

Se ela tivesse assim, desse jeito que vocк ta falando concerteza daria warn..
Veja com atenзгo.. lуgicamente abaixo disso que vocк mandou tem os comandos, e depois dos comandos tem o return da public..
Reply
#7

No Final da Public OnPlayerCommandText Vai Ter :
pawn Код:
return 0;
}
Troque Essa Linha Apenas Para
pawn Код:
return SendClientMessage(playerid, acordamensagem, "Esse Comando й Desconhecido No Nosso Servidor.");
}
Reply
#8

Ela esta assim. Depois dela vem outro comando veja ae \/

pawn Код:
~//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new playermoney;
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new cmd[256];
    new tmp[256];
    new giveplayerid, moneys, idx;
    cmd = strtok(cmdtext, idx);

//--------------------------------[Conce]---------------------------------------
    if(strcmp(cmd, "/senha", true) == 0)
Reply
#9

й no Final Nгo No Comeзo Mano

ai depois quando achar fais isso

Quote:
Originally Posted by Jonathan_Feitosa
Посмотреть сообщение
No Final da Public OnPlayerCommandText Vai Ter :
pawn Код:
return 0;
}
Troque Essa Linha Apenas Para
pawn Код:
return SendClientMessage(playerid, acordamensagem, "Esse Comando й Desconhecido No Nosso Servidor.");
}
Reply
#10

#semcomentбrios.

Na public OnPlayerCommandText, DEPOIS DOS COMANDOS tem o return 0;

mude para return SendClientMessage(playerid, COR, "[ERRO] Comando desconhecido");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)