SendClientMessageToAll - 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: SendClientMessageToAll (
/showthread.php?tid=171893)
SendClientMessageToAll -
FireCat - 28.08.2010
i have sendclientmessage to all but it dosnt appear
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == cash) GivePlayerMoney(playerid,500000);
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
SendClientMessageToAll(COLOR_RED, string);
format(string, sizeof(string), "%s has completed the parkour mission and received 500000$",name);
return 1;
}
it gives the money and stuff but message wont appear

why?!

_______________________
[GDZ]leader
Re: SendClientMessageToAll -
[XST]O_x - 28.08.2010
Because you firstly send the string to everyone as a client message(empty string) and only then formatting it.
Switch the lines:
pawn Код:
format(string, sizeof(string), "%s has completed the parkour mission and received 500000$",name);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
Re: SendClientMessageToAll -
FireCat - 28.08.2010
lmfao i didnt see that >_>