Empty message in chat - 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: Empty message in chat (
/showthread.php?tid=502219)
Empty message in chat -
Blackazur - 22.03.2014
Hello, why does this client message dont send instead a empty message comes into the chat?
Код:
if(pInfo[killerid][pKills] == 10) { pInfo[killerid][pRank] = 1,format(str,sizeof(str),""chat""OLD_ADMINCMD" [RANK] %s (%d) has been ranked up to rank {21DD00}'1'",PlayerName(killerid),killerid,GameTextForPlayer(killerid,"~r~Rank up",2500,1),SendClientMessageToAll(-1,str)); }
Re: Empty message in chat -
Sascha - 22.03.2014
https://sampwiki.blast.hk/wiki/Format
check out the example
AW: Empty message in chat -
Blackazur - 22.03.2014
And where is the mistake in my string?
Re: Empty message in chat -
Sascha - 22.03.2014
first one is in writing everything in one line, that really sucks to read...
second one:
you are calling the GameTextForPlayer and the SendClientMessage function WITHIN the "format"...
pawn Код:
if(pInfo[killerid][pKills] == 10)
{
pInfo[killerid][pRank] = 1;
format(str,sizeof(str),""chat""OLD_ADMINCMD" [RANK] %s (%d) has been ranked up to rank {21DD00}'1'",PlayerName(killerid),killerid);
GameTextForPlayer(killerid,"~r~Rank up",2500,1);
SendClientMessageToAll(-1,str);
}
AW: Empty message in chat -
CutX - 22.03.2014
Quote:
Originally Posted by Blackazur
Hello, why does this client message dont send instead a empty message comes into the chat?
Код:
if(pInfo[killerid][pKills] == 10) { pInfo[killerid][pRank] = 1,format(str,sizeof(str),""chat""OLD_ADMINCMD" [RANK] %s (%d) has been ranked up to rank {21DD00}'1'",PlayerName(killerid),killerid,GameTextForPlayer(killerid,"~r~Rank up",2500,1),SendClientMessageToAll(-1,str)); }
|
again?
didn't we fix this problem some days ago?
well, here, read it carefully + Sascha is right, pay more attention to the wiki
https://sampforum.blast.hk/showthread.php?tid=500556
weird... that time, you changed the topic and wrote "fixed"
but today we're here again, trying to solve the same problem.. again...