Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. No. The code itself is messed up.
  2. You shouldn't check for money on the client-side, use the table to check for the price server-side.
  3. This should be easy for you to fix. local db_host = "localhost" local db_username = "" local db_password = "" local db_table = "blbalbalba" local db_port = "3306" local connection = false function connect() connection = dbConnect("mysql","dbname="..db_table..";host="..db_host..";port="..db_port,db_username,db_password) if (connection) then outputConsole("A szerver sikeresen csatlakozott az adatbázishoz.",1) return true else outputConsole("Nemsikerült csatlakozni az adatbázishoz újrapróbálás 5 másodperc múlva...",1) setTimer(connect,5000,1) end end addEventHandler("onResourceStart",resourceRoot,connect)
  4. getPlayersInTeam isPedDead
  5. JR10

    Trigger problem

    This is probably right, however, it's different from your code.
  6. JR10

    Trigger problem

    You didn't specify the base element parameter. Server-side: local pickup = createPickup(2196.70,1677.11,12.36,3,1273,0) addEventHandler ( "onPickupHit", pickup, function( hitPlayer ) if (hitPlayer and getElementType ( hitPlayer ) == 'player' and not isPedInVehicle (hitPlayer) ) then triggerClientEvent(hitPlayer,"show", root) end end)
  7. You're missing one column's value. Line 24: executeSQLQuery ( "INSERT INTO `Mute` ( PlayerSerial,Date,Name,By,Reason ) VALUES(?,?,?,?,?)",tostring(Serial),tostring(Date_Time),tostring(Name),tostring(By),tostring(Reason))
  8. JR10

    Help

    This shouldn't be a problem, if the function doesn't accept any parameters, providing it with ones won't matter.
  9. JR10

    Help

    What exactly is the problem here? The text is not there? Money doesn't update? Please explain better. If there are any errors please post them.
  10. I know this doesn't help you nor answer your question but, why don't you just use the CEGUI one? It's efficient and bug-free. It doesn't have to be inside a window, just create it in the right position to suit the rest of your dx user interface.
  11. Use getTickCount whenever the player opens the panel and store it. Then just compare that with the current tick. function openPanel() if (open_tick and getTickCount() - open_tick > 300000) then open_tick = getTickCount() -- code end end
  12. You can replace models for certain players, however, you can't replace certain vehicles, you have to replace all the vehicles of the same model.
  13. It isn't. Performance aside, it's better to use several resources. As for live updates, like Necktrox said, scheduled server restarts would do.
  14. You would increment the first number only, which controls the starting at index. You're welcome.
  15. For the first 5, append: "LIMIT 0, 5" For the second 5, append: "LIMIT 5, 5" The first one is the start at index, 0 is the first row, 5 is the 6th row. The second one is the number of rows to get.
  16. function vipReplaceModele (_, acc) local accName = getAccountName (acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent (source, "onReplace", root ) end end addEventHandler('onPlayerLogin', root, vipReplaceModele) function replaceModele () local txd = engineLoadTXD("hydra.txd") engineImportTXD(txd, 520) local dff = engineLoadDFF("hydra.dff", 520) engineReplaceModel(dff, 520) end addEvent( "onReplace", true ) addEventHandler( "onReplace", root, replaceModele )
  17. What about the development process though? You'll have to restart the whole game-mode to implement any change, however small it is. Another disadvantage is extensibility and collaboration. It won't be a walk in the park to allow others to contribute and test their work. The major advantage for me is OOP, classes and objects are much easier to work with.
  18. JR10

    Help XML

    local teams = {} function start() local file = xmlLoadFile ( "datos.xml" ) local children = xmlNodeGetChildren ( file ) for index, node in pairs ( children ) do local name = xmlNodeGetAttribute(node, 'name') local index = 0 while (xmlFindChild(node, 'color', index) do local color_node = xmlFindChild(node, 'color', index) local red = xmlNodeGetAttribute ( color_node, "red" ) teams[name] = {"red" = red} index = index + 1 end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), start) Though, this doesn't seem logical. If you have more than one color node, it will just be the last one's red value.
  19. JR10

    Help XML

    If there is more than one color child then you can do this to find them all: function start() local file = xmlLoadFile ( "datos.xml" ) local children = xmlNodeGetChildren ( file ) for index, node in pairs ( children ) do local index = 0 while (xmlFindChild(node, 'color', index) do local color_node = xmlFindChild(node, 'color', index) outputChatBox(xmlNodeGetAttribute ( color_node, "red" )) index = index + 1 end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), start)
  20. It's available for you to download. Yes.
  21. JR10

    question

    addEventHandler('onPlayerChat', root, function(msg, type) if (type == 0 and string.find(msg, 'word') then --do something --source here is the player who sent the message end end)
  22. JR10

    question

    If you don't mean commands then use onPlayerChat and string.find.
  23. Post in the Arabic forum, perhaps this might suit you better. viewforum.php?f=119
  24. There's no way to set a certain theme to all the players with existing gui. You either use what I gave you or make your own UI with dx functions.
×
×
  • Create New...