ich habe ein paar fehler in meinem script dabei bhab ich alles genaus gemacht wie in einem tutotail von dieser seite
hier der link zu meinem problem
ich habe ein paar fehler in meinem script dabei bhab ich alles genaus gemacht wie in einem tutotail von dieser seite
hier der link zu meinem problem
Hier müsste es jetz villt Funktionieren:
#define DIALOG_LOGIN 1
#define DIALOG_REGISTER 2
Das hier zu OnPlayerConnect:
new PlayerData[64];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(PlayerData,sizeof(PlayerData),"Accounts/%s.ini",playername);
if(dini_Exists(PlayerData))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Log In Vorgang","Dein Account wurde gefunden!\nBitte gib nun dein Passwort ein:","Log In","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrations Vorgang","Willkommen auf unserem Server!\nbitte gib nun dein gewünschtes Passwort ein :","Register","Abbrechen");
}
if(GetPVarInt(playerid,"Health"))
{
new health;
SetPlayerHealth(playerid,health);
}
return 1;
}
Das hier zu OnPlayerDissconect:
new pname[MAX_PLAYER_NAME], path[200];
GetPlayerName(playerid, pname, sizeof(pname));
format(path, sizeof(path), "/Accounts/%s.ini", pname);
dini_IntSet(path, "geld", GetPlayerMoney(playerid));
return 1;
}
Das hier zu OnDialogReponse:
if(dialogid==DIALOG_REGISTER)
{
if(response==0)
{
SendClientMessage(playerid,rot,"Du hast den Registrations Vorgang abgebrochen!");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,orange,"Dein eingegebenes Passwort war nicht lang genug! Bitte gib ein größeres ein.");
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrations Vorgang","Willkommen auf unserem Server!\nbitte gib nun dein gewünschtes Passwort ein :","Register","Abbrechen");
return 1;
}
else
{
Register(playerid,inputtext);
return 1;
}
}
}
if(dialogid==DIALOG_LOGIN)
{
if(response==0)
{
SendClientMessage(playerid,rot,"Du hast den Log In Vorgang abgebrochen!");
Kick(playerid);
return 1;
}
if(response==1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid,orange,"Dein eingegebenes Passwort war nicht lang genug!");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Log In Vorgang","Dein Account wurde gefunden!\nBitte gib nun dein Passwort ein:","Log In","Abbrechen");
return 1;
}
else
{
Login(playerid,inputtext);
return 1;
}
}
}
return 1;
}
Das irgendwo Einfügen:
stock Login(playerid,key[])
{
new PlayerData[64];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(PlayerData,sizeof(PlayerData),"Accounts/%s.ini",playername);
if(!strcmp(key,dini_Get(PlayerData,"Passwort"),false))
{
PlayerDataLaden(playerid);
SendClientMessage(playerid,gelb,"Erfolgreich eingeloggt.");
return 1;
}
else
{
SendClientMessage(playerid,rot,"Du hast ein falsches Passwort eingegeben!");
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Log In Vorgang","Dein Account wurde gefunden!\nBitte gib nun dein Passwort ein:","Log In","Abbrechen");
return 1;
}
}
Und das hier Irgendwo hinzufügen:
stock Register(playerid,key[])
{
new PlayerData[64];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(PlayerData,sizeof(PlayerData),"Accounts/%s.ini",playername);
dini_Create(PlayerData);
dini_Set(PlayerData,"Passwort",key);
SendClientMessage(playerid,gelb,"Erfolgreich registriert.");
SetPlayerScore(playerid,0);
GivePlayerMoney(playerid,10000);
dini_IntSet(PlayerData,"Adminlevel",0);
dini_IntSet(PlayerData,"Fraktion",0);
dini_IntSet(PlayerData,"Jailed",0);
dini_IntSet(PlayerData,"Health",50);
dini_IntSet(PlayerData,"Baned",0);
dini_IntSet(PlayerData,"Payday",0);
dini_IntSet(PlayerData,"Monate",0);
SetPVarInt(playerid,"Eingeloggt",1);
return 1;
}
stock PlayerDataLaden(playerid)
{
new PlayerData[64];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(PlayerData,sizeof(PlayerData),"Accounts/%s.ini",playername);
SetPlayerScore(playerid,dini_Int(PlayerData,"Level"));
SetPlayerSkin(playerid,dini_Int(PlayerData,"Skin"));
GivePlayerMoney(playerid,dini_Int(PlayerData,"Geld"));
SetPlayerHealth(playerid,dini_Int(PlayerData,"Health"));
SetPVarInt(playerid,"Adminlevel",dini_Int(PlayerData,"Adminlevel"));
SetPVarInt(playerid,"Fraktion",dini_Int(PlayerData,"Fraktion"));
SetPVarInt(playerid,"Jailed",dini_Int(PlayerData,"Jailed"));
SetPVarInt(playerid,"Premium",dini_Int(PlayerData,"Premium"));
SetPVarInt(playerid,"PayDay",dini_Int(PlayerData,"PayDay"));
SetPVarInt(playerid,"Monate",dini_Int(PlayerData,"Monate"));
if(GetPVarInt(playerid,"Baned")==1)
{
SendClientMessage(playerid,rot,"Du bist vom Server gebannt!");
Kick(playerid);
}
SetPVarInt(playerid,"Eingeloggt",1);
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"Eingeloggt")==1)
{
new PlayerData[64];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(PlayerData,sizeof(PlayerData),"Accounts/%s.ini",playername);
dini_IntSet(PlayerData,"Level",GetPlayerScore(playerid));
dini_IntSet(PlayerData,"Geld",GetPlayerMoney(playerid));
dini_IntSet(PlayerData,"Skin",GetPlayerSkin(playerid));
dini_IntSet(PlayerData,"Health",GetPlayerHealth(playerid));
dini_IntSet(PlayerData,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
dini_IntSet(PlayerData,"Fraktion",GetPVarInt(playerid,"Fraktion"));
dini_IntSet(PlayerData,"Jailed",GetPVarInt(playerid,"Jailed"));
dini_IntSet(PlayerData,"Baned",GetPVarInt(playerid,"Baned"));
dini_IntSet(PlayerData,"Premium",GetPVarInt(playerid,"Premium"));
dini_IntSet(PlayerData,"PayDay",GetPVarInt(playerid,"PayDay"));
dini_IntSet(PlayerData,"Monate",GetPvarInt(playerid,"Monate"));
}
return 1;
}
VIllt hilft es dir & Funktioniert jetz
MFG
Blackfly
jetzt hab ich diese fehler
C:\Users\Niklas\Desktop\GTA SERVER\gamemodes\Test.pwn(199) : error 017: undefined symbol "MAX_HAUS"
C:\Users\Niklas\Desktop\GTA SERVER\gamemodes\Test.pwn(201) : error 017: undefined symbol "HausInfo"
C:\Users\Niklas\Desktop\GTA SERVER\gamemodes\Test.pwn(201) : warning 215: expression has no effect
C:\Users\Niklas\Desktop\GTA SERVER\gamemodes\Test.pwn(201) : error 001: expected token: ";", but found "]"
C:\Users\Niklas\Desktop\GTA SERVER\gamemodes\Test.pwn(201) : error 029: invalid expression, assumed zero
C:\Users\Niklas\Desktop\GTA SERVER\gamemodes\Test.pwn(201) : fatal error 107: too many error messages on one line
und zwar hier
public OnPlayerPickUpPickup(playerid, pickupid)
{
for(new i=1;i<MAX_HAUS;i++) // schleife für alle Häuser
{
if(HausInfo[i][haus_pickup] == pickupid) // wenn das pickup unser Hauspickup ist
{
new s[100];
format(s,100,"Besitzer: %s, Preis: %d$",HausInfo[i][haus_besitzer],HausInfo[i][haus_preis]); // Nachricht formatieren
SendClientMessage(playerid,0x00FF00,s);
}
}
return 1;
[align=-webkit-auto]
[/align]
Hast du villt Teamwiever?
Wen ja schick mal bitte daten Per Pn
Werde dan mal drüber schauen
MFG
Blackfly