Jump to content

Weii.

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Weii.

  1. playSound("sound.mp3") --or playSound3D("sound.mp3",x,y,z)
  2. addEventHandler("onClientGUIClick", label, function() --change label end , false) It is same as buttons
  3. Weii.

    Modules

    Thanks for answer, this is probbably hard since I haven't seen any special modules on any server...
  4. Weii.

    Modules

    Not sure if this is right board but What can you achieve with modules ? Can you make own GUIs? Or webbrowsers and stuff? I would realy appriciate any tutorials for developing modules.
  5. local minutes = 5 --here change how many u want setTimer ( function ( ) local vehicles = getElementsByType ( "vehicle" ) if ( #vehicles > 0 ) then for _, vehicle in ipairs ( vehicles ) do local player = getPedOccupiedVehicle ( vehicle ) if ( not player ) then destroyElement ( vehicle ) end end end end , minutes * 60000, 0)
  6. local account = tostring(getElementData ( source, "username" )) this should be like local account = tostring(getElementData ( player, "username" )) I think
  7. do outputChatBox(toJSON(datas)) and post here
  8. check if he has car like if (#datas == 0) then -- You have no car end
  9. addEventHandler ( "onPlayerCommand", root, function ( command ) if ( isPlayerMuted(source) ) then if (command ~= "report") then cancelEvent ( ) end end end )
  10. Try removing a priority at job like exports['scoreboard']:scoreboardAddColumn( "job" , getRootElement() , 20, "job")
  11. exports['scoreboard']:scoreboardSetColumnPriority( "Name" , 2) -- here should be uppercase Name exports['scoreboard']:scoreboardAddColumn( "id" , root , 20, "id" , 1 ) I've tryed stuff and that works Proof:
  12. exports['scoreboard']:scoreboardAddColumn( "id" , getRootElement() , 20, "id" , 0 ) Maybe this will work, happend to me before that I had column before name, I can't realy remember how I made it
  13. Weii.

    mysql question

    Thanks IIYAMA! I just use it for this example, I use exports to my mysql resource...
  14. Weii.

    Tiny help *-*

    if (getPlayerTeam(source)) then r,g,b = getTeamColor(getPlayerTeam(source)) outputChatBox ( "#FF0000* [Owner] "..RGBToHex(r,g,b) .. getPlayerName ( source ) .. ":#FFFFFF " .. msg, getRootElement(), r, g, b, true ) end function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
  15. Weii.

    mysql question

    I have a question if I add a mysql into looping function will cause server to lag ? I can't realy test it, but if there would be 50 players on server will server lagg? Code looks someting like that: function test() for index, player in ipairs(getElementsByType("player")) do dbQuery(con, "UPDATE ....") end end
  16. You can either check for every group with this if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then or you can simply use if (hasObjectPermissionTo(source, "function.kickPlayer", false)) then
  17. function zapiszEkwipunek() testing = {} for k,v in pairs( Plecak )do for i=1, wysokoscY do if not (Plecak[k][i] == false) then table.insert(testing, v) end end end return testing end -- and they save it like inventoryJson = toJSON(zapiszEkwipunek()) -- and get it from json inventoryTable = fromJSON(inventoryJson)
  18. Don't know what you meant, but try spawning vehicle in server side!
  19. Weii.

    Health

    function checkHeal() for index, value in ipairs (getElementsByType("player")) do local health = getElementHealth(value) if (health and health < 100) then setElementHealth(value,health+5) end end end setTimer(checkHeal,1000,0)
  20. local otherPlayer = exports["ID_System"]:getPlayerFromPartialName(thePlayer, otherPlayer, true) if (not otherPlayer) then return end Try that, I think it should work
×
×
  • Create New...