Jump to content

Nutella

Members
  • Posts

    4
  • Joined

  • Last visited

Nutella's Achievements

Vic

Vic (3/54)

0

Reputation

  1. function pobierzTabeleWynikow(query) local result=dbQuery(SQL,query) if (not result) then outputDebugString("mysql_query failed: (" .. mysql_errno(SQL) .. ") " .. mysql_error(SQL)) -- Show the reason return nil end local tabela={} for result,row in mysql_fetch_assoc(result) do table.insert(tabela,row) end mysql_free_result(result) return tabela end This bit of code throws: [2016-05-22 13:26:32] ERROR: ZapisPojazdowMySQL/zapis_s.lua:37: attempt to call global 'mysql_fetch_assoc' (a nil value) But from my investigation I found out that mysql_fetch_assoc is old and no longer used. How do I replace it?
  2. Dimos7, your "fix" did not work. I found it out by myself. Topic to be closed.
  3. So, ive got a marker, and the Idea is that a player in a car is going to drive in it, and then the server is going to ask the player to pay for a repair, I'll finish it, but here is what im standing on: local blip = createBlip ( 1953.40, 2162.52, 10.49 , 27 , 2 , 99999.0 ) local m1 = createMarker(1953.40, 2162.52, 10.49, "cylinder", 4.0, 255, 0, 0) function naprawa ( hitElement,playerSource, matchingDimension ) pojazd = getPedOccupiedVehicle(thePlayer) typ_elementu = getElementType(pojazd) stan_pojazdu = getElementHealth(pojazd)/10 if (isElementWithinMarker(thePlayer,m1)) then outputChatBox( "Automat naprawczy model HAIER-M3",kierowca, 255, 255, 0 ) if(pojazd ~= false) then outputChatBox( "Twoj pojazd ma "..stan_pojazdu.." punktów stanu pojazdu.") else outputChatBox( "Najpierw bądź w pojeździe!", thePlayer, 255, 50, 50 ) end end end addEventHandler( "onMarkerHit", m1, naprawa ) and the problem is, that the server gives: [2016-05-21 21:13:04] WARNING: naprawa/blip.lua:5: Bad argument @ 'getPedOccupiedVehicle' [Expected ped at argument 1, got vehicle] [2016-05-21 21:13:04] WARNING: naprawa/blip.lua:6: Bad argument @ 'getElementType' [Expected element at argument 1, got boolean] [2016-05-21 21:13:04] WARNING: naprawa/blip.lua:7: Bad argument @ 'getElementHealth' [Expected element at argument 1, got boolean] [2016-05-21 21:13:04] ERROR: naprawa/blip.lua:7: attempt to perform arithmetic on a boolean value
  4. Nutella

    Help

    Hello, I'm making little scripts for my friend, and he asked me to make a script which will change the color of wheel marks when you start a drift, and set them back to normal after the drift is ended. I know how to do the drift part, but, the question is, is there a function to change the wheelmark color?
×
×
  • Create New...