Beiträge von Andre_R

    N'Abend,


    ich speichere so meine Ip:


    new pIP[16],playerIP;
    playerIP = GetPlayerIp(playerid,pIP,16);
    format(query, sizeof query, "UPDATE `player` SET `IP` = '%s' WHERE `Name` = '%s'",playerIP,SpielerName(playerid));
    mysql_query(query);

    mysql_free_result();


    Aber in der Tabelle steht immer:


    255.255.255.255


    Formatiert als varchar(255) latin1_swedish_ci



    Hoffe auf Helfende.

    Hallo, habe folgenden Code:


    new query[128],pIP[16],playerIP;
    playerIP = GetPlayerIp(playerid,pIP,16);
    format(query, sizeof query, "UPDATE `player` SET `IP` = '%s' WHERE `Name` = '%s'",playerIP,SpielerName(playerid));
    mysql_query(query);


    und meine Spalte ist als Varchar(255) formatiert.


    Wo liegt der Fehler?


    //edit:


    Bei mir wird zwar eine IP gespeichert, aber nicht mir der man auf dem Server zugegriffen hat.
    Gespeichert wird immer: 255.255.255.255

    Hallo Community,


    ich habe folgendes Proble, und zwar wird das Gehalt nicht geladen, aber der Rangname...


    for(; i < 16; i++)
    {
    new query2[128];
    format(query2, sizeof query2, "SELECT `Gehalt` FROM `%s` WHERE `Rang` = '%d'",fraktab,i);
    format(query, sizeof query, "SELECT `Rangname` FROM `%s` WHERE `Rang` = '%d'",fraktab,i);
    mysql_query(query);
    mysql_query(query2);
    mysql_store_result();
    mysql_fetch_row(Get);
    mysql_fetch_int(Get2);
    format(str,sizeof(str),"%s\nRang %d: {FF6E00}%s {FFFFFF}| Gehalt: %d$",str,i,Get,Get2);
    }
    ShowPlayerDialog(playerid,DIALOG_FRAK6,DIALOG_STYLE_LIST,"Fraktionsverwaltung",str,"Weiter","Zurück");
    mysql_free_result();

    So:


    new CarName[][] =
    {
    "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
    "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
    "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
    "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
    "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
    "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
    "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
    "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
    "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
    "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
    "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
    "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
    "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
    "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
    "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
    "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
    "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
    "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
    "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
    "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
    "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
    "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
    "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
    "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
    "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
    "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
    "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
    "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
    "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
    "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
    "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
    "Tiller", "Utility Trailer"
    };


    new string[128];
    format(string,sizeof(string),"Dein Vehicle: %s",CarName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
    SendClientMessage(playerid,FARBE,string);