14.02.2011, 11:00
The server always crashes when a player connect's. The code is
OnPlayerConnect
OnPlayerConnect
pawn Код:
public OnPlayerConnect(playerid)
{
format(stringZ, sizeof(stringZ), "Gangs/Spieler/%s.ini", Spieler(playerid));
if(dini_Exists(stringZ)){OnGangLogin(playerid);}
else{
new File: hFile = fopen(stringZ, io_write);
if (hFile)
{
new var[32];
format(var, 32, "gang_member=%d\n", SpielerDatei[playerid][gang_member]);fwrite(hFile, var);
format(var, 32, "gang_leader=%d\n",SpielerDatei[playerid][gang_leader]);fwrite(hFile, var);
format(var, 32, "gang_rank=%d\n",SpielerDatei[playerid][gang_rank]);fwrite(hFile, var);
}
fclose(hFile);
OnGangLogin(playerid);
}
return 1;
}