SA-MP Forums Archive
Just a small question. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Just a small question. (/showthread.php?tid=587419)



Just a small question. - Sjn - 30.08.2015

Well, this randomly came in my mind and i was wondering about it.

For coloring the client messages, i saw most of the released gamemodes have the messages used like;

SendClientMessage(playerid, -1, "{FFFF00}Hello.");

Writing the color code with the string. (It makes the timestamp white ingame :P) and other method, using a direct defined color in SendClientMessage.

Does these 2 stuffs really makes difference?


Re: Just a small question. - Gazzy - 30.08.2015

It doesn't make a difference to my knowledge, but some codes like that are because people can be too lazy to define color codes.


Re: Just a small question. - JessThompson - 30.08.2015

Nope makes no difference but as gazzy said people are too lazy to ****** SAMP COLORS. Which is a released inc that defines most colors.


Re: Just a small question. - SpikY_ - 30.08.2015

No, i don't think so cause what if a person want to use multiple colors in Client message.


Re: Just a small question. - SickAttack - 30.08.2015

The only difference is in the length/capacity of a message (string). The parameter/argument doesn't take up string-length and the other one does.

pawn Код:
// [ DEVELOPMENT GAMEMODE ]

// INCLUDES:

#include <a_samp>

// MAIN:

main()
{
    print("Development Mode: color_length.amx");

    new string[144];
    format(string, sizeof(string), "{FFFFFF}%s is a chicken!", "Larva");
    SendClientMessageToAll(-1, string);

    printf("%d", strlen(string));

    format(string, sizeof(string), "%s is a chicken!", "Larva");
    SendClientMessageToAll(-1, string);

    printf("%d", strlen(string));
}

// CALLBACKS:

public OnGameModeInit()
{
    return 1;
}

public OnGameModeExit()
{
    return 1;
}


Length capacity: 144.