One simple question
#1

How to make when player type /dsfgsdf to dont get message SERVER: Unkown command

i wanna to make when player type unkown command to get message like this: That command is unkown use /commands for list of available commands

Can anyone help me?
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  // your commands.
  return SendClientMessage(playerid, 0xFFFFFFFF, "That command is unknown, use /commands for list of available commands.");
}
Reply
#3

Quote:
Originally Posted by Don Correlli
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  // your commands.
  return SendClientMessage(playerid, 0xFFFFFFFF, "That command is unknown, use /commands for list of available commands.");
}
tnx
Reply
#4

You're welcome.
Reply
#5

Quote:
Originally Posted by Don Correlli
You're welcome.
But i have this code,

Код:
if (strcmp("/pomoc", cmdtext, true, 10) == 0)
	{
		ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Pomoc","Na serveru se nalazi puno stvari\n-Kuce\n-Droga\n-DM arene\n-Drag raceovi\nI jako puno drugih stvari, za listu komanda napisi /komande ","OK","Odustani");
		return 1;
	}
and now when i put your code, evrything work but when i type /pomoc i get menu normal but i get that message too....(to that command isnt available)
Reply
#6

upps srry my bad i fix, i know what you mean, i was need to replace with return 0; not with return 1; srry Corrllli >>>>HrVaTsKa<<
Reply
#7

I guess you did something wrong.

This should work:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/pomoc", cmdtext, true) == 0)
  {
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Pomoc", "Na serveru se nalazi puno stvari\n-Kuce\n-Droga\n-DM arene\n-Drag raceovi\nI jako puno drugih stvari, za listu komanda napisi /komande ", "OK", "Odustani");
    return true;
  }
  return SendClientMessage(playerid, 0xFFFFFFFF, "That command is unknown, use /commands for list of available commands.");
}
Reply
#8

yea i know, XD i fix but anywhay tny you alot
Reply
#9

I see now, i've posted that code right after you.

If you have any other problem you can also post in our section.
Reply
#10

Quote:
Originally Posted by Don Correlli
I see now, i've posted that code right after you.

If you have any other problem you can also post in our section.
i know XD im ExtremePower i have over 400 posts there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)