07.08.2011, 21:01
No, you need to declare a string where you will store the formatted string, the correct way is:
EDIT: fixed code now, I didn't see that the playername array was missing.
pawn Код:
new IPString[16], string[128] playername[MAX_PLAYER_NAME]; // Declare a new array for storing the formatted string
GetPlayerIp(playerid, IPString, sizeof(IPString));
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s has joined the server. IP: %s", playername, IPString);
SendClientMessage(playerid, WHITE, string);