Beiträge von Unique!

    Hey Leute,
    Ich habe ein Problem: Ich wollte es machen das wenn man sich registriert/einloggt nicht mehr auf den Spawn button klicken muss. Beim Registrieren funktioniert das aber beim Login kommt das:

    hier mal der code:


    case DIALOG_LOGIN:
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte logge dich ein:","Weiter","Abbrechen");
    return SendClientMessage(playerid,COLOR_RED,"Kein Passwort angegeben!");
    }
    if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
    {
    pInfo[playerid][Wanted] = dini_Int(accFormat,"Wanted");
    pInfo[playerid][Geld] = dini_Int(accFormat,"Geld");
    pInfo[playerid][Skin] = dini_Int(accFormat,"Skin");
    pInfo[playerid][Tutorial] = dini_Int(accFormat,"Tutorial");
    pInfo[playerid][Alter] = dini_Int(accFormat,"Alter");
    pInfo[playerid][Geschlecht] = dini_Int(accFormat,"Geschlecht");
    pInfo[playerid][Member] = dini_Int(accFormat,"Member");
    pInfo[playerid][Leader] = dini_Int(accFormat,"Leader");
    pInfo[playerid][AdminLvl] = dini_Int(accFormat,"AdminLvl");
    SetPlayerSkin(playerid,pInfo[playerid][Skin]);
    GivePlayerMoney(playerid,pInfo[playerid][Geld]);
    SetPlayerWantedLevel(playerid,pInfo[playerid][Wanted]);
    pInfo[playerid][Eingeloggt] = 1;
    SendClientMessage(playerid,COLOR_RED,"Du wurdest erfolgreich eingeloggt.");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte logge dich ein:","Weiter","Abbrechen");
    SendClientMessage(playerid,COLOR_RED,"Das Passwort war Falsch!");
    }
    }
    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerSpawn(playerid);
    return 1;
    }


    public SetPlayerSpawn(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(pInfo[playerid][Tutorial] == 0)
    {
    TextDrawShowForPlayer(playerid,Textdraw0);
    FreezePlayer(playerid);
    SendClientMessage(playerid,COLOR_YELLOW,"Es folgen ein paar Fragen und ein Tutorial.");
    ShowPlayerDialog(playerid,DIALOG_GESCHLECHT,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich","Männlich","Weiblich");
    }
    if(pInfo[playerid][Member] == 0 || pInfo[playerid][Leader] == 0)
    {
    SpawnPlayer(playerid);
    SetPlayerSkin(playerid,pInfo[playerid][Skin]);
    SetPlayerPos(playerid,439.3554,-1751.8140,8.7925);
    SetPlayerFacingAngle(playerid,226.3458);
    SetPlayerInterior(playerid,0);
    }
    }
    return 1;
    }

    Hey Leude,


    Unzwar möchte ich das mann sehen kann welchen admin rank man hat also in den stats soll dann stehen z.B. "Adminrank: Admin" oder so.
    Ich habe schon nen Befehl aber ich hab nen fehler mit dem Array:


    new Adminrank[6][1] = {
    {"Keinen"},
    {"Test Supporter"},
    {"Supporter"},
    {"Auszubildener Admin"},
    {"Admin"},
    {"Head Admin"}
    };
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(41) : error 018: initialization data exceeds declared size


    Hier nochma der Befehl der noch net ganz fertig ist:
    ocmd:makeadmin(playerid,params[])
    {
    if(!IsAdmin(playerid,5)) return 1;
    else
    {
    new pID,ALvl,string[128];
    if(sscanf(params,"ii",pID,ALvl))return SendClientMessage(playerid,COLOR_LIGHTGREEN,"[Benutzung]: /makeadmin [playerid] [Level(1-5)]");
    if(!IsPlayerConnected(pID))return SendClientMessage(playerid,COLOR_RED,"Dieser Spieler ist nicht online!");
    if(ALvl < 1 || ALvl > 5)return SendClientMessage(playerid,COLOR_RED,"Flasches Adminlevel(1-5)");
    pInfo[pID][AdminLvl] = ALvl;
    format(string,sizeof string,"%s hat dich auf den Adminrank: %s gesetzt",PlayerName(playerid),Adminrank[);
    }
    return 1;
    }

    Hey community,


    Ich suche mich jetzt schon tot, Ich habe ein Problem bei meinem Login/register system. Wenn ich mich registriere(ingame) erstellt er keine datei. Der Ordner name ist richtig.
    Hier mal alles was zum register/Login system gehört:


    public OnPlayerConnect(playerid)
    {
    new accFormat[128], pname[MAX_PLAYERS];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Accounts/%s.ini",pname);
    if(fexist(accFormat))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen zurück,\nBitte logge dich ein","Weiter","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Registrieren","Willkommen Fremder,\nBitte registriere dich","Weiter","Abbrechen");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    new accFormat[128], pname[MAX_PLAYERS];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Accounts/%s.ini",pname);
    if(fexist(accFormat) && pInfo[playerid][Eingeloggt])
    {
    dini_IntSet(accFormat,"Skin",GetPlayerSkin(playerid));
    dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(accFormat,"Wanted",GetPlayerWantedLevel(playerid));
    dini_IntSet(accFormat,"Geschlecht",pInfo[playerid][Geschlecht]);
    dini_IntSet(accFormat,"Alter",pInfo[playerid][Alter]);
    dini_IntSet(accFormat,"Tutorial",pInfo[playerid][Tutorial]);
    }
    pInfo[playerid][Eingeloggt] = 0;
    pInfo[playerid][Skin] = 0;
    pInfo[playerid][Geld] = 0;
    pInfo[playerid][Wanted] = 0;
    pInfo[playerid][Geschlecht] = 0;
    pInfo[playerid][Alter] = 0;
    pInfo[playerid][Tutorial] = 0;
    return 1;
    }
    public OnPlayerSpawn(playerid)
    {
    if(pInfo[playerid][Tutorial] == 0)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"Es folgen ein paar Fragen und ein Tutorial");
    return ShowPlayerDialog(playerid,DIALOG_GESCHLECHT,DIALOG_STYLE_MSGBOX,"Geschlecht","Bitte wähle dein Geschlecht","Männlich","Weiblich");
    }
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    new accFormat[128], pname[MAX_PLAYERS];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"/Accounts/%s.ini",pname);
    if(response)
    {
    switch(dialogid)
    {
    case DIALOG_LOGIN:
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen zurück,\nBitte logge dich ein","Weiter","Abbrechen");
    return SendClientMessage(playerid,COLOR_RED,"Kein Passwort angegeben!");
    }
    if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
    {
    pInfo[playerid][Skin] = dini_Int(accFormat,"Skin");
    pInfo[playerid][Geld] = dini_Int(accFormat,"Geld");
    pInfo[playerid][Wanted] = dini_Int(accFormat,"Wanted");
    pInfo[playerid][Geschlecht] = dini_Int(accFormat,"Geschlecht");
    pInfo[playerid][Alter] = dini_Int(accFormat,"Alter");
    pInfo[playerid][Tutorial] = dini_Int(accFormat,"Tutorial");
    GivePlayerMoney(playerid,pInfo[playerid][Geld]);
    SetPlayerWantedLevel(playerid,pInfo[playerid][Wanted]);
    pInfo[playerid][Eingeloggt] = 1;
    SendClientMessage(playerid,COLOR_GREY,"Erfolgreich eingeloggt");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen zurück,\nBitte logge dich ein","Weiter","Abbrechen");
    return SendClientMessage(playerid,COLOR_RED,"Falsches Passwort!");
    }
    }
    case DIALOG_REGISTER:
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Registrieren","Willkommen Fremder,\nBitte registriere dich","Weiter","Abbrechen");
    return SendClientMessage(playerid,COLOR_RED,"Kein Passwort angegeben!");
    }
    dini_Create(accFormat);
    dini_Set(accFormat,"Passwort",inputtext);
    dini_IntSet(accFormat,"Geld",10000);
    dini_IntSet(accFormat,"Tutorial",0);
    pInfo[playerid][Eingeloggt] = 1;
    }
    }
    }
    else
    {
    switch(dialogid)
    {
    case DIALOG_LOGIN: ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Willkommen zurück,\nBitte logge dich ein","Weiter","Abbrechen");
    case DIALOG_REGISTER: ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Registrieren","Willkommen Fremder,\nBitte registriere dich","Weiter","Abbrechen");
    }
    }

    if(dialogid == DIALOG_GESCHLECHT)
    {
    if(response)
    {
    dini_IntSet(accFormat,"Geschlecht",1);
    dini_IntSet(accFormat,"Skin",26);
    SendClientMessage(playerid,COLOR_YELLOW,"Du bist also Männlich.");
    ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Alter","Bitte gib dein Geburtsdatum ein\n Format: dd.mm.yyyy","Weiter","Abbrechen");
    }
    else
    {
    dini_IntSet(accFormat,"Geschlecht",2);
    dini_IntSet(accFormat,"Skin",40);
    SendClientMessage(playerid,COLOR_YELLOW,"Du bist also Weiblich.");
    ShowPlayerDialog(playerid,DIALOG_ALTER,DIALOG_STYLE_INPUT,"Alter","Bitte gib dein Geburtsdatum ein\n Format: dd.mm.yyyy","Weiter","Abbrechen");
    }
    }
    if(dialogid == DIALOG_ALTER)
    {
    if(response)
    {
    new jahr, monat, tag, Datum[3][20], string[128];
    getdate(jahr, monat,tag);
    split(inputtext, Datum, '.');
    new Age;
    Age = jahr- strval(Datum[2]);
    dini_IntSet(accFormat,"Alter",Age);
    format(string,sizeof string,"Du bist also %d Jahre alt. Jetzt folgt das Tutorial",Age);
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    else
    {
    SendClientMessage(playerid,COLOR_YELLOW,"Du wurdest gekickt, weil du abbrechen gedrückt hast.");
    Kick(playerid);
    }
    }
    return 1;
    }


    Danke im vorraus, es wär total nett von euch wenn ihr mir helft
    Ch4oS

    Hey Community,


    Ich habe ein Problem unzwar bekomme ich diese Errors:
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(270) : warning 202: number of arguments does not match definition
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(336) : error 003: declaration of a local variable must appear in a compound block
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(336) : error 017: undefined symbol "Age"
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(336) : warning 215: expression has no effect
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(337) : error 017: undefined symbol "Age"
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(337 -- 338) : warning 215: expression has no effect
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(338) : error 001: expected token: ";", but found "-identifier-"
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(338) : error 017: undefined symbol "Age"
    C:\Users\Adrian\Desktop\GTA-Server\gamemodes\Selfmade.pwn(338) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    6 Errors.


    Und hier der Code dazu:


    if(dialogid == DIALOG_ALTER)
    {
    if(response)
    {
    new jahr, monat, tag, Datum[3][20];
    getdate(jahr, monat,tag);
    split(inputtext, Datum, '.');
    if(IsValidDate(strval(Datum[0]),strval(Datum[1]),strval(Datum[2])))
    new Age; <--- Zeile 336
    Age = jahr- strval(Datum[2])
    dini_IntSet(accFormat,"Alter",Age);
    }
    else
    {
    SendClientMessage(playerid,COLOR_YELLOW,"Du wurdest gekickt, weil du abbrechen gedrückt hast.");
    Kick(playerid);
    }
    }

    Habe Errors habe es einfach gedownloaded und wollte compilen :(



    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\pawno\include\M_Bot.inc(165) : error 017: undefined symbol "IsAnAdmin"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(2596) : error 017: undefined symbol "IsPlayerInFrac"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(3977) : error 017: undefined symbol "SetPlayerToKnast"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(4359) : error 004: function "ClearBlack" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5270) : error 004: function "GetDistanceToClosestInside" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5278) : error 017: undefined symbol "GetClosestInsideID"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5290) : error 004: function "GetDistanceToClosestOutside" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5292) : error 017: undefined symbol "GetClosestOutsideID"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5866) : error 004: function "IsAtATM" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5880) : error 004: function "IsAtEatATM" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5925) : error 017: undefined symbol "pn"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5926) : error 017: undefined symbol "pn"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5927) : error 004: function "ProxDetector" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5943) : error 017: undefined symbol "pn"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5944) : error 017: undefined symbol "pn"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5945) : error 004: function "ProxDetector" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5960) : error 017: undefined symbol "pn"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5961) : error 017: undefined symbol "pn"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(5962) : error 004: function "ProxDetector" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(6195) : error 017: undefined symbol "SetPos"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(6199) : error 017: undefined symbol "SetPos"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(8670) : error 004: function "IsANoTachoVeh" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(8792) : error 004: function "CrimInRange" is not implemented
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(9023) : error 017: undefined symbol "IsPlayerInFrac"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(9028) : error 017: undefined symbol "IsPlayerInFrac"
    C:\Users\Allrounder Studios\Desktop\Los Angeles Reallife v4.9.1\gamemodes\LARP.pwn(9198) : error 017: undefined symbol "IsPlayerInFrac"


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    26 Errors.

    Jetzt ist aber das Problem. Wenn ich den Dialog aufrufe Stürtzt GTA ab.
    if(dialogid == DIALOG_WAFFEN)
    {
    new wname1[24],wname2[24],wname3[24];
    new string[128];
    if(listitem == 0)
    {
    GetWeaponName(pInfo[playerid][pGun1],wname1,sizeof wname1);
    GetWeaponName(pInfo[playerid][pGun2],wname2,sizeof wname2);
    GetWeaponName(pInfo[playerid][pGun3],wname3,sizeof wname3);
    format(string,sizeof string,"%s\n%s\n%s",wname1,wname2,wname3);
    ShowPlayerDialog(playerid,DIAlOG_WAFFENENTNEHMEN,DIALOG_STYLE_LIST,"Waffe entnehmen",string,"Weiter","Abbrechen");
    }
    if(listitem == 1)
    {

    }
    }

    Ok:
    if(dialogid == DIALOG_WAFFEN)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,,DIALOG_STYLE_LIST,"Waffe entnehmen","","Weiter","Abbrechen");
    }
    if(listitem == 1)
    {

    }
    }


    Bringt dir eh nichts da er noch net fertig ist weil ich ja die Namen brauche