Beiträge von Helti

    Mit "ShowGameZoneForPlayer" zeigst du eine gangzone an.


    Benenne mal alle Gangzonen anders BSP: straße1,straße2,...
    und beim connecten des spielers zeige ihm jede Zone extra an.


    MfG
    Helti


    Code(nicht getestet):
    new strassen[12];#define Schwarz 0x000000FF
    public OnGameModeInit()
    strassen[0]=GangZoneCreate(2511.9800,763.2236,2502.8003,560.5234); //0
    strassen[1]=GangZoneCreate(2502.3701,557.0880,4534.8105,567.1945); //1
    strassen[2]=GangZoneCreate(4433.7886,566.6798,4423.2720,-1081.7601); //2.1
    strassen[3]=GangZoneCreate(4438.2949,567.0154,4448.8594,-1082.4711); //2.2
    strassen[4]=GangZoneCreate(4418.5078,447.1841,4343.3335,437.6183); //3
    strassen[5]=GangZoneCreate(4343.3335,437.6183,4353.3169,530.5552); //4
    strassen[6]=GangZoneCreate(4413.4170,436.7591,4403.5840,413.7956); //5
    strassen[7]=GangZoneCreate(4144.3599,-946.4338,4579.9497,-957.3486); //6
    strassen[8]=GangZoneCreate(4580.5078,-950.1053,4569.7817,-1080.1035); //7
    strassen[9]=GangZoneCreate(4570.4526,-1066.2697,4540.0000,-1077.7727); //8
    strassen[10]=GangZoneCreate(4580.0288,-1016.7954,4707.7388,-1006.5915); //9
    public OnPlayerSpawn(playerid) for(new s;i<sizeof(strassen);i++) {
    GangZoneShowForPlayer(playerid, strassen[i], Schwarz); }

    Log:

    Spoiler anzeigen
    SA-MP Dedicated Server
    ----------------------
    v0.3x, (C)2005-2013 SA-MP Team

    Spoiler anzeigen
    [11:55:33] filterscripts = "" (string)
    [11:55:33]
    [11:55:33] Server Plugins
    [11:55:33] --------------
    [11:55:33] Loading plugin: sscanf
    [11:55:33]

    Spoiler anzeigen
    [11:55:33] ===============================

    Spoiler anzeigen
    [11:55:33] sscanf plugin loaded.

    Spoiler anzeigen
    [11:55:33] (c) 2009 Alex "Y_Less" Cole

    Spoiler anzeigen
    [11:55:33] 0.3d-R2 500 Players "dnee"

    Spoiler anzeigen
    [11:55:33] ===============================

    Spoiler anzeigen
    [11:55:33] Loaded.
    [11:55:33] Loading plugin: streamer
    [11:55:33]

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

    Spoiler anzeigen
    [11:55:33] Loaded.
    [11:55:33] Loading plugin: mysql
    [11:55:33] SA:MP MySQL Plugin v2.1.1 Loaded.
    [11:55:33] Loaded.
    [11:55:33] Loaded 3 plugins.

    Spoiler anzeigen
    [11:55:33] [MySQL] Thread running. Threadsafe: Yes.
    [11:55:33]
    [11:55:33] Filterscripts
    [11:55:33] ---------------
    [11:55:33] Loaded 0 filterscripts.

    Spoiler anzeigen
    [11:55:33] [MySQL] Error (0): Failed to connect. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_ping called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (1): Failed to connect. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (1): Function: mysql_ping called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadHouses
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadBiz
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadOwnableCars (0)
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadOrgs
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_fetch_row called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadOnlineRecord
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadGangZones
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] LoadFactory
    [11:55:33] Alle Objekte wurden geladen...
    [11:55:33] Alle Schlagbäume werden geladen...
    [11:55:33] Alle Getränke Automaten wurden geladen...
    [11:55:33] Alle Drogen/Materials sind geladen worden...
    [11:55:33] Alle Teleports sind nun geladen...
    [11:55:33] Alle Gekauften Fahrzeuge wurden geladen...
    [11:55:33] Alle Mietwagen wurden geladen...
    [11:55:33] Alle Kaufbaren Produkte wurden geladen...
    [11:55:33] Alle Fisch Zonen wurden geladen...
    [11:55:33] Alle Hotels wurden geladen...
    [11:55:33] Alle Businesse wurden geladen...
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    Den Error zick 1000 mal=>[11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).

    Spoiler anzeigen
    [11:55:33] Tuning ist Beladen
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    DIESE ERROR FOLGE CA. 1000 mal

    Spoiler anzeigen
    11:55:33] Der Kofferraum ist beladen
    [11:55:33] Alle Ringe wurden geladen...
    [11:55:33] Alle Schießstände wurden geladen...
    [11:55:33] Alle Bankautomaten wurden geladen...
    [11:55:33] Alle NoDM-Zonen wurden geladen...
    [11:55:33] Alle GangZonen wurden geladen...
    [11:55:33] Alle Tankstellen wurden geladen...
    [11:55:33] Alle Häuser wurden geladen...
    [11:55:33] Alle Kauf-TC wurden geladen...
    [11:55:33] [MySQL] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] [MySQL] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
    [11:55:33] Alle Team Fahrzeuge wurden geladen...
    [11:55:33] ______________________________

    Spoiler anzeigen
    [11:55:33] | Häuser wurden geladen: 0000 |
    [11:55:33] | Geschäfte wurden geladen: 0000 |
    [11:55:33] | Fahrzeuge wurden geladen: 0000 |
    [11:55:33] | Fragen wurden geladen: 0000 |
    [11:55:33] | Geschäfte vom Transporter: 0394 |
    [11:55:33] | Objeckte vom Transporter: 4865 |
    [11:55:33] | Pickups vom Transporter: 0000 |
    [11:55:33] | Gangzonen wurden geladen: 0000 |
    [11:55:33] ______________________________
    [11:55:33] Script[gamemodes/urp-1-0-1i.amx]: Run time error 4: "Array index out of bounds"
    [11:55:33] Number of vehicle models: 41


    Ich hab noch was vergessen:
    Zu den MySQL-Erros:
    Die Error entstehen dadurch, dass irgendwie keine richtige Verbindung aufgebaut wird zur datenbank.
    Jedoch verbindet der dann doch irgendwie, weil der server nicht runterfährt

    Guten Abend Breadfish,


    ich habe gerade das unreal-rp script gefunden und wollte es auf meinem PC zum laufen bringen.
    Habe auch die Datenbank aufgespielt und wenn ich den Server starte, dann bekomme ich
    1. geschätzte 1000 mysql_errors und
    2. ich bekomme folgenden error: "Run time error 4: "Array index out of bounds"


    Danke für die Hilfe im Vorraus
    Helti

    stock LoadAuto(playerid,slot)
    {
    if(SpielerHatAuto(playerid) == 0) return 1;
    if(mysql_GetInt(Tabelle_Auto,"Slot","Besitzer",SpielerName(playerid)) == 0) return 1;
    new query[128],data[128],name[30];
    GetPlayerName(playerid,name,sizeof(name));
    format(query,sizeof(query),"SELECT * FROM "Tabelle_Auto" WHERE Besitzer = '%s' AND Slot = %i",name,slot);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())
    {
    mysql_fetch_field("Model",data);
    SpielerAutoInfo[playerid][slot][Model] = strval(data);
    mysql_fetch_field("PosX",data);
    SpielerAutoInfo[playerid][slot][AutoX] = strval(data);
    mysql_fetch_field("PoxY",data);
    SpielerAutoInfo[playerid][slot][AutoY] = strval(data);
    mysql_fetch_field("PosZ",data);
    SpielerAutoInfo[playerid][slot][AutoZ] = strval(data);
    mysql_fetch_field("PoxA",data);
    SpielerAutoInfo[playerid][slot][AutoA] = strval(data);
    mysql_fetch_field("Color1",data);
    SpielerAutoInfo[playerid][slot][AutoFarbe1] = strval(data);
    mysql_fetch_field("Color2",data);
    SpielerAutoInfo[playerid][slot][AutoFarbe2] = strval(data);
    SpielerAutoInfo[playerid][slot][VehID] = AddStaticVehicle(SpielerAutoInfo[playerid][slot][Model],SpielerAutoInfo[playerid][slot][AutoX],SpielerAutoInfo[playerid][slot][AutoY],SpielerAutoInfo[playerid][slot][AutoZ],SpielerAutoInfo[playerid][slot][AutoA],SpielerAutoInfo[playerid][slot][AutoFarbe1],SpielerAutoInfo[playerid][slot][AutoFarbe2]);
    }
    mysql_free_result();
    return printf("Auto vom Spieler %s wurde von Slot %i geladen",SpielerName(playerid),slot);
    }
    Ich habe gerade herausgefunde, dass wenn ich die Funktion des Stocks irgendwo benutzten möchte, dass dann nur die errorsskommen
    z.B.
    for(new i;i<MAX_PLAYER_AUTOS;i++)
    {
    LoadAuto(playerid,i);
    }

    Ja definiert


    new AutoHausVehicle[SpielerAutoKauf]=
    {
    //Model,Name,AutoHaus,Preis,PosX,PosY,PosZ,PosA,BuyPosX,BuyPosY,BuyPosZ,BuyPosA
    {411,"Infernus","Test",50,413.7033,-1548.4258,29.7545,279.8517,335.3468,-1515.5037,35.5319,289.3404},
    {560,"Sultan","Test",64,413.7033,-1548.4258,29.7545,279.8517,335.3468,-1515.5037,35.5319,289.3404}
    };

    Ok danke und jetzt habe ich noch ein Problem bei diesem:


    for(new vid;vid<sizeof AutoHausVehicle;vid++) {
    CreateVehicle(AutoHausVehicle[vid][Model],AutoHausVehicle[vid][PosX],AutoHausVehicle[vid][PosY],AutoHausVehicle[vid][PosZ],AutoHausVehicle[vid][PosA],1,1,-1);
    }


    Dort bekommt ich ein Warning und es werden keine Autos gespawn

    Code
    GCC.pwn(696) : warning 213: tag mismatch

    Guten Morgen Breadfish,


    meine Frage:
    Was sind die max.Koordinaten von Textdraws in Höhe und Breite(so dass man sie grad noch sieht).
    Danke im Voraus.


    Helti

    Guten Abend Breadfish.
    Diese Codes machen mir heute zu schaffen.
    format(query2,sizeof(query2),"CREATE TABEL IF NOT EXISTS `extdaten`(`Id` int(11) AUTO_INCREMENT,`Name` varchar(30),`email` varchar(70),`TSIdentität` varchar(40),PRIMARY KEY (`Id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;");
    mysql_query(query2);
    new query3[500];
    format(query3,sizeof(query3),"CREATE TABEL IF NOT EXISTS `auto`(`Id` int(11) AUTO_INCREMENT,`Besitzer` varchar(30),`Model` int(4),`PosX` float(10),`PosY` float(10),`PosZ` float(10),`PosA` float(10),`Color1` int(3),`Color` int(3),`Preis` int(7),PRIMARY KEY(`ID`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;");
    mysql_query(query3);
    Sie werden zwar ausgeführt, aber errors im MySQL-Debug entstehen und es werden keine Tabellen erstellt.
    Errors:

    Code
    [20:48:31] >> mysql_query( Connection handle: 1 )
    [20:48:31] CMySQLHandler::Query(CREATE TABEL IF NOT EXISTS `extdaten`(`ID` int(11) AUTO_INCREMENT,`Name` varchar(30),`eMail` varchar(70),`TS-Identität` varchar(40),PRIMARY KEY (`ID`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABEL IF NOT EXISTS `extdaten`(`ID` int(11) AUTO_INCREMENT,`Name` varchar(30),`e' at line 1)
    [20:48:31] >> mysql_query( Connection handle: 1 )
    [20:48:31] CMySQLHandler::Query(CREATE TABEL IF NOT EXISTS `auto`(`ID` int(11) AUTO_INCREMENT,`Besitzer` varchar(30),`Model` int(4),`PosX` float(10),`PosY` float(10),`PosZ` float(10),`PosA` float(10),`Color1` int(3),`Color` int(3),`Preis` int(7),PRIMARY KEY(`ID`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABEL IF NOT EXISTS `auto`(`ID` int(11) AUTO_INCREMENT,`Besitzer` varchar(30),`M' at line 1)