SA-MP Forums Archive
SendClientMessage Not showing. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendClientMessage Not showing. (/showthread.php?tid=255443)



SendClientMessage Not showing. - Lynn - 15.05.2011

The first two, and last two lines show, but not the middle.
I can not figure out why.
pawn Код:
SendClientMessage(playerid, COLOR_WHITE, "{2F991A}|================{4000FF}[PLAYER STATISTICS]{2F991A}================|");
        format(StatsString, sizeof(StatsString),"{4000FF}Character: {2F991A}Name: {4000FF}[%s] ",CharName);
        SendClientMessage(playerid, COLOR_WHITE,StatsString);
        format(StatsString, sizeof(StatsString), "{4000FF}General: {2F991A}Playing Hours:{4000FF}[%d] {2F991A}- Bank:{4000FF}[$%d] {2F991A}- Street Rep:{4000FF}[%d] {2F991A}- GivableRep:{4000FF}[%d] {2F991A}- Job:{4000FF}[%s]", playinghours, bbalance, srep, grep, JobText );
        SendClientMessage(playerid, COLOR_WHITE,StatsString);
        format(StatsString, sizeof(StatsString), "{4000FF}Faction: {2F991A}Faction Name: {4000FF}[%s] {2F991A}- Faction Rank {4000FF}[%d]" , PlayerInfo[playerid][pFaction],PlayerInfo[playerid][pRank]);
        SendClientMessage(playerid, COLOR_WHITE,StatsString);
        SendClientMessage(playerid, COLOR_WHITE, "{2F991A}|===================================================|");
Line not showing at all:
pawn Код:
format(StatsString, sizeof(StatsString), "{4000FF}General: {2F991A}Playing Hours:{4000FF}[%d] {2F991A}- Bank:{4000FF}[$%d] {2F991A}- Street Rep:{4000FF}[%d] {2F991A}- GivableRep:{4000FF}[%d] {2F991A}- Job:{4000FF}[%s]", playinghours, bbalance, srep, grep, JobText );
        SendClientMessage(playerid, COLOR_WHITE,StatsString);



Re: SendClientMessage Not showing. - iGamer - 15.05.2011

You're using too many RRGGBB, use a string.


AW: SendClientMessage Not showing. - The_$ - 15.05.2011

you must put this
new StatsString[256];


Re: AW: SendClientMessage Not showing. - Skylar Paul - 15.05.2011

Quote:
Originally Posted by The_$
Посмотреть сообщение
you must put this
new StatsString[256];
NO!

Use strcat.

Example of my stats command:

pawn Код:
format(string, sizeof(string), "{0FA0D1}Name: {FFFFFF}%s (ID: %d)\n{0FA0D1}VIP Rank: {FFFFFF}%s (%d)\n{0FA0D1}Skin ID: {FFFFFF}%d\n{0FA0D1}Job:{FFFFFF} %s\n{0FA0D1}Money: {FFFFFF}$%d\n{0FA0D1}Faction: {FFFFFF}%s | ", pName(playerid), playerid, VIPName, PVar[playerid][VIPLevel], PVar[playerid][pSkin], JobName, PVar[playerid][pMoney], FactionName);
        strcat(holder, string, sizeof(holder));
        format(string, sizeof(string), " {0FA0D1}Rank: {FFFFFF}%s (Rank: %d)\n{0FA0D1}Materials: {FFFFFF}%d\n{0FA0D1}Drugs: {FFFFFF}%d\n", FactionRankName, PVar[playerid][pFRank], PVar[playerid][pMaterials], PVar[playerid][pDrugs]);
        strcat(holder, string, sizeof(holder));