Also Immer wen ich meinen Server starte steht da
connecting 127.0.0.1 und dan Server dindt response
Ich habe Dini und (Frakhelp,was ich nich nicht brauch)
Script :
//Includes
#include <a_samp>
#include <dini>
//#include <frakhelp>
#include <a_samp>
#include <dini>
//#include <frakhelp>
//Farben
#define Grün 0x87FF00FF
#define Rot 0xEB0000FF
#define BLAU 0x0037FFFF
#define Grün 0x87FF00FF
#define Rot 0xEB0000FF
#define BLAU 0x0037FFFF
//Dialoge
#define DIALOG_REGISTRIERUNG 1
#define DIALOG_LOGIN 2
#define DIALOG_REGISTRIERUNG 1
#define DIALOG_LOGIN 2
main()
{
print("\n------------------------");
print(" Selfmade Script by CapriZ");
print("------------------------\n");
}
{
print("\n------------------------");
print(" Selfmade Script by CapriZ");
print("------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Selfmade Script by CapriZ");
AddPlayerClass(0,1669.1224,-1891.3588,13.5469,89.4340,0,0,0,0,0,0);//Spawn
return 1;
}
{
SetGameModeText("Selfmade Script by CapriZ");
AddPlayerClass(0,1669.1224,-1891.3588,13.5469,89.4340,0,0,0,0,0,0);//Spawn
return 1;
}
public OnGameModeExit()
{
return 1;
}
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,Grün,"Wilkommen auf dem Selfmade Server von CapriZ");
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(dini_Exists(Spielerdatei))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTRIERUNG,DIALOG_STYLE_PASSWORD,"Registrieren","Gib bitte das gewünschte Passwort ein:","Registrieren","Abbrechen");
}
return 1;
}
{
SendClientMessage(playerid,Grün,"Wilkommen auf dem Selfmade Server von CapriZ");
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(dini_Exists(Spielerdatei))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTRIERUNG,DIALOG_STYLE_PASSWORD,"Registrieren","Gib bitte das gewünschte Passwort ein:","Registrieren","Abbrechen");
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==DIALOG_LOGIN)
{
if(response==0)
{
SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
return 1;
}
else
{
Login(playerid,inputtext);
return 1;
}
}
}
if(dialogid==DIALOG_REGISTRIERUNG)
{
if(response==0)
{
SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug.");
ShowPlayerDialog(playerid,DIALOG_REGISTRIERUNG,DIALOG_STYLE_PASSWORD,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
return 1;
}
else
{
Register(playerid,inputtext);
{
if(dialogid==DIALOG_LOGIN)
{
if(response==0)
{
SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
return 1;
}
else
{
Login(playerid,inputtext);
return 1;
}
}
}
if(dialogid==DIALOG_REGISTRIERUNG)
{
if(response==0)
{
SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug.");
ShowPlayerDialog(playerid,DIALOG_REGISTRIERUNG,DIALOG_STYLE_PASSWORD,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
return 1;
}
else
{
Register(playerid,inputtext);
return 1;
}
}
}
}
}
}
return 1;
}
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
{
return 1;
}
//Stocks
stock Register(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_Create(Spielerdatei);
dini_Set(Spielerdatei,"Passwort",key);
SendClientMessage(playerid,Grün,"Du hast dir erfolgreich einen Account auf dem Server erstellt.");
SetPlayerScore(playerid,0);
SetPVarInt(playerid,"loggedin",1);
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_Create(Spielerdatei);
dini_Set(Spielerdatei,"Passwort",key);
SendClientMessage(playerid,Grün,"Du hast dir erfolgreich einen Account auf dem Server erstellt.");
SetPlayerScore(playerid,0);
SetPVarInt(playerid,"loggedin",1);
return 1;
}
}
stock Login(playerid,key[])
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
if(gettime()<dini_Int(Spielerdatei,"timeban"))
{
SendClientMessage(playerid,Rot,"Du bist noch auf dem [WoS]World-Of-Sanandreas[WoS] gebannt, komme zu einem späteren Zeitpunkt wieder.");
Kick(playerid);
return 1;
}
{
SendClientMessage(playerid,Rot,"Du bist noch auf dem [WoS]World-Of-Sanandreas[WoS] gebannt, komme zu einem späteren Zeitpunkt wieder.");
Kick(playerid);
return 1;
}
if(!strcmp(key,dini_Get(Spielerdatei,"Passwort"),false))
{
LoadAccount(playerid);
SendClientMessage(playerid,Grün,"Du hast dich erfolgreich eingeloggt.");
return 1;
}
else
{
SendClientMessage(playerid,Rot,"Das war das falsche Passwort.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden.\n Gib bitte das Passwort ein:","Login","Abbrechen");
return 1;
}
}
{
LoadAccount(playerid);
SendClientMessage(playerid,Grün,"Du hast dich erfolgreich eingeloggt.");
return 1;
}
else
{
SendClientMessage(playerid,Rot,"Das war das falsche Passwort.");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden.\n Gib bitte das Passwort ein:","Login","Abbrechen");
return 1;
}
}
stock LoadAccount(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
SetPVarInt(playerid,"Job",dini_Int(Spielerdatei,"Job"));
SetPVarInt(playerid,"Leader",dini_Int(Spielerdatei,"Leader"));
SetPVarInt(playerid,"Tutorial",dini_Int(Spielerdatei,"Tutorial"));
SetPVarInt(playerid,"FRank",dini_Int(Spielerdatei,"FRank"));
SetPVarInt(playerid,"Banned",dini_Int(Spielerdatei,"Banned"));
SetPVarInt(playerid,"PayTime",dini_Int(Spielerdatei,"PayTime"));
/* if(GetPVarInt(playerid,"Banned")==1)
{
SendClientMessage(playerid,Rot,"Dieser Account ist auf dem [WoS]World-Of-Sanandreas[WoS] gebannt.");
Kick(playerid);
}*/
SetPVarInt(playerid,"loggedin",1);
SetPVarInt(playerid,"Mute",dini_Int(Spielerdatei,"Mute"));
SetPVarInt(playerid,"Kills",dini_Int(Spielerdatei,"Kills"));
SetPVarInt(playerid,"Tode",dini_Int(Spielerdatei,"Tode"));
SetPVarInt(playerid,"Warns",dini_Int(Spielerdatei,"Warns"));
return 1;
}
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
SetPVarInt(playerid,"Job",dini_Int(Spielerdatei,"Job"));
SetPVarInt(playerid,"Leader",dini_Int(Spielerdatei,"Leader"));
SetPVarInt(playerid,"Tutorial",dini_Int(Spielerdatei,"Tutorial"));
SetPVarInt(playerid,"FRank",dini_Int(Spielerdatei,"FRank"));
SetPVarInt(playerid,"Banned",dini_Int(Spielerdatei,"Banned"));
SetPVarInt(playerid,"PayTime",dini_Int(Spielerdatei,"PayTime"));
/* if(GetPVarInt(playerid,"Banned")==1)
{
SendClientMessage(playerid,Rot,"Dieser Account ist auf dem [WoS]World-Of-Sanandreas[WoS] gebannt.");
Kick(playerid);
}*/
SetPVarInt(playerid,"loggedin",1);
SetPVarInt(playerid,"Mute",dini_Int(Spielerdatei,"Mute"));
SetPVarInt(playerid,"Kills",dini_Int(Spielerdatei,"Kills"));
SetPVarInt(playerid,"Tode",dini_Int(Spielerdatei,"Tode"));
SetPVarInt(playerid,"Warns",dini_Int(Spielerdatei,"Warns"));
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
dini_IntSet(Spielerdatei,"Tutorial",GetPVarInt(playerid,"Tutorial"));
dini_IntSet(Spielerdatei,"Geld",GetPVarInt(playerid,"Geld"));
dini_IntSet(Spielerdatei,"Level",GetPVarInt(playerid,"Level"));
dini_IntSet(Spielerdatei,"Banned",GetPVarInt(playerid,"Banned"));
dini_IntSet(Spielerdatei,"timeban",GetPVarInt(playerid,"timeban"));
dini_IntSet(Spielerdatei,"Mute",GetPVarInt(playerid,"Mute"));
dini_IntSet(Spielerdatei,"Kills",GetPVarInt(playerid,"Kills"));
dini_IntSet(Spielerdatei,"Tode",GetPVarInt(playerid,"Tode"));
dini_IntSet(Spielerdatei,"Warns",GetPVarInt(playerid,"Warns"));
dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
dini_IntSet(Spielerdatei,"Job",GetPVarInt(playerid,"Job"));
dini_IntSet(Spielerdatei,"Leader",GetPVarInt(playerid,"Leader"));
dini_IntSet(Spielerdatei,"FRank",GetPVarInt(playerid,"FRank"));
dini_IntSet(Spielerdatei,"PayTime",GetPVarInt(playerid,"PayTime"));
}
return 1;
}
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
dini_IntSet(Spielerdatei,"Tutorial",GetPVarInt(playerid,"Tutorial"));
dini_IntSet(Spielerdatei,"Geld",GetPVarInt(playerid,"Geld"));
dini_IntSet(Spielerdatei,"Level",GetPVarInt(playerid,"Level"));
dini_IntSet(Spielerdatei,"Banned",GetPVarInt(playerid,"Banned"));
dini_IntSet(Spielerdatei,"timeban",GetPVarInt(playerid,"timeban"));
dini_IntSet(Spielerdatei,"Mute",GetPVarInt(playerid,"Mute"));
dini_IntSet(Spielerdatei,"Kills",GetPVarInt(playerid,"Kills"));
dini_IntSet(Spielerdatei,"Tode",GetPVarInt(playerid,"Tode"));
dini_IntSet(Spielerdatei,"Warns",GetPVarInt(playerid,"Warns"));
dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
dini_IntSet(Spielerdatei,"Job",GetPVarInt(playerid,"Job"));
dini_IntSet(Spielerdatei,"Leader",GetPVarInt(playerid,"Leader"));
dini_IntSet(Spielerdatei,"FRank",GetPVarInt(playerid,"FRank"));
dini_IntSet(Spielerdatei,"PayTime",GetPVarInt(playerid,"PayTime"));
}
return 1;
}
Danke im Vorraus