Empty message in chat
#1

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)); }
Reply
#2

https://sampwiki.blast.hk/wiki/Format
check out the example
Reply
#3

And where is the mistake in my string?
Reply
#4

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);
}
Reply
#5

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...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)