17.09.2012, 18:18
Hi! My code below crashes my server, why Please answer me, I'm waiting for your response )
pawn Код:
#include <a_samp>
public OnPlayerConnect(playerid)
{
new File:playerinfos, pntFinal[256], pntName[MAX_PLAYER_NAME+1], pntIp[16];
GetPlayerName(playerid,pntName,sizeof(pntName));
GetPlayerIp(playerid,pntIp,sizeof(pntIp));
format(pntFinal,sizeof(pntFinal),"Name: %s | ",pntName);
format(pntFinal,sizeof(pntFinal),"%sIP: %s | ",pntFinal,pntIp);
playerinfos = fopen("playerinfos.txt",io_write);
fwrite(playerinfos,pntFinal);
fclose(playerinfos);
return 1;
}