Jump to content

Comanda /info


TheSlim2

Recommended Posts

salut, iti las un exemplu aici YCMD:info(playerid, params[], help) return SendClientMessage(playerid, COLOR_RED, "Owner server: Waller"); daca nu esti pe ycmd si esti pe zcmd stergi Y si help de la comanda gen asa CMD:info(playerid, params[]), poti face comanda si mai mare cu mai multe mesaje dar eu ti-am dat un ex asa cum ai cerut, o zi buna.

Link to comment
Share on other sites

Salut @TheSlim2,

O sa-ti ofer si eu un exemplu.

In primul rand, daca serverul tau ruleaza pe procesorul de comenzi al librariei YSI, adica YCMD, atunci comanda ta va arata in felul urmator:

YCMD:info( playerid, params[], help ) {

	SendClientMessage( playerid, -1, "Info:" );
	SendClientMessage( playerid, -1, "- primul mesaj" );
	SendClientMessage( playerid, -1, "- al doilea mesaj" );
	// etc

	return true; }

Cum iti dai seama daca serverul ruleaza pe YCMD? Foarte simplu, cauti cu CTRL+F textul "YCMD", iar daca rezultatele cautarii seamana cu comanda pe care ti-am dat-o mai sus, atunci serverul ruleaza pe YCMD.

In cazul in care serverul tau ruleaza pe ZCMD, atunci in loc urmatoarea linie de cod ("YCMD:info( playerid, params[], help ) {"), vei folosi urmatoarea linie: CMD:info( playerid, params[] ) {.

 

Acum, sa iti explic ce este functia SendClientMessage. O traducere in limba romana ar fi urmatoarea: Trimite Mesaj Catre Jucator

SendClientMessage = trimite mesaj catre jucator
playerid = id-ul jucatorului care foloseste comanda respectiva, adica /info (acesta va ramane asa, nu va fi schimbat)
-1 = culoarea mesajului. Tu poti schimba culoarea oricum doresti. Va trebui sa folosesti doar culori in format HEX. Exemplu: 0xFF0000FF = culoara rosu. Poti cauta pe internet un generator pentru culori in acest format

 

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.