Jump to content

Cum fac mai multe randuri?


Ronni

Recommended Posts

Saluate am nevoie de ajutor va rog


YCMD:ajutor(playerid, params[], help) return SCM(playerid, COLOR_WHITE, "Salutare, daca ai venit aici inseamna ca ai nevoie de ajutor!\n Pentru inceput ai putea sa sustii testul pentru carnetul de soferi({FF0000}/gps - Locatii Importante - DMV{FFFFFF}).\n Poti ajunge acolo închiriind un MTB de la {FF0000}/rentbike{FFFFFF}.\n Dupa toate astea poti sa faci job ca pe orice alta comunitate ({FF0000}/jobs{FFFFFF}).\n Multumim ca ne-ai ales!");


Imagine

 

Dar cand dau /ajutor nu imi da nimic...

Link to comment
Share on other sites

Asta pentru ca SendClientMessage nu poate procesa acele /n pentru ca acest tip de mesaje nu pot avea multi lini
1. Trimiti fiecare din acele mesaje cu un SendClientMessage seperat

Sau


2. Iti creezi/cauti o functie care te ajuta sa trimiti aceste mesaje lungi pe mai multe lini

Link to comment
Share on other sites

29 minutes ago, Banditul said:

Asta pentru ca SendClientMessage nu poate procesa acele /n pentru ca acest tip de mesaje nu pot avea multi lini
1. Trimiti fiecare din acele mesaje cu un SendClientMessage seperat

Sau


2. Iti creezi/cauti o functie care te ajuta sa trimiti aceste mesaje lungi pe mai multe lini

Multumesc foarte mult!!! +1

Link to comment
Share on other sites

  • 1 month later...
stock sendSplittedMessageToPlayer(const playerid, const first_line_color, const last_line_color, const message[], va_args<>) {
    new  string[289];
    va_format(string, sizeof string, message, va_start<4>);
 
    va_SendClientMessage(playerid, first_line_color, string);
 
    if(strlen(string) >= 144)  va_SendClientMessage(playerid, last_line_color, "... %s", string[143]);
    return true;
}
 
stock sendSplittedMessage(const color, const message[], va_args<>) {
    new  string[289];
    va_format(string, sizeof string, message, va_start<4>);
 
    va_SendClientMessageToAll(color, string);
 
    if(strlen(string) >= 144) va_SendClientMessageToAll(color, "... %s", string[143]);
    return 1;
}
 
Credite: sancky ultra pro dev @Sancky
Edited by mrrares19
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.