Jump to content

SERVER:UNKNOWN COMMAND


Guta Florin

Recommended Posts

Salutare, depinde foarte mult de ce procesor de comenzi folosesti.

Dar incearca cu functia de mai jos daca nu o ai deja 

public OnPlayerCommandPerformed(playerid,  cmdtext[],  success)

    if(success != 1)
    {
        format(strings,sizeof(strings),"Comanda {FFFFFF}%s{FF3300} nu exista!",cmdtext);
        SendClientMessage(playerid,-1,strings);
    }
    return  1;
}
EDIT: In cazul in care te referi la schimbarea acelui mesaj este raspunsul meu.

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Salut @Guta Florin

In cazul in care folosesti un procesor de comenzi precum ZCMD (comenzile incep cu CMD:Comanda_Ta), poti folosi exemplu dat de catre Mister mai sus (OnPlayerCommandPerformed)

In cazul in care folosesti un procesor de comenzi precum YCMD (comenzile incep cu YCMD:Comanda_Ta), mesajul respectiv poate fi modificat din OnPlayerCommandReceived. Exemplu =>

public e_COMMAND_ERRORS: OnPlayerCommandReceived( playerid, cmdtext[], e_COMMAND_ERRORS:success ) {
	if( success == COMMAND_UNDEFINED ) SendClientMessage( playerid, -1, "Error: This command doesn't exist, use the /help command for a generic list." );
	return COMMAND_OK; }

In cazul in care folosesti procesorul default de comenzi, mesajul poate fi modificat din OnPlayerCommandText. Exemplu =>

public OnPlayerCommandText (playerid, cmdtext []) {
	//comenzile tale
	return SendClientMessage( playerid, -1, "Error: This command doesn't exist, use the /help command for a generic list." );
}

Tu ar trebui sa ai 'return 0;' in loc de 0, pui exemplul de mai sus.

 

Edited by shane
  • Like 1
  • Upvote 1

Daca te-am ajutat =>

spacer.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.