SA-MP Forums Archive
[Ajuda] Comando inexistente - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando inexistente (/showthread.php?tid=301434)



[Ajuda] Comando inexistente - cotonete - 04.12.2011

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return SendClientMessage(playerid,0xc23000ff," [SERVIDOR] Comando inexistente.");
}
eu uso YCMD, e agora nгo sei oque deu todos comando que eu executo me retorna comando inexistente, mas o comando funciona junto.. oque serб?


Re: [Ajuda] Comando inexistente - cotonete - 04.12.2011

Код:
YCMD:kill(playerid, params[], help)
{
    #pragma unused params
	#pragma unused help
	if(arrayPlayer[playerid][PPreso] == 1)
	{
	    SendClientMessage(playerid, 0x8a0da3ff, " [ADMINISTRAЗГO] Vocк estб preso e nгo pode usar este comando.");
	}
	else
	{
	   	SetPlayerHealth(playerid,0.0);
		suicidiosGeral++;
		Suicidios[playerid]++;
	}
	new string[128];
	format(string,sizeof(string)," - %s(%d) usou o comando /kill.",pNome(playerid),playerid);
    SendMessageToAdmins(string);
    return 1;
}
Olhem um exemplo de comando, estб certo... mas quando eu uso ele funciona e tambйm retorna comando inexistente


Re: [Ajuda] Comando inexistente - CyNiC - 04.12.2011

Pra que seja possнvel fazer isso de forma fбcil, vocк precisa usar essa versгo do YCMD:

http://pastebin.com/L95eNJPW

E tem que adcionar esse callback em eu cуdigo:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid,0xc23000ff," [SERVIDOR] Comando inexistente.");
    return 1;
}