Jump to content

bartje01

Members
  • Posts

    208
  • Joined

  • Last visited

Posts posted by bartje01

  1. Okay, I've got this now:

    server side:

      
    addCommandHandler( "deletetime", 
        function( player, cmd, place ) 
              
             
            if deleteTimeOnline == false then return outputChatBox("#33ccffDeleting toptimes disabled by default",player,255,255,255,true) end 
            if not _TESTING and not isPlayerInACLGroup(player, g_Settings.admingroup) then 
                return 
            end 
            if g_SToptimesManager and g_SToptimesManager.mapTimes then 
                local row = g_SToptimesManager.mapTimes:deletetime(place) 
                if row then 
                    g_SToptimesManager:updateTopText() 
                    local mapName = tostring(g_SToptimesManager.mapTimes.mapName) 
                    local placeText = place and " #" .. tostring(place) or "" 
                    triggerClientEvent ( "onDeleting", getRootElement(), "Hello World!" ) 
                    outputServerLog( "INFO: Top time"..placeText.." from '" ..tostring(row.playerName).. "' (" ..tostring(row.timeText).. " in " ..mapName.. ") deleted by " .. getAdminNameForLog(player) ) 
                end 
            end 
        end 
      
    ) 
      
    

    client side:

      
    function deleteTimeHandler (mapName,placeText) 
    local screenHeight, screenWidth = guiGetScreenSize() 
    local mapName = tostring(g_SToptimesManager.mapTimes.mapName) 
    local placeText = place and " #" .. tostring(place) or "" 
    dxDrawText ( mapName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "deleting" ) 
      
    end 
      
    addEvent( "onDeleting", true ) 
    addEventHandler( "onDeleting", getRootElement(), deleteTimeHandler ) 
      
    

    How much did I fuck up here :P ?

  2. Hey guys. I 'm trying to show my deleting toptimes script showing up in a dxdrawtext instead of a simple output.

    I have this:

      
    addCommandHandler( "deletetime", 
        function( player, cmd, place ) 
              
              
            if deleteTimeOnline == false then return outputChatBox("#33ccffDeleting toptimes disabled by default",player,255,255,255,true) end 
            if not _TESTING and not isPlayerInACLGroup(player, g_Settings.admingroup) then 
                return 
            end 
            if g_SToptimesManager and g_SToptimesManager.mapTimes then 
                local row = g_SToptimesManager.mapTimes:deletetime(place) 
                if row then 
                    g_SToptimesManager:updateTopText() 
                    local mapName = tostring(g_SToptimesManager.mapTimes.mapName) 
                    local placeText = place and " #" .. tostring(place) or "" 
                    dxDrawText ( mapName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "deleting" ) 
                    outputServerLog( "INFO: Top time"..placeText.." from '" ..tostring(row.playerName).. "' (" ..tostring(row.timeText).. " in " ..mapName.. ") deleted by " .. getAdminNameForLog(player) ) 
                end 
            end 
        end 
      
    ) 
      
    

    And this errors:

      
    [2013-02-19 13:55:49] ERROR: unzipped\race_toptimes\toptimes_server.lua:398: attempt to perform arithmetic on global 'screenHeight' (a nil value) 
    [2013-02-19 13:55:59] ERROR: unzipped\race_toptimes\toptimes_server.lua:398: attempt to perform arithmetic on global 'screenHeight' (a nil value) 
      
    

    Could anyone please help me?

  3. Oh and the cmd I had to add to the race_voting.lua

      
      
    addCommandHandler('33ff33x1', 
        function( player, command, ... ) 
            local query = #{...}>0 and table.concat({...},' ') or nil 
            if not query then 
                if g_ForcedNextMap then 
                    outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) 
                else 
                    outputRace( 'Next map is not set', player ) 
                end 
                return 
            end 
            local map, errormsg = findMap( query ) 
            if not map then 
                outputRace( errormsg, player ) 
                return 
            end 
            if g_ForcedNextMap == map then 
                outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) 
                return 
            end 
            g_ForcedNextMap = map 
        end 
    ) 
      
    

  4. Hey guys. A while ago I had a problem with buying nextmaps. The maps didn't show up in my mapbrowser. Now they do. I had to change the gamemodename. Now there's another problem. When it says that I've setted the map and it took t he cash from me. The nextmap is not setted. What could be the problem?

  5. The code is mine from a resource i uploaded to community so he didn't steal it.

    That code is quite a bit different from what you want, i believe you may need to edit race for player to be able to exit vehicle.

    You can try contact the scripter of "AMG", he made a script which you can use to play deathmatch (with guns - without vehicle) after you died in deathmatch (race - with vehicle).

    Thankyou, finally a worthy comment. I'll take look in the race recourse myself first. After that I'll try to contact him.

×
×
  • Create New...