Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Vector

  • Rank


  • Gang
  • Location
    Spain -> Navarra.
  1. Vector


    -- iterate over all the xml nodes and find those whose value and tag name matches... local children = xmlNodeGetChildren(root); for _, child in ipairs(children) do if (xmlNodeGetName(child) == tagName) and (xmlNodeGetValue(child) == someValue) then xmlDestroyNode(child); end; end;
  2. maybe the skill level of your player is not "poor". it can be "pro", "std" and "poor" local M1Garand = function() local skills = {"pro", "std", "poor"}; for _, skill in ipairs(skills) do setWeaponProperty(33, skill, "weapon_range", 180) setWeaponProperty(33, skill, "target_range", 180) setWeaponProperty(33, skill, "accuracy", 5) setWeaponProperty(33, skill, "damage", 50) setWeaponProperty(33, skill, "maximum_clip_ammo", -- s8) --> setWeaponProperty(33, skill, "move_speed", 90) setW
  3. setVehicleLocked getPlayerTeam getTeamFromName getPedOccupiedVehicle
  4. the server i try to connect to is the same server the client is connected to in MTA.
  5. I tried to use server-ip like this "http://x.x.x.x/image.png" and doesn´t work. and with a hostname like myserver.no-ip.org "http://myserver.no-ip.org/image" doesnt´work. error 1006
  6. Hi, I try to use fetchRemote in client-side but it doesnt work. in fact, it works when using fetchRemote in server-side I used to think that this error is because of client or server version are below the minimum required version. But I put this on the meta file, and stil the same error. client="1.3.2" server="1.3.0-9.03739"/> this works -> --server-side fetchRemote("http://localhost/image.png", function(data, errno) if errno == 0 then outputChatBox("error downloading image: " .. errno); return; end; triggerClientEvent
  7. i didn´t know that function exists. .)
  8. create a collision shape in server-side with createColCuboid createColSphere attach the collision shape to the ped with this. attachElements create an event handler for "onColShapeHit", to check if an element is inside the collision shape that surrounds the ped. attach the event handler to the collision shape. addEventHandler("onColShapeHit",...); check if the element is a player. if it is a player, trigger an event for that player to play the sound. triggerClientEvent -- to trigger the event. addEvent -- to use the event at client-side. addEvent
  9. -> outputDebugString(maleter["1"]); o outputDebugString(maleter[tostring(1)]); "Note: Indices of a JSON object such as "1": "cat" are being returned as string, not as integer."
  10. the table is not called "classes", is "class" for pIndex, classes in ipairs(class) do --Loop the classes outputDebugString(tostring(pIndex).." "..tostring(classes)) for index, classPackage in ipairs(classes) do outputChatBox(tostring(index).." "..tostring(classPackage)) end end
  11. Vector

    New chat

    hey, this is an example. -> only players around you will be able to see your chat messages. server-side. local maxDistance = 20; -- 20 metres will be the maximum distance to see player messages. addEventHandler("onPlayerChat", getRootElement(), function (message, messageType) if messageType==1 then return; end; -- do nothing if message is an action message. -- now, get players near the player who sent the message and store them in a table. local nearestPlayers = {}; local players = getElementsByType("player", getRootElement()
  12. server-side "onElementClicked" -- [url=https://wiki.multitheftauto.com/wiki/OnElementClicked]https://wiki.multitheftauto.com/wiki/OnElementClicked[/url] client-side "onClientClick" -- [url=https://wiki.multitheftauto.com/wiki/OnClientClick]https://wiki.multitheftauto.com/wiki/OnClientClick[/url]
  13. Vector

    ?? Need help

    yes, you need to read all the answers, search, and do it by yourself. dont´t expect other will do your homework.
  14. Vector

    ?? Need help

    1ºst way: create two different images and use guiStaticImageLoadImage when "onClientMouseEnter", "onClientMouseLeave" events are fired. -> bad way. client need to download 2 images from server. 2ºnd way: change the static image CEGUI property "ImageColours" to make the image a bit darker or brighter, when "onClientMouseEnter", "onClientMouseLeave" events are fired. ---> try this --> function blendStaticImageWithColor(guiStaticImage, r,g,b) local __hex = string.format("%X%X%X",r,g,b); guiSetProperty(guiStaticImage, "ImageColours", "tl:" .. __hex ..
  • Create New...