SA-MP Forums Archive
Message to all help.. - 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: Message to all help.. (/showthread.php?tid=184888)



Message to all help.. - Brickwood - 22.10.2010

Hey, I want to be able to send a message to everyone when someone gets a kill streak.
Currently, I had a message to tell the killer they have a kill streak, but this was just for testing purposes.
Quote:

new string[MAX_PLAYER_NAME];
new plrname[MAX_PLAYER_NAME];
GetPlayerName(killerid, plrname, sizeof(plrname));
format(string, sizeof(string), "%s got 15 kills in a row!", plrname);
SendClientMessage(killerid, 0xFFFFFFAA, string);

How do I change it from SendClientMessage to SendClientMessageToAll and make it all work just like it is above?

Thankyou very much!


Re: Message to all help.. - Babul - 22.10.2010

simply replace
Код:
SendClientMessage(killerid, 0xFFFFFFAA, string);
with
Код:
SendClientMessageToAll(0xFFFFFFAA, string);



Re: Message to all help.. - PixeledNinja - 22.10.2010

Hopefully this is just your message you are sending, I don't see any calculations there to check if the person actually got 15 kills.


Re: Message to all help.. - Brickwood - 22.10.2010

Quote:
Originally Posted by Babul
Посмотреть сообщение
simply replace
Код:
SendClientMessage(killerid, 0xFFFFFFAA, string);
with
Код:
SendClientMessageToAll(0xFFFFFFAA, string);
Thankyou! Forgot it was that simple.

Quote:
Originally Posted by PixeledNinja
Посмотреть сообщение
Hopefully this is just your message you are sending, I don't see any calculations there to check if the person actually got 15 kills.
Yeah, don't worry, it's all good.