17.09.2012, 19:30
(
Последний раз редактировалось BlackAtom; 17.09.2012 в 20:20.
)
Hi! The code below works on Windows, but on Linux doesn't write to file (because I host my server on Linux) Whyy??
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 | %sIP: %s",pntName,pntIp);
playerinfos = fopen("playerinfos.txt", io_write);
if (playerinfos)
{
fwrite(playerinfos, pntFinal);
fclose(playerinfos);
}
return 1;
}