hallo ich habe ein dini system gescriptet aber ich kann es nicht testen weil immer wenn ich connecten will geht sampserver aus
naja hier ist es ich wollt eigentlich in den showroom hochladen aber so gehts ja auch xD
#include <a_samp>
#include <dini>
#include <a_players>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ZSaver by Zerorapper ");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
new Float:X, Float:Y, Float:Z;
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
new file[64]; format(file,sizeof(file),"ZSaver/%s.txt",name);
X = dini_Float(file, "F_X");
Y = dini_Float(file, "F_Y");
Z = dini_Float(file, "F_Z");
if(dini_Exists(file))
{
SetPlayerPos(playerid, X, Y, Z);
SetPlayerFacingAngle(playerid,dini_Int(file,"Guckrichtung"));
GivePlayerMoney(playerid,dini_Int(file,"Geld"));
SetPlayerScore(playerid,dini_Int(file,"Score"));
SetPlayerSkin(playerid,dini_Int(file,"Skin"));
SetPlayerHealth(playerid,dini_Int(file,"Leben"));
SetPlayerArmour(playerid,dini_Int(file,"Schusssichere Weste"));
SetPlayerInterior(playerid,dini_Int(file,"Interior"));
}
else
{
dini_Create(file);
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
new Float:X, Float:Y, Float:Z;
new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name));
new file[64]; format(file,sizeof(file),"ZSaver/%s.txt",name);
GetPlayerPos(playerid, X, Y, Z);
dini_IntSet(file,"Geld",GetPlayerMoney(playerid));
dini_IntSet(file,"Score",GetPlayerScore(playerid));
dini_IntSet(file,"Skin",GetPlayerSkin(playerid));
dini_IntSet(file,"Leben",GetPlayerHealth(playerid));
dini_IntSet(file,"Schusssichere Weste",GetPlayerArmour(playerid));
dini_IntSet(file,"Interior",GetPlayerInterior(playerid));
dini_IntSet(file,"Guckrichtung",GetPlayerFacingAngle(playerid));
dini_FloatSet(file, "F_X", X);
dini_FloatSet(file, "F_Y", Y);
dini_FloatSet(file, "F_Z", Z);
return 1;
}
aber warum geht es nicht ??