23.08.2009, 17:48
When a player disconnects on my server, my server crashes and it's notified on linux shell - konsole:
Here is my OnPlayerDisconnect:
I hop get some help
Код:
samp: amx/amxfile.c:101 fgets_cell: Assertion 'fp!=((avoid *)0)' failed.
Код:
public OnPlayerDisconnect(playerid, reason) { if (Logged[playerid]) { dUserSetINT(PlayerName(playerid)).("Money",GetPlayerMoney(playerid)); dUserSetINT(PlayerName(playerid)).("Rcash",GetPlayerEuro(playerid)); dUserSetINT(PlayerName(playerid)).("Admin",GetPlayerAdminLvl(playerid)); dUserSetINT(PlayerName(playerid)).("Job",GetPlayerJobID(playerid)); dUserSetINT(PlayerName(playerid)).("WL",GetWeaponLicence(playerid)); dUserSetINT(PlayerName(playerid)).("Activity",GetPlayerAct(playerid)); dUserSetINT(PlayerName(playerid)).("Cps",GetPlayerCps(playerid)); dUserSetINT(PlayerName(playerid)).("CP",GetPlayerCP(playerid)); dUserSetINT(PlayerName(playerid)).("Hit",GetPlayerHit(playerid)); dUserSetINT(PlayerName(playerid)).("Ppoints",GetPlayerPP(playerid)); dUserSetINT(PlayerName(playerid)).("Banned",GetPlayerBan(playerid)); dUserSetINT(PlayerName(playerid)).("Suspect",GetPlayerSuspect(playerid)); dUserSetINT(PlayerName(playerid)).("Jailed",GetPlayerJail(playerid)); new Float:x,Float:y,Float:z; new IP[50]; GetPlayerIp(playerid, IP, sizeof IP); GetPlayerPos(playerid,x,y,z); dUserSet(PlayerName(playerid)).("IP",IP); dUserSetINT(PlayerName(playerid)).("x",floatround(x)); dUserSetINT(PlayerName(playerid)).("y",floatround(y)); dUserSetINT(PlayerName(playerid)).("z",floatround(z)); dUserSetINT(PlayerName(playerid)).("Interior",GetPlayerInterior(playerid)); if(Skin[playerid]>1) { dUserSetINT(PlayerName(playerid)).("Skin",Skin[playerid]); } SaveWeapons(playerid); SavePlayerInventoryToFile(playerid); } return 1; }