Beiträge von Tigerchen

    Ja, dein kommentar war ja nur am Ende:


    Ja hätte ja sein können :)


    Sowas nennt man also Ahnung, und wenn ich dir hier im Thread 5x meinen Stock schreibe und du 5x sagst poste mal deinen Stock, dann nennst du das Ahnung und aufmerksam Lesen ?


    Welcome on my Global Igno List, Leiute die so tun als könnten Sie etwas und können im Prinzip NICHTS mag ich nicht.


    Oder wie sagtest du ? Meine family ist ITS

    Der ganze Thread hier ist Lächerlich, nicht einmal annähernd das Wissen was man dazu benötigt, aber man stellt es sich doch sooo leicht vor :)


    Netzwerktechnik, Programmierung und ein tiefgründiges Wissen hat man nicht in 2 Wochen ;)


    Ohmann, das ist so... Lächerlich !

    Die PM bezog sich auf Teamviewer, das du dich selbst davon überzeugen kannst, und bitte mach deine Augen auf, der Stock steht da dick und FETT !


    Könnte sich mal Jemand melden der auch AHNUNG davon hat und nicht blos irgendwie versucht mir da was rumzufummeln an sachen die nix mit dem zu tun haben ?

    Der Schrott funktioniert bei mir nicht, sondern verursacht eher Fehler.


    stock SavePlayerData(playerid)
    {
    new Query[500];
    GetPlayerPos(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]);
    PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
    PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
    PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
    GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
    GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    mysql_format(m_connect,Query,"UPDATE `accounts` SET `Name` = '%s', `Level` = '%d', `Admin` = '%d', `Donate` = '%d', `Money` = '%d', `Bank` = '%d', `X` = '%f', `Y` = '%f', `Z` = '%f', `VW` = '%d', `Interior` = '%d', `Fraction` = '%d', `Carlic` = '%d', `Bikelic` = '%d', `Planelic` = '%d', `LKWlic` = '%d', `Helilic` = '%d', `Health` = '%f', `Armour` = '%f', `Ban` = '%d' WHERE `Name` = '%s' ",PlayerName(playerid),PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pDonate],
    PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pBank],PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ],PlayerInfo[playerid][pVW],PlayerInfo[playerid][pInt],PlayerInfo[playerid][pFraction],PlayerInfo[playerid][pCarlic],PlayerInfo[playerid][pBikelic],PlayerInfo[playerid][pPlanelic],PlayerInfo[playerid][pLKWlic],PlayerInfo[playerid][pHelilic],PlayerInfo[playerid][pHealth],PlayerInfo[playerid][pArmour],PlayerInfo[playerid][pBan],PlayerInfo[playerid][pName]);
    mysql_function_query(m_connect,Query,true,"","");
    return 1;
    }
    stock CreateTables()
    {
    new sql[800];
    mysql_format(m_connect,sql,"CREATE TABLE IF NOT EXISTS `accounts`(`Name` varchar(16) NOT NULL,`Password` varchar(129) NOT NULL,`Age` int(3) NOT NULL,`Country` varchar(20) NOT NULL,`Level` int(10) NOT NULL,`Admin` int(10) NOT NULL,`Donate` int(2) NOT NULL,`Gender` varchar(10) NOT NULL,`Money` int(22) NOT NULL,`Bank` int(22) NOT NULL,`X` float NOT NULL,`Y` float NOT NULL,`Z` float NOT NULL");
    mysql_format(m_connect,sql,"%s,`VW` int(6) NOT NULL,`Interior` int(3) NOT NULL,`Rank` int(2) NOT NULL,`Fraction` int(2) NOT NULL,`Carlic` int(1) NOT NULL,`Bikelic` int(1) NOT NULL,`Planelic` int(1) NOT NULL,`LKWlic` int(1) NOT NULL,`Helilic` int(1) NOT NULL,`Health` float NOT NULL,`Armour` float NOT NULL,`Ban` int(1) NOT NULL, `IP` int(85) NOT NULL)",sql);
    mysql_function_query(m_connect,sql,false,"","");
    return 1;
    }
    stock PlayerName(playerid)
    {
    new uName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,uName,MAX_PLAYER_NAME);
    return uName;
    }
    public OnQueryError( errorid, error[], callback[], query[], connectionHandle ){
    printf("EID: %d | Error: %s | callback: %s | Query: %s", errorid, error, callback, query);
    return 1;
    }

    Okay, danke dir, jetzt kann ich jedoch nicht im Spiel Schreiben und allgemein wird alles Doppelt angezeigt, sprich bei Login steht doppelt untereinander...


    (Du hast dich erfolgreich eingeloggt)
    (Du hast dich erfolgreich eingeloggt)


    Was ist das nun wieder ?

    Einmal das wenn man Disconnected...


    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"Login") == 1){
    SavePlayerData(playerid);
    SetPVarInt(playerid, "Login", 0);
    SetPVarInt(playerid, "WPW", 0);
    for(new x; pStats:x < pStats; x++) PlayerInfo[playerid][pStats:x] = 0;
    }
    return 1;
    }


    Einmal den Server Log ...



    ----------
    Loaded log file: "server_log.txt".
    ----------


    SA-MP Dedicated Server
    ----------------------
    v0.3e-R2, (C)2005-2012 SA-MP Team


    [05:42:48] filterscripts = "" (string)
    [05:42:48]
    [05:42:48] Server Plugins
    [05:42:48] --------------
    [05:42:48] Loading plugin: mysql.so
    [05:42:48]


    > MySQL plugin R7 successfully loaded.


    [05:42:48] Loaded.
    [05:42:48] Loading plugin: streamer.so
    [05:42:48]


    *** Streamer Plugin v2.6.1 by Incognito loaded ***


    [05:42:48] Loaded.
    [05:42:48] Loading plugin: sscanf.so
    [05:42:48]


    [05:42:48] ===============================


    [05:42:48] sscanf plugin loaded.


    [05:42:48] (c) 2012 Alex "Y_Less" Cole


    [05:42:48] ===============================


    [05:42:48] Loaded.
    [05:42:48] Loading plugin: Whirlpool.so
    [05:42:48]
    [05:42:48] ==================
    [05:42:48]
    [05:42:48] Whirlpool loaded
    [05:42:48]
    [05:42:48] ==================
    [05:42:48]
    [05:42:48] Loaded.
    [05:42:48] Loaded 4 plugins.


    [05:42:49]
    [05:42:49] Filterscripts
    [05:42:49] ---------------
    [05:42:49] Loaded 0 filterscripts.


    [05:42:49] Verbindung hergestellt
    [05:42:49] Number of vehicle models: 0
    [05:44:22] Incoming connection: 62.143.150.245:65183
    [05:44:22] [join] Antonio_Bonanza has joined the server (0:62.143.150.245)
    [05:44:22] Checkaccounts
    [05:44:22] Load thinks
    [05:44:30] Login
    [05:44:30] spawn


    Und einmal den MySQL Log ...


    [05:42:49]
    [05:42:49] ** MySQL Debugging enabled (12/27/12)
    [05:42:49]
    [05:42:49] >> mysql_connect(.
    [05:42:49] CMySQLHandler::CMySQLHandler() - constructor called.
    [05:42:49] CMySQLHandler::CMySQLHandler() - C
    [05:42:49] CMySQLHandler::Connect() - Connection was successful.
    [05:42:49] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
    [05:42:49] >> mysql_ping( Connection handle: 1 )
    [05:42:49] CMySQLHandler::Ping() - Connection is still alive.
    [05:42:49] >> mysql_format( Connection handle: 1 )
    [05:42:49] >> mysql_format( Connection handle: 1 )
    [05:42:49] >> mysql_query_callback( Connection handle: 1 )
    [05:42:49] Passing query CREATE TABLE IF NOT EXISTS `accounts`(`Name` varchar(16) NOT NULL,`Password` varchar(129) NOT NULL,`Age` int(3) NOT NULL,`Country` varchar(20) NOT NULL,`Level` int(10) NOT NULL,`Admin` int(10) NOT NULL,`Donate` int(2) NOT NULL,`Gender` varchar(10) NOT NULL,`Money` int(22) NOT NULL,`Bank` int(22) NOT NULL,`X` float NOT NULL,`Y` float NOT NULL,`Z` float NOT NULL,`VW` int(6) NOT NULL,`Interior` int(3) NOT NULL,`Rank` int(2) NOT NULL,`Fraction` int(2) NOT NULL,`Carlic` int(1) NOT NULL,`Bikelic` int(1) NOT NULL,`Planelic` int(1) NOT NULL,`LKWlic` int(1) NOT NULL,`Helilic` int(1) NOT NULL,`Health` float NOT NULL,`Armour` float NOT NULL,`Ban` int(1) NOT NULL, `IP` int(85) NOT NULL) |
    [05:42:49] ProcessQueryThread() - Query was successful. (CREATE TABLE IF NOT EXISTS `accounts`(`Name` varchar(16) NOT NULL,`Password` varchar(129) NOT NULL,`Age` int(3) NOT NULL,`Country` varchar(20) NOT NULL,`Level` int(10) NOT NULL,`Admin` int(10) NOT NULL,`Donate` int(2) NOT NULL,`Gender` varchar(10) NOT NULL,`Money` int(22) NOT NULL,`Bank` int(22) NOT NULL,`X` float NOT NULL,`Y` float NOT NULL,`Z` float NOT NULL,`VW` int(6) NOT NULL,`Interior` int(3) NOT NULL,`Rank` int(2) NOT NULL,`Fraction` int(2) NOT NULL,`Carlic` int(1) NOT NULL,`Bikelic` int(1) NOT NULL,`Planelic` int(1) NOT NULL,`LKWlic` int(1) NOT NULL,`Helilic` int(1) NOT NULL,`Health` float NOT NULL,`Armour` float NOT NULL,`Ban` int(1) NOT NULL, `IP` int(85) NOT NULL))
    [05:42:49] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
    [05:44:22] >> mysql_format( Connection handle: 1 )
    [05:44:22] >> mysql_query_callback( Connection handle: 1 )
    [05:44:22] Passing query SELECT * FROM `accounts` WHERE `Name` = 'Antonio_Bonanza' | i
    [05:44:22] ProcessQueryThread(OnPlayerCheckAccount) - Query was successful. (SELECT * FROM `accounts` WHERE `Name` = 'Antonio_Bonanza')
    [05:44:22] ProcessQueryThread(OnPlayerCheckAccount) - Data caching enabled.
    [05:44:22] CMySQLHandler::StoreResult() - Result was stored.
    [05:44:22] CMySQLHandler::FreeResult() - Result was successfully free'd.
    [05:44:22] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
    [05:44:22] OnPlayerCheckAccount(i) - Threaded function called.
    [05:44:22] >> cache_get_data( Connection handle: 1 )
    [05:44:22] >> mysql_format( Connection handle: 1 )
    [05:44:22] >> mysql_query_callback( Connection handle: 1 )
    [05:44:22] ProcessTick() - The cache has been cleared.
    [05:44:22] Passing query SELECT * FROM `accounts` WHERE `Name` = 'Antonio_Bonanza' | i
    [05:44:22] ProcessQueryThread(OnPlayerLoadPlayerData) - Query was successful. (SELECT * FROM `accounts` WHERE `Name` = 'Antonio_Bonanza')
    [05:44:22] ProcessQueryThread(OnPlayerLoadPlayerData) - Data caching enabled.
    [05:44:22] CMySQLHandler::StoreResult() - Result was stored.
    [05:44:22] CMySQLHandler::FreeResult() - Result was successfully free'd.
    [05:44:22] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
    [05:44:22] OnPlayerLoadPlayerData(i) - Threaded function called.
    [05:44:22] ProcessTick() - The cache has been cleared.
    [05:46:15] >> mysql_format( Connection handle: 1 )

    Bekomme ich leider nicht hin, kannst du mir die Lösung für das Problem hier hin Schreiben ?


    public OnPlayerConnect(playerid)
    {
    new plrIP[16];
    new Query[200];
    SendClientMessage(playerid,-1,"Willkommen auf dem Server");
    mysql_format(m_connect,Query,"SELECT * FROM `accounts` WHERE `Name` = '%s'",PlayerName(playerid));
    mysql_function_query(m_connect,Query,true,"OnPlayerCheckAccount","i", playerid);
    if(PlayerInfo[playerid][pBan] == 1)return Kick(playerid);
    GetPlayerIp(playerid, plrIP, sizeof(plrIP));
    return 1;
    }


    Ich suche eine Möglichkeit um meine IP Adresse oder die von Jemanden anderem in meine Datenbank zu Speichern. Mit folgendem Befehl erstelle ich meine Tabellen:


    stock CreateTables()
    {
    new sql[800];
    mysql_format(m_connect,sql,"CREATE TABLE IF NOT EXISTS `accounts`(`Name` varchar(16) NOT NULL,`Password` varchar(129) NOT NULL,`Age` int(3) NOT NULL,`Country` varchar(20) NOT NULL,`Level` int(10) NOT NULL,`Admin` int(10) NOT NULL,`Donate` int(2) NOT NULL,`Gender` varchar(10) NOT NULL,`Money` int(22) NOT NULL,`Bank` int(22) NOT NULL,`X` float NOT NULL,`Y` float NOT NULL,`Z` float NOT NULL");
    mysql_format(m_connect,sql,"%s,`VW` int(6) NOT NULL,`Interior` int(3) NOT NULL,`Rank` int(2) NOT NULL,`Fraction` int(2) NOT NULL,`Carlic` int(1) NOT NULL,`Bikelic` int(1) NOT NULL,`Planelic` int(1) NOT NULL,`LKWlic` int(1) NOT NULL,`Helilic` int(1) NOT NULL,`Health` float NOT NULL,`Armour` float NOT NULL,`Ban` int(1) NOT NULL, `IP` int(85) NOT NULL)",sql);
    mysql_function_query(m_connect,sql,false,"","");
    return 1;
    }



    Das klappt alles wunderbar, in den enum habe ich auch die Variable mit eingebaut für die IP:


    enum pStats
    {
    pName[16],
    pPassword[129],
    pAge,
    pCountry[20],
    pLevel,
    pAdmin,
    pDonate,
    pGender[10],
    pMoney,
    pBank,
    Float:pPosX,
    Float:pPosY,
    Float:pPosZ,
    pVW,
    pInt,
    pRank,
    pFraction,
    pCarlic,
    pBikelic,
    pPlanelic,
    pLKWlic,
    pHelilic,
    Float:pHealth,
    Float:pArmour,
    pBan,
    pIP,
    }


    Das klappt auch alles, nun bleibt noch die Frage, wie mache ich es, das ich vom Player die IP bekomme und das dann in die Datenbank Schreibe ?!?! Eventuell ein neuer Stock ?

    Hallo zusammen,


    ich bin dabei mein Server etwas umzubauen und habe hier einige Fehler die ich nicht gelöst bekomme...


    Zitat

    C:\Users\xxxxxx\Desktop\Samp Windoof Server\pawno\include\ocmd.inc(116) : warning 201: redefinition of constant/macro (symbol "OnPlayerCommandText")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.


    Dort wird mir in der ocmd.inc in der Zeile 116 eine Warnung ausgegeben, dort steht aber folgendes:


    #define OnPlayerCommandText ocmdOnPlayerCommandText


    Desweiteren benutze ich noch befehle wie zum Beispiel:


    COMMAND:sellhouse(playerid, params[]) {


    Könnte mir eventuell Jemand dabei Helfen diese Probleme zu beheben ?