Hallo Ihr!
Habe in meinem aktuellem Script das verdammt große Problem, dass ich der Server schließt, sobald irgendein beliebiger User den Server verlässt. Ich habe echt null Ahnung, woran das liegen könnte!
Hier mal mein OnPlayerDisconnect, evtl. hilft es ja:
Code
public OnPlayerDisconnect(playerid, reason)
{
//=========================================HANDYSYSTEM ======================================
SetPVarInt(playerid,"Call",-1);
SetPVarInt(playerid,"Anrufer",-1);
SetPVarInt(playerid,"Handystatus",1);
//======================================HANDYSYSTEM ENDE==================================
//==========================================CLUB INGAME==========================================
new name[MAX_PLAYER_NAME];
new file[25];
format(file, sizeof(file), "%s.ini",GetPlayerName(playerid,name,sizeof(name)));
if(!fexist(file))
{
dini_Create(file);
}
//============================================CLUB INGamE ENDE============================================
//=========================================BLITZER SYSTEM=========================================
RemoveBlitzer(playerid);
//======================================BLITZER SYSTEM ENDE============================================
//==========================================AFK SYSTEM=======================================
if(Desktop_Timer_Started[playerid] == 1) { KillTimer(Desktop_Timer[playerid]); }
Delete3DTextLabel(Desktop_SHOW[playerid]);
//=========================================AFK SYSTEM ENDE==================================
Delete3DTextLabel(TextLabelAdmLevel1[playerid]);
Delete3DTextLabel(TextLabelAdmLevel2[playerid]);
Delete3DTextLabel(TextLabelAdmLevel3[playerid]);
Delete3DTextLabel(TextLabelAdmLevel4[playerid]);
Delete3DTextLabel(TextLabelAdmLevel5[playerid]);
//============================================fisch SYSTEM=================================f
Wurmer[playerid] = 0; fischingZeug[playerid] = 0; Fischtgerade[playerid] = 0;
fisches[playerid] = 0; fischGewicht[playerid] = 0; hatschongefischt[playerid] = 0;
//============================================fisch SYSTEM=================================
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,Datum);
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,TextdrawOpen);
DestroyVehicle(Kart[playerid]);
new Spielerdatei[256];
dini_IntSet(Spielerdatei,"Wanted",GetPlayerWantedLevel(playerid));
dini_IntSet(Spielerdatei,"Skin",GetPlayerSkin(playerid));
dini_IntSet(Spielerdatei,"Member",GetPVarInt(playerid,"Member"));
dini_IntSet(Spielerdatei,"Leader",GetPVarInt(playerid,"Leader"));
SetPVarInt(playerid,"Member",-255);
SetPVarInt(playerid,"Leader",0);
DeleteTicket(playerid);
RemovePlayerAttachedObject(playerid, 1);
//================================================AUTOHAUS==============================
new dateiname[MAX_PLAYER_NAME+4];
new playername[MAX_PLAYER_NAME];
new var[256];
GetPlayerName(playerid, playername, sizeof(playername));
format(dateiname, sizeof(dateiname), "Autos/%s.car", playername);
new File: CarFile = fopen(dateiname, io_write);
format(var, 256, "AH_Typ=%i\n", AutosL[playerid][Typ]); fwrite(CarFile, var);
format(var, 256, "AH_X=%f\n", AutosL[playerid][X]); fwrite(CarFile, var);
format(var, 256, "AH_Y=%f\n", AutosL[playerid][Y]); fwrite(CarFile, var);
format(var, 256, "AH_Z=%f\n", AutosL[playerid][Z]); fwrite(CarFile, var);
format(var, 256, "AH_Rot=%f\n", AutosL[playerid][Rotation]); fwrite(CarFile, var);
format(var, 256, "AH_Status=%i\n", AutosL[playerid][Status]); fwrite(CarFile, var);
format(var, 256, "AH_Lock=%i\n", AutosL[playerid][Lock]); fwrite(CarFile, var);
format(var, 256, "AH_Paintjob=%i\n", AutosL[playerid][Paintjob]); fwrite(CarFile, var);
format(var, 256, "AH_Farbe1=%i\n", AutosL[playerid][Farbe1]); fwrite(CarFile, var);
format(var, 256, "AH_Farbe2=%i\n", AutosL[playerid][Farbe2]); fwrite(CarFile, var);
format(var, 256, "AH_mod1=%i\n", AutosL[playerid][mod1]); fwrite(CarFile, var);
format(var, 256, "AH_mod2=%i\n", AutosL[playerid][mod2]); fwrite(CarFile, var);
format(var, 256, "AH_mod3=%i\n", AutosL[playerid][mod3]); fwrite(CarFile, var);
format(var, 256, "AH_mod4=%i\n", AutosL[playerid][mod4]); fwrite(CarFile, var);
format(var, 256, "AH_mod5=%i\n", AutosL[playerid][mod5]); fwrite(CarFile, var);
format(var, 256, "AH_mod6=%i\n", AutosL[playerid][mod6]); fwrite(CarFile, var);
format(var, 256, "AH_mod7=%i\n", AutosL[playerid][mod7]); fwrite(CarFile, var);
format(var, 256, "AH_mod8=%i\n", AutosL[playerid][mod8]); fwrite(CarFile, var);
format(var, 256, "AH_mod9=%i\n", AutosL[playerid][mod9]); fwrite(CarFile, var);
format(var, 256, "AH_mod10=%i\n", AutosL[playerid][mod10]); fwrite(CarFile, var);
format(var, 256, "AH_mod11=%i\n", AutosL[playerid][mod11]); fwrite(CarFile, var);
format(var, 256, "AH_mod12=%i\n", AutosL[playerid][mod12]); fwrite(CarFile, var);
format(var, 256, "AH_mod13=%i\n", AutosL[playerid][mod13]); fwrite(CarFile, var);
format(var, 256, "AH_mod14=%i\n", AutosL[playerid][mod14]); fwrite(CarFile, var);
format(var, 256, "AH_mod15=%i\n", AutosL[playerid][mod15]); fwrite(CarFile, var);
format(var, 256, "AH_mod16=%i\n", AutosL[playerid][mod16]); fwrite(CarFile, var);
format(var, 256, "AH_mod17=%i\n", AutosL[playerid][mod17]); fwrite(CarFile, var);
fclose(CarFile);
if(AutosL[playerid][Carid]!=-1)
{
SetVehicleParamsForAll(AutosL[playerid][Carid],0,0);
DestroyVehicle(AutosL[playerid][Carid]);
AutosL[playerid][Carid]=-1;
}
if (BesuchtAuto[playerid][0]!=-1)
{
SetVehicleParamsForAll(Autoszukaufen[BesuchtAuto[playerid][0]][Carid],0,0);
BesuchtAuto[playerid][0]=-1;
}
//======================================AUTOHAUS ENDE=======================================
if(GetPVarInt(playerid,"loggedin")==1)
{
SpielerSpeichern(playerid);
}
return 1;
}
Alles anzeigen
Vielen Dank im Voraus!
Mit freundlichen Grüßen
Frosty