Beiträge von DJ Deagle



    hatte ich auch schon, klappt nicht

    HeyHoo,


    Ich habe ein Problem mit meinem Fraktionschat.
    Immer wenn ich InGame /f HALLO eintippe, kommt, Benutze: /f(raktion) [Text]!
    Hier der ganze Befehl:

    ocmd:f(playerid,params[])
    {
    new result[128];
    if(sscanf(params,"s[128]",result))return SendClientMessage(playerid,Grau, "Benutze: /f(raktion) [Text]");
    {
    new resultstring[256];
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    new member = SpielerInfo[playerid][pFraktion];
    if(SpielerInfo[playerid][pFraktion]!=0)
    {
    if(member==1)
    {
    if(SpielerInfo[playerid][pFrakrang] == 7) { format(resultstring, sizeof(resultstring), "Captain %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 6) { format(resultstring, sizeof(resultstring), "Lieutnant %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 5) { format(resultstring, sizeof(resultstring), "Oberkommissar %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 4) { format(resultstring, sizeof(resultstring), "Kommissar %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 3) { format(resultstring, sizeof(resultstring), "Bewährungshelfer %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 2) { format(resultstring, sizeof(resultstring), "Officer %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 1) { format(resultstring, sizeof(resultstring), "Cadet %s: %s", Name, result); }
    }
    else if(member==2)
    {
    if(SpielerInfo[playerid][pFrakrang] == 7) { format(resultstring, sizeof(resultstring), "Director %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 6) { format(resultstring, sizeof(resultstring), "Deputy Director %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 5) { format(resultstring, sizeof(resultstring), "Supervisor %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 4) { format(resultstring, sizeof(resultstring), "Elite Agent %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 3) { format(resultstring, sizeof(resultstring), "Special Agent %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 2) { format(resultstring, sizeof(resultstring), "Professional Agent %s: %s", Name, result); }
    else if(SpielerInfo[playerid][pFrakrang] == 1) { format(resultstring, sizeof(resultstring), "Agent %s: %s", Name, result); }
    }
    for(new i; i<MAX_PLAYERS; i++)
    {
    if(SpielerInfo[i][pFraktion])
    {
    SendClientMessage(i, ChatGreen, resultstring);
    }
    }
    }
    }
    return 1;
    }

    Was ist falsch?


    lg
    Deagle

    HeyHoo,


    Errors:

    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4510) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.


    Zeile:
    if(strcmp(inputtext) == SpielerInfo[playerid][pBankPIN])


    muss Ich wie ändern? :)


    lg
    Deagle

    HeyHoo,


    Ich hab grade mein MySQL gedingse von R5 auf R7 geupdated.
    Folgende Errors:

    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4800) : error 017: undefined symbol "mysql_query"
    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4812) : error 017: undefined symbol "mysql_query"
    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4821) : error 017: undefined symbol "mysql_query"
    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4869) : error 017: undefined symbol "mysql_query"
    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4871) : error 017: undefined symbol "mysql_fetch_int"
    C:\Users\_Zinne\Desktop\Spiele\SAMP Server\gamemodes\ProjektXv0.0.2.pwn(4949) : error 017: undefined symbol "mysql_query"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    6 Errors.



    Zeile 4800-4821:

    mysql_query ( query , -1, -1 );
    mysql_store_result();
    return mysql_retrieve_row();
    }


    stock CreateAccount(playerid, pass[])
    {
    new query[256],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    mysql_real_escape_string(Name,Name);
    mysql_real_escape_string(pass,pass);
    format(query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Passwort`) VALUES ('%s', '%s')", Name, pass);
    mysql_query(query);
    return true;
    }


    stock mysql_ReturnPasswort(Name[])
    {
    new query[130], Get[130];
    mysql_real_escape_string(Name, Name);
    format(query, 128, "SELECT `passwort` FROM `accounts` WHERE `Name` = '%s'", Name);
    mysql_query(query);


    Zeile 4869-4871:

    mysql_query(query);
    mysql_store_result();
    new sqlint = mysql_fetch_int();


    Zeile 4949:

    mysql_query(query);


    Hat da jemand neue teile?
    Ich benutze das von BlueG (G-Stylezz)


    lg
    Deagle

    habs jetze so:
    public OnPlayerRequestClass(playerid, classid)
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)
    {
    if(mysql_CheckAccount(playerid) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"{00FF00}Registration","Bitte registrier dich mit einem Passwort:","Register","Abbrechen");
    }
    else if(mysql_CheckAccount(playerid) == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{00FF00}Login","Bitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
    }
    }
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 1)
    {
    if(SpielerInfo[playerid][pSkin] == 0)
    {
    SetSpawnInfo(playerid,0,26,zivispawn1,0,0,0,0,0,0);
    SpielerInfo[playerid][pSkin] = 26;
    SavePlayer(playerid);
    }
    else
    {
    SetSpawnInfo(playerid,0,SpielerInfo[playerid][pSkin],zivispawn1,0,0,0,0,0,0);
    }
    SpawnPlayer(playerid);
    }
    else if(GetPVarInt(playerid,"Eingeloggt") == 0)
    {
    if(mysql_CheckAccount(playerid) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"{00FF00}Registration","Bitte registrier dich mit einem Passwort:","Register","Abbrechen");
    }
    else if(mysql_CheckAccount(playerid) == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{00FF00}Login","Bitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
    }
    }
    return 1;
    }


    klappt trzdem nicht ...

    Klappt nicht :(
    Hier der abgeänderte Code, der trotzdem nicht klappt:

    public OnPlayerRequestClass(playerid, classid)
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)
    {
    if(mysql_CheckAccount(playerid) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"{00FF00}Registration","Bitte registrier dich mit einem Passwort:","Register","Abbrechen");
    }
    else if(mysql_CheckAccount(playerid) == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{00FF00}Login","Bitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
    }
    }
    else
    {
    if(SpielerInfo[playerid][pSkin] == 0)
    {
    SetSpawnInfo(playerid,0,26,zivispawn1,0,0,0,0,0,0);
    SpielerInfo[playerid][pSkin] = 26;
    SavePlayer(playerid);
    }
    else
    {
    SetSpawnInfo(playerid,0,SpielerInfo[playerid][pSkin],zivispawn1,0,0,0,0,0,0);
    }
    SpawnPlayer(playerid);
    }
    return 1;
    }

    habs jetze so, weil er ja ned Spawnen kann, wenn die Info nicht gesetzt ist:


    public OnPlayerRequestClass(playerid, classid)
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)
    {
    if(mysql_CheckAccount(playerid) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"{00FF00}Registration","Bitte registrier dich mit einem Passwort:","Register","Abbrechen");
    }
    else if(mysql_CheckAccount(playerid) == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{00FF00}Login","Bitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
    }
    }
    else
    if(SpielerInfo[playerid][pSkin] == 0)
    {
    SetSpawnInfo(playerid,0,26,zivispawn1,0,0,0,0,0,0);
    SpielerInfo[playerid][pSkin] = 26;
    SavePlayer(playerid);
    SpawnPlayer(playerid);
    }
    else
    {
    SetSpawnInfo(playerid,0,SpielerInfo[playerid][pSkin],zivispawn1,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    }
    return 1;
    }


    klappt das so?

    Hey,


    Ich habe mein Dini-Script auf MySQL umgeschrieben.
    Allerdings, kann man sich nicht einloggen, sondern wird direkt gespawnt!
    Hier der Code:
    public OnPlayerRequestClass(playerid, classid)
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 0)
    {
    if(mysql_CheckAccount(playerid) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"{00FF00}Registration","Bitte registrier dich mit einem Passwort:","Register","Abbrechen");
    }
    else if(mysql_CheckAccount(playerid) == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{00FF00}Login","Bitte logge dich mit deinem Passwort ein:","Login","Abbrechen");
    }
    }
    if(SpielerInfo[playerid][pSkin] == 0)
    {
    SetSpawnInfo(playerid,0,26,zivispawn1,0,0,0,0,0,0);
    SpielerInfo[playerid][pSkin] = 26;
    SavePlayer(playerid);
    }
    else
    {
    SetSpawnInfo(playerid,0,SpielerInfo[playerid][pSkin],zivispawn1,0,0,0,0,0,0);
    }
    SpawnPlayer(playerid);
    return 1;
    }


    lg
    Deagle

    Ich hab mein problem grade mal gegoogelt.
    Ich habe mir eine Datei namens "nativechecker.so" heruntergeladen, welche checken soll, welche Plugins fehlen.


    Hier nun der Server-Log:


    Obwohl in der streamer.inc folgendes steht:

    Code
    native Streamer_CallbackHook(callback, {Float,_}:...);


    :( was is das