Hey threadtitel sagt alles.
Hier aus mein PWN:
enum SpielerDaten
{
pLevel,
pAdmin,
pGeld,
pFraktion,
pLeader,
pRank,
pJob,
pKills,
pTode,
pBan,
pHaus
}
ocmd:ban (playerid,params[])
{
new MSG[75],Grund[20],TargetID;
if(!isPlayerAdmin(playerid,1))return SendClientMessage(playerid, ROT, "Du darfst diesen Befehl nicht nutzen !");
if(sscanf(params,"us",TargetID,Grund))return SendClientMessage(playerid, GRAU, "Fehler: /ban [Username/ID] [Grund]");
format(MSG,sizeof(MSG),"%s wurde von %s gebannt ! Grund: %s", SpielerName(TargetID),SpielerName(playerid), Grund);
SendClientMessageToAll(ROT,MSG);
Kick(TargetID);
SetPVarInt(TargetID,SpielerInfo[playerid][pBan],1);
return 1;
}
case DIALOG_LOGIN:
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das Angegebene Passwort war Falsch.\nBitte log dich jetzt mit dem richtigen Passwort ein:","Login","Abbrechen");
return 1;
}
else
{
new Name[MAX_PLAYER_NAME],path[64];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
format(path, sizeof(path),"/Spieler/%s.ini", Name);
if(!strcmp(inputtext, dini_Get(path, "Passwort"), true))
{
SetPVarInt(playerid,"Eingeloggt",1);
LoadPlayer(playerid);
SpawnPlayer(playerid);
return 1;
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das war das Falsche Passwort.\nBitte log dich jetzt mit dem richtigen Passwort ein:","Login","Abbrechen");
return 1;
}
}
}
else if (SpielerInfo[playerid][pBan] == 1)
{
Kick(playerid);
}
else
{
Kick(playerid);
}
}
}
stock LoadPlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
new Name[MAX_PLAYER_NAME],path[64];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
format(path, sizeof(path),"/Spieler/%s.ini", Name);
SpielerInfo[playerid][pLevel] = dini_Int(path, "Level");
SpielerInfo[playerid][pAdmin] = dini_Int(path, "Admin");
SpielerInfo[playerid][pBan] = dini_Int (path, "Ban");
SpielerInfo[playerid][pGeld] = dini_Int(path, "Geld");
SpielerInfo[playerid][pKills] = dini_Int(path, "Kills");
SpielerInfo[playerid][pTode] = dini_Int(path, "Tode");
SpielerInfo[playerid][pHaus] = dini_Int(path, "Haus");
}
return 1;
}
stock SavePlayer(playerid)
{
if(GetPVarInt(playerid,"Eingeloggt") == 1)
{
new Name[MAX_PLAYER_NAME],path[64];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
format(path, sizeof(path),"/Spieler/%s.ini", Name);
dini_IntSet(path,"Level", SpielerInfo[playerid][pLevel]);
dini_IntSet(path,"Admin", SpielerInfo[playerid][pAdmin]);
dini_IntSet(path,"Ban",SpielerInfo[playerid][pBan]);
dini_IntSet(path,"Geld", SpielerInfo[playerid][pGeld]);
dini_IntSet(path,"Kills", SpielerInfo[playerid][pKills]);
dini_IntSet(path,"Tode", SpielerInfo[playerid][pTode]);
dini_IntSet(path,"Haus", SpielerInfo[playerid][pHaus]);
}
return 1;
}
Ich bitte um Hilfe.
MfG,
iAIR