Jump to content

Question

Posted

Salut am un GameMode care utilizeaza mysql. Problema mea este ca nu stiu cum sa fac ca sa arate "Server: Unknown Command" cand un anumit player scrie o comanda gresita. Putin ajutor va rog?

5 answers to this question

Recommended Posts

  • 0
Posted
Acum 14 ore, WopsS a spus:

La OnPlayerCommandText pui


return 0;

 

Nu am OnPlayerCommandText in GM. Trebuie sa adaug functia? Ma ajuti te rog?

  • 0
Posted
Acum 2 ore, Spmn a spus:

Daca nu o ai, inseamna ca folosesti un procesor de comenzi.

Daca e zcmd, adauga: http://pastebin.com/gBNqqa7q

 

Am rezolvat am adaugat asa la functie:

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command."); // asta e ce am adaugat
    new string[512];
	new sendername[MAX_PLAYER_NAME];
	new cmd[256];
	new idx;
	cmd = strtok(cmdtext, idx);
	new tmp[256], glasseid, skin, id;
	return 1; // asta e ce am adaugat

 

  • 0
Posted
Acum 3 ore, Spmn a spus:

Daca nu o ai, inseamna ca folosesti un procesor de comenzi.

Daca e zcmd, adauga: http://pastebin.com/gBNqqa7q

 

Am rezolvat am adaugat asa la functie:

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command."); // asta e ce am adaugat
    new string[512];
	new sendername[MAX_PLAYER_NAME];
	new cmd[256];
	new idx;
	cmd = strtok(cmdtext, idx);
	new tmp[256], glasseid, skin, id;
	return 1; // asta e ce am adaugat

 

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.