Jump to content

sckatchof

Members
  • Posts

    394
  • Joined

  • Last visited

Posts posted by sckatchof

  1. Jareb hetha

    Client side :

    local shaders = {} 
      
    addEventHandler("onClientElementStreamIn",root, 
        function () 
            if getElementType(localplayer ) == "vehicle" then 
                loadVehicleLights(localplayer ) 
            end 
        end 
    ) 
    addEventHandler("onClientVehicleEnter",root, 
        function () 
            loadVehicleLights() 
        end 
    )         
      
    function loadVehicleLights () 
        local controller = getVehicleController(localplayer ) 
        if not controller then return end 
        local image = getElementData(controller,"vehiclelight") 
        if not image then return end 
        if not shaders[image] then 
            local texture = dxCreateTexture("images/"..image..".jpg","dxt3") 
            local shader = dxCreateShader("lights.fx") 
            dxSetShaderValue(shader,"gTexture",texture) 
            shaders[image] = shader 
        end 
        engineApplyShaderToWorldTexture(shaders[image],"vehiclepoldecals128",vehicle) 
    end 
      
    function unloadVehicleLights () 
        local controller = getVehicleController(localplayer ) 
        if not controller then return end 
        local image = getElementData(controller,"vehiclelight") 
        if not image then return end 
        engineRemoveShaderFromWorldTexture(shaders[image],"vehiclepoldecals128",vehicle) 
    end 
    

  2. I Don't understnd you why write this? I only good like the page of wikipedia of the MapInfo functions, or how i can get orher maps informations?

    I don't understand what you want exactly you want to make gui to get map informations ?!

  3. No not good.

    try this

    XML file :

     
    type="script" version="1.0" name="Police Station" author="boro"/> 
         

    Client side :

     addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()),  
    function() 
     engineImportTXD ( engineLoadTXD ( "policeST.txd", 1456 ), 1456 ) 
      end 
    )  
    

  4. oh that's no good. could you connect before? did you remove the root account before adding a new one? is the mysql server running on the same server as the php server with phpMyAdmin? windows or linux?

    windows 7 but now i change Mysql config it's work with 127.0.0.1/phpMyAdmin but with localhost/phpMyAdmin don't work

    Forbidden 
      
    You don't have permission to access /phpmyadmin/ on this server. 
    

    1171140413.png

  5. hi guys i have problem with connect to mysql :

    function getMySQLconnection() 
        MySQlc= dbConnect( "mysql", "dbname=Khodja;host=127.0.0.1", "username", "password", "share=1" ) 
        if MySQlc then  
            outputDebugString ( "Server is now connected with the MySQL database!") 
            exports.TNSDxChatBox:CreatDxChatBoxForPlayer(root, "Server is now connected with the MySQL database!", 0,255,0) 
            return true 
        else 
            exports.TNSDxChatBox:CreatDxChatBoxForPlayer(root, "Connection with the MySQL database failed!", 255,0,0) 
            outputDebugString ( "Connection with the MySQL database failed!" ) 
            return false 
    end 
    end 
    addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), getMySQLconnection ) 
    

    Error : MySQl/mysql.lua line:2: dbConnect failed; Host 'DELL-PC' is not allowed to connect to this Mysql database server 
    

  6. There are 22 Arab countries, will get a mess and everyone wants a special section for his country.

    but the 22 arab countries they don't understand our language like you !! and we understand all arabic languages and we can't write with that keyboard that's take alot of time like sparrow said !!!

  7. hi guys how can make the money show like this on scoreboard : $ x.xxx.xxx

    server side :

    addEventHandler("onClientRender",getRootElement(), 
        function() 
            if not starttick then 
                starttick = getTickCount() 
            end 
            currenttick = getTickCount() 
            if currenttick - starttick >= 1000 then 
                setElementData(player, "Money" , "$"..getPlayerMoney( player ) ) 
                starttick =  getTickCount() 
            end 
        end 
    )       
    

  8. Didn't I just send you fixed(?, not tested but it's fixed xD) code?

    still don't work i tested it then i make that to test simple script but still don't work ! i want in this script when i enter to turf zone it show that msg " test 1 "

      
    .. 
    .. 
    --{Tabel} 
    .. 
      
    function OnresourceOpen (player) 
      for ID in pairs(Turfids) do 
         local fX, fY, fZ = Turfids[ID][1], Turfids[ID][2], Turfids[ID][3] 
         CreateColid = createColCuboid ( fX, fY, fZ, 10.0, 10.0, 10.0 ) 
      if CreateColid then 
             addEventHandler( "onColShapeHit", CreateColid, cuboidHit, false ); 
    end 
    end 
    end 
    addEventHandler("onResourceStart", resourceRoot, OnresourceOpen) 
             
    function cuboidHit (player) 
            outputChatBox ( "Test 1", player, 255, 0, 0 ) ---{ Just for test }--- 
    end 
      
      
    

  9. Show your whole code.

    i want just to test but it's don't work . (sorry for bad english )

    server side ( Testing part ) :

    function OnresourceOpen (player) 
      for ID in pairs(Turfids) do 
         local fX, fY, fZ = Turfids[ID][1], Turfids[ID][2], Turfids[ID][3] 
         CreateColid = createColCuboid ( fX, fY, fZ, 10.0, 10.0, 10.0 ) 
      if CreateColid then 
             addEventHandler( "onColShapeHit", CreateColid, cuboidHit, false ); 
    end 
    end 
    end 
    addEventHandler("onResourceStart", resourceRoot, OnresourceOpen) 
             
    function cuboidHit (player) 
            outputChatBox ( "Test 1", player, 255, 0, 0 ) 
    end 
    

×
×
  • Create New...