SA-MP Forums Archive
little question - 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: little question (/showthread.php?tid=625125)



little question - KNIGHT786 - 28.12.2016

hi guys i have these code if (playerData[playerid][playerMuteTime] != 0)
{
new message[128];
format(message, sizeof(message), "{FFDC2E}[MUTED] {#ff69b4}You are muted for another {FFDC2E}%i {FFFFFF}seconds and cannot talk!", playerData[playerid][playerMuteTime]);
SendClientMessage(playerid, COLOR_WHITE, message);
return 0;
and i want to share this line [%i has muted by server admin %i for %i sec] how to do this


Re: little question - BiosMarcel - 28.12.2016

i am assuming you don't want this to be output every time he tries to write, do you?

If you do, just add a "SendClientMessageToAll" , you need the variables somehow tho.

If you want to do it on your mute command, you should have all the variables anyways, jsut build the string and send it to all players.


Re: little question - KNIGHT786 - 28.12.2016

hehehe how to build the string can u send me a build string


Re: little question - ChristolisTV - 28.12.2016

With all the resources you gave I could make this:

PHP код:
if (playerData[playerid][playerMuteTime] != 0)
{
   new 
message[128], message2[128], pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME];
   
GetPlayerName(playeridpNamesizeof(pName));
   
GetPlayerName(playeridtNamesizeof(tName));
   
format(messagesizeof(message), "{FFDC2E}[MUTED] {#ff69b4}You are muted for another {FFDC2E}%i{FFFFFF}seconds and cannot talk!"playerData[playerid][playerMuteTime]);
   
SendClientMessage(playeridCOLOR_WHITEmessage);
   
format(message2sizeof(message2), "%s is muted by %s for %i seconds!"tNamepNameplayerData[playerid][playerMuteTime]);
   
SendClientMessageToAll(-1message2); 
   return 
0;




Re: little question - KNIGHT786 - 28.12.2016

thnx man rep+