How to: add value into SendClientMessage?
#1

Hi,

I know this is maybe a silly questions but how do you add a value into a "SendClientMessage"?

I have looked on ****** and other bits of script but I can't find anything, is it even possible??

I have tried doing this: (But it didn't work)
Код:
SendClientMessage(killerid,COLOR_RED, "You killed a person with ", GetPlayerWantedLevel(playerid)  ," wanted level");
Thanks!
Reply
#2

go to the wiki and search for format
Reply
#3

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
go to the wiki and search for format
I tried a few time otherwise I wouldn't have posted here
Reply
#4

new string[128]; // under the OnPlayerDeath callback
format(string, 128, "You killed a person with %i wanted level!", GetPlayerWantedLevel(playerid));
SendClientMessage(killerid, COLOR_RED, string);

I think its works.
Reply
#5

Quote:
Originally Posted by sheepondrugs
Посмотреть сообщение
I tried a few time otherwise I wouldn't have posted here
Then you obviously didn't try hard enough.. the format example at the wiki is so explaining .. even my little brother could do it and he can't even read.
Reply
#6

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Then you obviously didn't try hard enough.. the format example at the wiki is so explaining .. even my little brother could do it and he can't even read.
I didn't ask for an explanation, I asked nicely for the the code snipplet.

I guess I would have been better getting an intellectual reply from your brother..
Reply
#7

Quote:
Originally Posted by sheepondrugs
Посмотреть сообщение
I didn't ask for an explanation, I asked nicely for the the code snipplet.

I guess I would have been better getting an intellectual reply from your brother..
Nope, you asked how it's done.. i refereed you to the wiki page as explains the format function pretty well..

if you want to request snippet's do that in the script request section.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)