SendClientMessageToAll doesnt work
#2

pawn Код:
format(string, sizeof(string), "%s(%s): %s", GetPlayerName(playerid), GetPlayerID(playerid), text);
The players ID is an integer, not a string, try this:

pawn Код:
new playername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "%s(%i): %s", playername, playerid, text);
SendClientMessageToAll(COLOR_WHITE,string);
- Theres no need for GetPlayerID, since 'playerid' is exactly the same.
- GetPlayerName doesn't work like you did, but I fixed it for you.
Reply


Messages In This Thread
SendClientMessageToAll doesnt work - by CalvinC - 27.12.2014, 12:56
Re: SendClientMessageToAll doesnt work - by jackx3rx - 27.12.2014, 12:57
Re: SendClientMessageToAll doesnt work - by Glossy42O - 27.12.2014, 12:58
Re: SendClientMessageToAll doesnt work - by CalvinC - 27.12.2014, 13:05
Re: SendClientMessageToAll doesnt work - by jackx3rx - 27.12.2014, 13:15
Re: SendClientMessageToAll doesnt work - by CalvinC - 27.12.2014, 13:33
Re: SendClientMessageToAll doesnt work - by jackx3rx - 27.12.2014, 13:36
Re: SendClientMessageToAll doesnt work - by CalvinC - 27.12.2014, 14:20
Re: SendClientMessageToAll doesnt work - by JaydenJason - 27.12.2014, 14:26
Re: SendClientMessageToAll doesnt work - by Facerafter - 27.12.2014, 14:29

Forum Jump:


Users browsing this thread: 1 Guest(s)