Jump to content

cs8898

Members
  • Posts

    54
  • Joined

  • Last visited

Posts posted by cs8898

  1. Hy Guys,

    and i have an Problem, i have to list a directory, but the io module is deactivated

    my idea

    for file in io.popen("dir mods/*.*d* /b"):lines() do 
          print(file) 
    end 
    

    Do you have any solutions

    Would nice to get some Answers

    sorry for mad realy bad english

  2. Da ich auch nicht weis welchen account du meinst, gehe ich mal von einem UserAccoun auf einem localhost server aus...

    im prinzip ganz einfach öffne die internal.db (in \mods\deathmatch) mit SQLite Browserhttp://sourceforge.net/projects/sqlitebrowser/...

    dann klicke auf "Browse Data" als Table wählst du Table: "accounts"

    in die password spalte tragst du nen md5 hash des neuen passworts rein die andern spalten sind egal :D

  3. Hallo ich habe mal wieder eine füllig ungewöhnliche Frage

    kann man irgendwie ein Verzeichnis auflisten meine idee war

    for file in io.popen("dir mods/*.*d* /b"):lines() do 
         print(file) 
    end 
    

    aber das io modul ist deaktiviert :(

    habt ihr ne methode

    noch bevor die Frage kommt, nein ich kann nicht einfach die Daten in die Meta.xml einfügen

    Schonmal Vielen dank, dass ihr das durchgelesen habt, währe nett, wenn ihr mir ne Antwort gibt

  4. I know what you mena with the table i used table.getn() to show how many items are in the table but if i use table.getn(Table[1]) to see the second row, it answers 0 but if i want to get the variable table[1] it schows the error bekause it's nil, but the first has one data

    @Anderl ther is no need of global/local variables

    if i use table.concat() it answers "invalid value (table) at index 1 in table for 'concat'"

  5. When i tried to get data from my sql Server, i got an Table with one object but that objects is nil why?

    could it be, that the sql Server istn't ready?

    the code:

    outputChatBox("halloWelt") 
    rpg_db = dbConnect("mysql","dbname=mta_rpg;host=127.0.0.1","***","****") -- ***=uname ****=password 
    if not rpg_db then 
    outputConsole ("failed") 
    end 
    outputChatBox("loaded") 
    q = dbQuery(rpg_db,"SELECT fname FROM acc") 
    res = dbPoll(q,-1) 
    outputChatBox(table.getn(res[1])) 
    --for i = 1,table.getn(res) do 
    --  outputChatBox( res[i][1]..":"..res[i][2]..":"..res[i][3]) 
      
    --end 
    outputChatBox("mysqlQery") 
      
    

  6. you like to make a rpg-server with now knowlage about events???

    ok lets start

      
    policeVehicles = { [598]=true,[596]=true,[597]=true,[599]=true }   --[objectid]=policecar(true/false) if an object isn't listed its autamaticly false 
    function getPlayerTeamPolice(player) 
         if policeVehicles[getElementModel(source)] 
             if getPlayerTeam(player) <> "police" then --if player team not police 
                 cancleEvent() 
                 outputChatBox("you are not an police man!") 
            end 
        end 
    end 
      
    addEventHandler ( "onVehicleStartEnter", getRootElement(), getPlayerTeamPolice ) 
      
    

    that is a serverside script

    watch next time the wiki!

    you find also that on https://wiki.multitheftauto.com/wiki/On ... StartEnter

  7. if i start an dbConnect to my local my sql server i got the massage:

    libmysqlclient.so.15: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verz

    eichnis nicht gefunden

    in English:

    libmysqlclient.so.15: Can't open Shared-Object-File: File or Directory dosn't exist

    i googled that and some wone sad install mysqlclient, i done it, but it dosnt work

    im using ubuntu 10.2.4 LTS x64 Desktop version

    Coud somebody help me, please

  8. Fals da noch von belang ist änder doch in der config file einfach den port, aber es sollte doch auch in der console ein fehler stehen, wie port already used, oder sowas stand mal bei mir...

    also die /mods/deathmatch/mtaserver.conf im eintrag "22003" da steht auch, dass dies ein udp port ist, ich glaube der 22005 wird für das webgui als tcp port genutzt

  9. 2 Dinge

    das beim Einloggen is das System auf dem der Server läuft

    oder hostest du den Server local des gibts ja au

    und

    schon mal geschaut, ob mann was einstellen muss?

    ich kenn mich jetz mit vio ned so aus, ich bestehe auf selbst geschriebenes(is billiger und meist auch dem eigenem wunsch entsprechen)

    das skript angeschaut, fl haben dies ja nicht compiled

  10. Un Compiled

    outputChatBox(string.upper("haL12Lo")) 
    function changeBlurLevel ( command, blur ) 
        blur = tonumber(blur) 
        if not blur or blur > 255 or blur < 0 then 
            outputChatBox ( "Enter a value between 0 - 255.") 
        else 
            setPlayerBlurLevel ( blur ) 
            outputChatBox ( "Blur level set to: " .. blur) 
        end 
    end 
      
    addCommandHandler("blur", changeBlurLevel) 
    

    Compiled

    http://i.imgur.com/2WfDE.png

  11. ich find die idee geil :D

    ich frag mich nur, cs88988, wirst du das script später öffentlich in die community posten oder nur an uhm senden? weil ich hätte interesse daran und würde mir wenn nicht jetzt selbst anfangen sowas zu scripten.. ich fands cool wenn dus öffentlich machst^^

    achso ned cs88988 sondern cs8898 aber egal wir wissen wen du meinst

    is auf github :D

    https://github.com/cs8898/

    da is auch noch ein stat system drauf und noch nä abänderung von nem script von nem andern typen für metro style websyten

  12. I dont know exactly what you mean but may use

    Meta.xml

      
    <meta> 
    <info type="script" version="1.0" name="OtherModle." author="foo"/> 
    <script type="client" src="script.lua"/> 
    <file type="client" src="file.txd"/> 
    <file type="client" src="file.dff"/> 
    </meta> 
    

    script.lua

    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function() 
      txd = engineLoadTXD("file.txd", 475 )--modle_id Sabre=475 
      engineImportTXD(txd, 475) 
      dff = engineLoadDFF("file.dff", 475 ) 
      engineReplaceModel(dff, 475) 
      end 
    ) 
      
    

    just replace 475 to the modle id to be repaced.

    may search in the map_editor for the right modle id

  13. I found two times :0/:O one of them replace them to alphanumeric names i mean a-Z 1-0

    Und noch in deutsch nur buchstaben groß ,klein und 1234567890;aber kein äöüß

    addEventHandler("onClientResourceStart",resourceRoot, 
    function () 
    Window = guiCreateWindow(583, 409, 197, 327, "Fake Cars", false) 
    guiWindowSetSizable(Window, false) 
      
    obutton = guiCreateButton(9, 96, 117, 33, ":O", false, Window) 
    Perennial = guiCreateButton(9, 131, 117, 35, "Perennial", false, Window) 
    Walton = guiCreateButton(9, 169, 118, 34, "Walton", false, Window) 
    Tampa = guiCreateButton(9, 206, 118, 34, "Tampa", false, Window) 
    AutoWählenLabel = guiCreateLabel(30, 57, 139, 15, "Bitte wähle ein Auto aus", false, Window) 
    Abbrechen = guiCreateButton(10, 288, 177, 29, "Abbrechen", false, Window) 
    OderMöchtestDu = guiCreateLabel(39, 269, 117, 15, "Oder möchtest du...", false, Window) 
    lable1 = guiCreateLabel(131, 104, 52, 15, "500$", false, Window) 
    guiLabelSetColor(, 23, 132, 5) 
    PerennialPreis = guiCreateLabel(131, 141, 53, 15, "2000$", false, Window) 
    guiLabelSetColor(PerennialPreis, 23, 132, 5) 
    WaltonPreis = guiCreateLabel(132, 181, 55, 15, "1500$", false, Window) 
    guiLabelSetColor(WaltonPreis, 23, 132, 5) 
    TampaPreis = guiCreateLabel(131, 218, 56, 15, "750$", false, Window) 
    guiLabelSetColor(TampaPreis, 23, 132, 5) 
    end 
    ) 
    

    fl. klappts ja dann

×
×
  • Create New...