SendClientMessageToAll
#1

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
Reply
#2

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;
}
Reply
#3

lmfao i didnt see that >_>
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)