Jump to content

Hale

Members
  • Posts

    174
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Hale

  1. Hi, can anyone make a xml tutorial? If not, can you at least tell me if there's a way to input tables into .xml file? If so, how? Thanks in advance.
  2. Hale

    Freezing ped

    I found a better solution (mapped objects around him and set their alpha to 0) but thanks for your help!
  3. Hale

    Freezing ped

    The ped walks as expected, but his xyz jumps around a few points (max ~0.5) all the time.
  4. Hale

    Freezing ped

    I didn't explain myself quite right... What I want is the ped to walk in place, without bugging out.
  5. Hale

    Freezing ped

    Hi again. I freezed my ped with setElementFrozen and it works fine, but once I use setPedAnalogControlState (to make him walk) the ped starts walking but he's bugging out, is there any way to fix that?
  6. Tried it already, tried again now. The ped just walks normally like player when holding W.
  7. EDIT: Walk works with 'forwards' and state below 0.5, but sprint still isn't in function. function movePed() if (source == GUIEditor.button[1]) then setPedAnalogControlState(ped, 'forwards', 0.2) elseif (source == GUIEditor.button[2]) then setPedAnalogControlState(ped, 'forwards', 1) elseif (source == GUIEditor.button[3]) then setPedAnalogControlState(ped, 'forwards', 0) end end
  8. Hi, so I'm triggering this code via GUI: function movePed() if (source == GUIEditor.button[1]) then -- Walk button setPedAnalogControlState (ped, 'walk', 1) elseif (source == GUIEditor.button[2]) then -- Sprint button setPedAnalogControlState (ped, 'sprint', 1) elseif (source == GUIEditor.button[3]) then -- Stop button setPedAnalogControlState (ped, 'forwards', 0) end end The problem is: Stop button works, but Walk and Sprint don't. I've tried using 'forwards' instead of 'walk' and that works, but 'walk' and 'sprint' don't work. Anyone has a possible solution? Thanks in advance!
  9. Hi, to cut the story short, I'm learning MySQL functions within Lua and I want to know how to fetch multiple rows, for instance: I need to find a row that has stored '0' in its column 'fuel', but there are more rows containing such data in the same column. So, what does this return? local fuel = mysql:query_fetch_assoc("SELECT name FROM `vehicles` WHERE `owner` = " .. mysql:escape_string(characterID) .. " and `fuel` = 0 and `type` = 1") In this case "name" is the vehicle name, and there is a possibility of more rows containing health = 0 and type = 1, and I'm wondering how to fetch more rows to get the "name" from them and then I'd output the name into their chatbox, something like Your following vehicles have no fuel left: Sultan Infernus . . PS: This is just an example. Thanks in advance, if I didn't make myself clear somewhere please say so and I'll explain it as simply as possible!
  10. I am using it, although in a different function. Well, what's the difference? As I don't really need to know the length, is it important or something?
  11. So I have this problem with element attachments (I think) in my SMS system. What happens is next: I send an SMS to lets say number 1337, and when that person wants to respond by /rsms *message* it returns the two outputchatbox lines, "SYNTAX..." and "Use..." ones. The problem is probably in the last line, but I tried lots of things and, well, none really worked tbh lol. Any ideas of how to fix this? if tostring(commandName):lower() == "rsms" and (...) then local target = getElementData(thePlayer, "targetSMSer") if not (...) then outputChatBox("No one sent you an SMS to reply on.", thePlayer, 255,0,0) return false end message = phoneNumber.." "..table.concat({...}, " ") else if tostring(commandName):lower() == "sms" and not number or not (...) then outputChatBox("SYNTAX: /sms [number] [message]", thePlayer, 255, 194, 14) outputChatBox("Use /rsms to reply on your most recent SMS.", thePlayer) elseif callerphoneIsTurnedOn == 0 then outputChatBox("Your phone is off.", thePlayer, 255, 0, 0) elseif getElementData(thePlayer, "injuriedanimation") then outputChatBox("You can't use your phone while knocked out.", thePlayer, 255, 0, 0) elseif exports.global:hasMoney(thePlayer, 1) then local message = table.concat({...}, " ") setElementData(thePlayer, "targetSMSer", phoneNumber, false)
  12. items = { {name = "Pig Mask", itemID = 223, objectID = 2374, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Monster Mask", itemID = 224, objectID = 2396, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Hockey Mask", itemID = 225, objectID = 2397, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Monkey Mask", itemID = 226, objectID = 2398, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Smoking Monkey Mask", itemID = 227, objectID = 2399, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Carnival Mask", itemID = 228, objectID = 2407, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Anonymous Mask", itemID = 240, objectID = 953, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Sun Glasses", itemID = 241, objectID = 1666, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}}, {name = "Bandana (Head)", itemID = 0, objectID = 2377, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}, default = false}, {name = "Bandana (Mask)", itemID = 0, objectID = 2392, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}, default = true}, {name = "Bandana (Knot)", itemID = 0, objectID = 2382, bone = 1, position = {0, 0, 0, 0, 0, 0, 1}, default = false} }
  13. Yes you can, you can make not just flags but any object by using 3ds max, sadly you have to buy it, or *cough*
  14. Hi there lads, so I got some scripts from an old pal, and what it does is that you can put custom textured masks onto your face, and you can edit the X, Y and Z with a GUI, making it much simpler. Sadly, the most important part of the script was compiled, so when I decompiled it, it got messy as hell. Now this below is just a small part of it, and this is the part where I get the error. The script was working fine, but I wanted to add some more masks, and when I edited the other .lua files I got an error in this script, and these were shown in /debugscript mode: And after that error it just stacks up more errors because the global of 'createObject' (POSITION_OBJECT) didn't work. I suppose something is wrong with "ITEM_OBJECT = v.objectID" but I have no idea why wouldn't that work... If you need more than this, just reply saying so and I'll put more function wearable_initialize_system(WEARABLE_ITEM) ITEM_ID_NAME = WEARABLE_ITEM for k, v in ipairs(items) do if v.name == WEARABLE_ITEM and legit == 1 and WEARABLE_GENUINE_CHECK then ITEM_ID = v.itemID ITEM_OBJECT = v.objectID POSITION_BONE = v.bone ITEM_DEFAULT = v.default break end end wearable_check_position_exist() POSITION_OBJECT = createObject(ITEM_OBJECT, 0, 0, 0) local _, _, X_ATTACH, Y_ATTACH, Z_ATTACH, RX_ATTACH, RY_ATTACH, RZ_ATTACH = exports.bone_attach:getElementBoneAttachmentDetails(POSITION_OBJECT) exports.bone_attach:attachElementToBone(POSITION_OBJECT, LOCAL_PLAYER, 1, 0, 0, 0, 0, 0, 0) for OFFSET_ADDRESS = 1, NUM_CUBOIDS do local CUB_X, CUB_Y, CUB_Z, CUB_WIDTH, CUB_DEPTH, CUB_HEIGHT = unpack(CUBOID_PARAMETERS) local X_OFF, Y_OFF, Z_OFF = unpack(ATTACH_OFFSETS[OFFSET_ADDRESS]) local CUB_ELEMENT_TEMP = createColCuboid(CUB_X, CUB_Y, CUB_Z, CUB_WIDTH, CUB_DEPTH, CUB_HEIGHT) attachElements(CUB_ELEMENT_TEMP, POSITION_OBJECT, X_OFF, Y_OFF, Z_OFF, RX_ATTACH, RY_ATTACH, RZ_ATTACH) POSITION_DATA.CUBOIDS[OFFSET_ADDRESS] = CUB_ELEMENT_TEMP end addEventHandler("onClientPreRender", getRootElement(), wearable_initialize_lines) setElementDimension(POSITION_OBJECT, getElementDimension(LOCAL_PLAYER)) setElementInterior(POSITION_OBJECT, getElementInterior(LOCAL_PLAYER)) end
  15. They use custom textures, probably their own, you can do it with functions: engineImportTXD engineLoadTXD engineLoadDFF engineReplaceModel
  16. Oh Gee, Thanks bro. By the way nice website and your mta life story on "About Author"
  17. It doesn't even have it, like others (SuperModerator etc.). Do I need to add it or what?
  18. Nope, I'm not that stupid. I did it before I started server, and it still doesn't work.
  19. I did it, but again... same error. I did it like this: "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.mapmanager"> "resource.webadmin"> "user.RevaX"> "resource.netools"> What is wrong?
  20. Good job, helped me too
  21. Hi guys, I am here to ask you for help because I cant fix this... I tried but I'm just a beginner in scripting so I don't know what is the problem here. So, I changed many things in admin.zip, but it's just "player has been banned by admin" etc., probably that's not the problem. I changed few things like that in race.zip, but the error says: "WARNING: mapmanager\mapmanager_main.lua:380: Acces Denied @ 'startResource' " , "ERROR: race/_common.lua:235 mapmanager: map resource can not be started. " , "ERROR: call: failed to call 'mapmanager:changeGamemodeMap' [string "?"] " Here it is if you wanna check it out for yourself: http://img715.imageshack.us/img715/9429/bugmq.jpg Please help guys, I will give you more informations about this if you need it!
×
×
  • Create New...