Moin,
Ich habe ein sehr skurrilen fall, es geht darum das meine Fahrzeuge vom Server verschwinden soweit jemand Disconnected.
Wenn jemand fragen hat oder Tipps bitte schreibt.
hier die OnPlayerDisconnect
Code
public OnPlayerDisconnect(playerid, reason)
{ KillTimer(LoseHealthTimer[playerid]); KillTimer(DashcamTimer[playerid]); KillTimer(FischTimer[playerid]); KillTimer(WaitToFindTimer[playerid]); DeletePVar(playerid,"SchwarzmarktHackGemacht"); if(GetPVarInt(playerid,"AdminDuty") > 0) { DestroyDynamic3DTextLabel(AdmDutyLabel[playerid]); DeletePVar(playerid,"AdminDuty");
} if(GetPVarInt(playerid,"FSchein") != 0 && GetPVarInt(playerid,"NotKickFahrschulDesyncs") < 1 && GetPVarInt(playerid,"HatFahrschulCar") == 1) {
if(schulung[playerid] != 0)
{
new fahrzeug = GetPVarInt(playerid,"FahrschulCar");
schulung[playerid] = 0;
FahrschulCar[fahrzeug] = 0;
DestroyDynamic3DTextLabel(FahrzeugInfo[fahrzeug][fLabel]);
FahrzeugInfo[fahrzeug][fLabel] = Text3D:INVALID_3DTEXT_ID;
DeleteVehicle(fahrzeug);
} } if(GetPVarInt(playerid,"TelefoniertMit") > 0 || GetPVarInt(playerid,"RuftGeradeAn") > 0) { new pID = 0; if(GetPVarInt(playerid,"TelefoniertMit") > 0){pID = GetPVarInt(playerid,"TelefoniertMit");} else if(GetPVarInt(playerid,"RuftGeradeAn") > 0){pID = GetPVarInt(playerid,"RuftGeradeAn");}
SendClientMessage(playerid,COLOR_YELLOW,"[Handy]: {FFFFFF}Aufgelegt.");
SendClientMessage(GetPVarInt(playerid,"TelefoniertMit"),COLOR_YELLOW,"[Handy]: {FFFFFF}Aufgelegt.");
DeletePVar(playerid,"RuftGeradeAn");
DeletePVar(playerid,"WirdAngerufen");
DeletePVar(playerid,"TelefoniertMit");
DeletePVar(playerid,"WirdAngerufen");
DeletePVar(pID,"RuftGeradeAn");
DeletePVar(pID,"WirdAngerufen");
//for(new i=0;i<6;i++){ PlayerTextDrawDestroy(playerid,RACEdraw[playerid][i]);
DeletePVar(pID,"TelefoniertMit");
DeletePVar(pID,"WirdAngerufen");
KillTimer(AnrufenTimer[playerid]); KillTimer(AnrufenTimer[pID]);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
SetPlayerSpecialAction(pID, SPECIAL_ACTION_STOPUSECELLPHONE);
}
new string[264];
format(string,sizeof(string),"UPDATE `accounts` SET `Online`='0' WHERE `Name`='%s'", SpielerInfo[playerid][sName]);
mysql_query(string);
SaveAccount(playerid); SavePrivatCar(playerid); SavePlayerWeapons(playerid); if(!IsPlayerNPC(playerid) && GetPVarInt(playerid,"LoggedIn") == 1)
{
switch(reason)
{
case 0: format(string,sizeof string,"%s %s hat den Server verlassen. (Timeout)",AdminName(playerid),SpielerInfo[playerid][sName]);
case 1: format(string,sizeof string,"%s %s hat den Server verlassen. (Verlassen)",AdminName(playerid),SpielerInfo[playerid][sName]);
case 2: format(string,sizeof string,"%s %s hat den Server verlassen. (Kick/Ban)",AdminName(playerid),SpielerInfo[playerid][sName]);
}
SendICPMessage(string);
new query[128];
format(query, sizeof(query), "INSERT INTO `accplaytime` (`Name`, `PlayedTime`) VALUES ('%s', '%d')", SpielerInfo[playerid][sName],SpielerInfo[playerid][sPlayedTimeToday]);
mysql_query(query);
} DestroyVars(playerid); GlobalVars[AktuellClients]--;
return 1;
}
Alles anzeigen