Jump to content

xXMADEXx

Members
  • Posts

    2,718
  • Joined

  • Last visited

Everything posted by xXMADEXx

  1. There's a much easir way, so he doesn't have to go threw and change createPickup everywhere. -- Tästä lisää paikkoja -- {x, y, z} local apickup = { {2516,-1953.7,15.89999961853}, {2312.8000488281,-1460.7,20.1}, {1767.8,-1372.4,14.7}, {815.7,-1108.2,25.8}, {838.7,-2056.5,12}, {-967,-2158,34}, {-2336.3,-1623.5,482.8}, {-2134.1,181.8,34.2}, {-2737.8,129.3,3.4}, {-2519,1545,16.4}, {-1681.8,1210,20.2}, {1160,1394.5,5}, {2449.6,662.7,10.4}, } local _createPickup = createPickup function createPickup() local random = math.random ( #apickup ) local x, y, z = apickup[random][1], apickup[random][2], apickup[random][3] armor = _createPickup( x, y, z, 2 ) setElementCollisionsEnabled( armor, false ) bl = createBlipAttachedTo(armor,23) outputChatBox( "Armor pickup on spawnannut! Nouda se pääkallon luota.", root, 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot,createPickup) addEventHandler("onPickupHit",root, function ( player ) if ( source ~= armor ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( Pickup ) destroyElement( bl ) setPedArmor ( player, 100 ) local armor = getPedArmor( player ) outputChatBox("Sait armorisi täyteen (".. tostring(armor) ..")", player, 0, 250, 0) setTimer( createPickup, 90000, 1 ) end )
  2. There are most likley some resources where the lag is coming from, possibly from memory leaks. You can read this: viewtopic.php?f=114&t=76913#p706236 Use the "ipb" resources (default by MTA) to look threw your resources and try to find ones using a lot of memory, and remove those resources.
  3. Is it possible that the image files became corrupt somehow, or is there anything that prints to debugscript?
  4. You can keep ".log" but change your query string to this: SELECT * FROM Test WHERE PlayerName=?;
  5. xXMADEXx

    Garage

    I don't believe that there is one on the community, you're going to need to make one yourself.
  6. xXMADEXx

    Freeroam

    I'm not entirely sure, but there should be a setting in the freeroam/meta.xml to enable or disable it.
  7. xXMADEXx

    UCP?

    User Control Panel, where users can do things such as modify the gameplay, message other players, and other things like that.
  8. xXMADEXx

    Web thinga....

    There's all sorts of videos for it on Youtube. I would recommend watching this play list: (thenewboston is a great user for learning programming)
  9. It's not a stupid idea actually, chances are the player base for MTA would sky rocket, but there aren't enough developers to do it.
  10. xXMADEXx

    HUD

    Your blip distance is probably to low. Check createBlip and look at the visible distance parameter.
  11. An error I noticed the moment I saw the code was this: dbExec(con,"CREATE TABLE IF NOT EXISTS data(text)") It should be something like this: dbExec ( con, "CREATE TABLE IF NOT EXISTS data ( value TEXT )" ); You cannot use "text" as a column name, because it's a reserved word for SQL. Server: local data = {} con = dbConnect("sqlite",":/saver.db") local tableSaver = {} addEvent ("makeIt", true) addEventHandler("makeIt",root, function () dbExec ( con, "CREATE TABLE IF NOT EXISTS data ( value TEXT )" ); local queryer = dbQuery(con,"SELECT * FROM data") local poll = dbPoll(queryer,-1) if poll and queryer then local answer = tostring(poll[1]) if getPlayerSerial (source) == "-------------" then triggerClientEvent(source, "savedData", source, queryer, poll, answer) end end end ) addEvent("onSaveTheText",true) addEventHandler("onSaveTheText", root, function(text) tableSaver[1] = text dbExec(con,"UPDATE data SET value=?",text) end ) addEvent ("checkIt", true) addEventHandler ("checkIt", root, function () local answer = tableSaver[1] dbExec(con,"UPDATE data SET value=?",tostring(answer)) triggerClientEvent (source, "onStartAddIt", source,answer) end ) If it still doesn't work let me know, and upload any error(s) it gives in debugscript.
  12. You need to contact the developer.
  13. You need to get the uncompiled version of the script, then compile it at luac.multitheftauto.com
  14. Add this to the admin ACL group: <object name="resource.login_panel" />
  15. I actually started on working on a new type of a list thing that will list the OOP functions, and what they used to be. Here's a little screen of it (I know, it's not he most stylish web page on the internet)
  16. Thank you, I didn't see those links at the bottom of the page.
  17. xXMADEXx

    OOP Classes

    Hey guys. I'm learning the OOP for MTA 1.4, but I don't know all of the classes... Is there a list of all of the 1.4 classes and their sub functions somewhere? Thanks.
  18. memberlist.php?mode=viewprofile&u=72164 You can ask him him, he will probably do it.
  19. We aren't here to make scripts for you, we're here to help you. If you're not willing to learn anything, you need to pay a scripter.
  20. Check this topic: viewtopic.php?f=114&t=31463
  21. xXMADEXx

    Login

    Use guiCreateStaticImage.
  22. No, it's a class of functions (or a table as known in Lua) For example, you could write this: for i, v in pairs ( Player ) do outputChatBox ( tostring ( i ).." -> "..tostring ( v ) ) end To output all of the functions in the Player class/table.
  23. Oh, seems cool, nice work!
  24. OOP is Lua, it's just introducing classes and that kind of stuff. Here's an example of the differences: Non-OOP Lua function giveRandMoney ( ) local p = getRandomPlayer ( ) givePlayerMoney ( p, 100 ) end OOP Lua (I'm guessing giveMoney is in the player class, but im not sure) function giveRandMoney ( ) local p = Player.getRandom ( ) p:giveMoney ( 1000 ) end It's somewhat just how the scripter wants to write, but if they program in any other languages then they're going to want to do OOP because most programming languages such as C, C++, PHP, etc... are all OOP.
  25. xXMADEXx

    I need help

    It looks like you're trying to add the player element. Use getPlayerName function addPlayero() for id,playeritem in ipairs(getElementsByType("player")) do guiComboBoxAddItem(combo, getPlayerName ( playeritem ) ) end end
×
×
  • Create New...