08.04.2013, 13:08
Hi. I don't know it's an bug or maybe I'm doing something wrong. Further - I've this code:
If I'm try to connect, I see this message, but the server immediately shuts down, but only, if I have "sprintf..." in code. I tried change SendPlayerMessageToAll to SendClientMessageToAll - the same problem, server immediately shutting down.
How to fix it?
pawn Code:
extern "C"
{
bool __stdcall OnPlayerConnect(int playerid)
{
int giveplayerid;
char join[144];
SendClientMessage(playerid, COLOR_GREEN, "Hello.");
sprintf(join, "%s joined to us. IP: %s", giveplayerid, ReturnIP(giveplayerid));
SendPlayerMessageToAll(giveplayerid, join);
return true;
}
}
How to fix it?