SendClientMessage Error
#2

You need to format the string before using those %s's and %d's...
SendClientMessage is to send a string..
format is to put these variables and other strings inside it.
pawn Код:
new pname[MAX_PLAYER_NAME], string[128];
GetPlayerName(killerid, pname, sizeof(pname));
GivePlayerMoney(playerid, -500);
format(string, sizeof(string), "[Killed]: Player %s has killed you! You've lost 500 Cash!", pname);
SCM(playerid, COLOR_GREEN, string); // sending the formatted string..
Reply


Messages In This Thread
SendClientMessage Error - by ChandraLouis - 01.03.2014, 04:30
Re: SendClientMessage Error - by SyntaxQ - 01.03.2014, 04:43
Re: SendClientMessage Error - by ChandraLouis - 01.03.2014, 04:49

Forum Jump:


Users browsing this thread: 1 Guest(s)