Jump to content
  • 0

pomoc Příkaz neexistuje


Paulee

Dotaz

Zdravím,

Dělám si svůj "gamemode" jen tak pro zábavu a potřeboval bych vědět jak mám udělat když hráč napíše /adad, aby mu to napsalo, že příkaz neexistuje pro nápovedu použi /help... Nevíte jak to udělat? Zkoušel jsem a hledal jsem, ale nějak to nejde :d Nechci aby to psalo: "SERVER: Unknow command".

 

Díky za přečtení :).

Přeji pěkný den,

S pozdravem Petr.

Edited by PetrPaulik
Link to comment
Share on other sites

8 odpovědí na tuto otázku

Recommended Posts

  • 0

Mám to tam takhle:

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		
		return 1;
	}
	return SendClientMessage(playerid, -1, "Příkaz neexistuje! Nápověda: /help");
}

Ale stejně to nejde

Link to comment
Share on other sites

  • 0

Mám to tam takhle:

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		
		return 1;
	}
	return SendClientMessage(playerid, -1, "Příkaz neexistuje! Nápověda: /help");
}

Ale stejně to nejde

 

Používáš nějáké include na cmds? Třeba QCMD nebo zcmd nebo tak?

Link to comment
Share on other sites

  • 0

Tak to ale nemuzes pouzivat OnPlayerCommandText..

 

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, color, msg[]); // dopln si to
    return 1;
}
Edited by Lukasz
Link to comment
Share on other sites

  • 0

Díky moc! Už to funguje...

 

Tak to ale nemuzes pouzivat OnPlayerCommandText..
 

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, color, msg[]); // dopln si to
    return 1;
}

Lock

Edited by PetrPaulik
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...