wenn spieler disconectet speichert der spieler sich nicht hier ist einer quell code:
public OnPlayerDisconnect(playerid, reason)
{
//Interview
SavePlayer(playerid);
TalkingLive[playerid] = 255; LiveOffer[playerid] = 999;
//
SetTimer("HideDiscInfo", TIME_to_HIDE, false);
KillTimer(khtimer[playerid]);
KillTimer(pilottimer[playerid]);
DestroyVehicle(startbmx[playerid]);
DestroyVehicle(SupCar[playerid]);
OnPlayerCarUpdate(playerid);
KillTimer(jetpack_timer[playerid]);
KillTimer(armor_timer[playerid]);
KillTimer(health_timer[playerid]);
KillTimer(check_timer[playerid]);
Spieler[playerid][Eingeloggt] = 0;
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessage(GetChased[playerid], ROT, "Auftragsperson hat den Server verlassen.");
}
}
}
SavePlayer(playerid);
//hzaus system
TextDrawDestroy(LockTD0[playerid]);
TextDrawDestroy(LockTD1[playerid]);
TextDrawDestroy(LockTD2[playerid]);
TextDrawDestroy(LockTD3[playerid]);
TextDrawDestroy(LockTD4[playerid]);
TextDrawDestroy(LockTD5[playerid]);
TextDrawDestroy(LockTD6[playerid]);
TextDrawDestroy(hUp[playerid]);
TextDrawDestroy(Phone0[playerid]);
TextDrawDestroy(Phone1[playerid]);
TextDrawDestroy(Phone2[playerid]);
TextDrawDestroy(Phone3[playerid]);
TextDrawDestroy(Phone4[playerid]);
TextDrawDestroy(Phone5[playerid]);
new
pFile[35];
format(pFile, 35, FILE_FOR_PLAYER, GetName(playerid));
new
INI:UserFile = INI_Open(pFile);
INI_WriteFloat(UserFile, "pSpawnX", Spieler[playerid][SpawnX]);
INI_WriteFloat(UserFile, "pSpawnY", Spieler[playerid][SpawnY]);
INI_WriteFloat(UserFile, "pSpawnZ", Spieler[playerid][SpawnZ]);
INI_WriteInt(UserFile, "pSpawn", Spieler[playerid][Spawn]);
INI_WriteInt(UserFile, "pSpawnInt", Spieler[playerid][SpawnInt]);
INI_WriteInt(UserFile, "pVW", Spieler[playerid][SpawnVW]);
INI_WriteInt(UserFile, "RobHouse", Spieler[playerid][RobHouse]);
INI_WriteInt(UserFile, "HouseID", Spieler[playerid][Houseid]);
INI_WriteInt(UserFile, "Bill", Spieler[playerid][Min]);
INI_Close(UserFile);
//ende
SavePlayer(playerid);
return 1;
}
aber wenn ich /saveme machen schon quell code:
ocmd:saveme(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
OnPlayerCarUpdagrade(playerid);
SavePlayer(playerid);
//SpielerSpeichern(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Der Account wurde gespeichert");
return 1;
}
return 1;
}
Danke im voraus
Mit Freundlischen Grüßen
riesensika