Jump to content

Aibo

Retired Staff
  • Posts

    1,105
  • Joined

  • Last visited

Everything posted by Aibo

  1. the thing you should do is check if thePlayer is an element, like: outputChatBox(type(thePlayer)) -- should be 'userdata' maybe your script isnt server-side after all. and Draken: it doesnt matter how many values getCameraMatrix returns, you dont have to get them all. and if that head admin check wouldnt work, then there wouldn't be a concatenation error for lz var. you're wasting his time.
  2. Aibo

    table find

    Anim:Create ( myElem, pulseOut, { } ) — pulseOut here is not a string, it's a variable, probably nil. if you're still making this kind of errors, perhaps it's not the time to dive into OOP and classes.
  3. это весь XML? если да, то: в XML должен быть корневой нод, который возвращается функцией xmlLoadFile() т.к. тут его нет, корневым считается , потому xmlNodeGetChildren() возвращает нод , у которого нет атрибута "name". отсюда false. формат вот такой должен быть: <settings> <group name="Main"> <text>Welcome to the deathmatch server, enjoy your stay.</text> </group> <group name="Other"> <text>Bla-bla-bla.</text> </group> </settings>
  4. XML это не скрипт: -- все, что - грузится в клиент или
  5. в meta.xml он добавлен как клиентский?
  6. ну надо проверять, работает ли вообще скрипт, грузится ли хмл-файл, сколько нодов получено функцией и т.д. и т.п. на один дебагскрипт полагаться нельзя, самому надо дебажить иногда.
  7. guiGridListSetItemText(GUIEditor_Grid[1],row,1,name,false, false)
  8. Aibo

    alc Group Show

    because this is not how aclGetGroup works
  9. то что отваливается — это странно. рассинхронизация получается. а с камерой не баг, камера обрабатывает коллизии, в том числе и с прицепленной машиной. можно попробовать setElementCollisionsEnabled для приклеенной машины или setCameraClip
  10. function car_perevoz() veh = createVehicle ( 578, -706.70941162109, 882.99017333984, 14.0797290802 ) gruz = createVehicle ( 422, -706.70941162109, 882.99017333984-2, 14.0797290802+0.5 ) attachElements ( gruz, veh, 0, -2, 0.5, 0, 0, 0 ) end addEventHandler ( "onResourceStart", resourceRoot, car_perevoz )
  11. таймер не элемент, потому: isTimer насчет денег уходящих в минус непонятно, вроде не должно.
  12. Aibo

    Grafitty Markers

    yea, i placed the handler before the function. my bad. as for comma, it is not wrong. and it shouldnt delete all, try disabling event propagating in handler.
  13. Aibo

    Grafitty Markers

    local myMarkers = { { 588.2734375, -1532.080078125, 14.239238739014, "cylinder", 1.7, 255, 0, 0, 100, source }, { 568.921875, -1360.4970703125, 13.930986404419, "cylinder", 1.7, 255, 0, 0, 100, source }, -- you can add more } for i, markerData in ipairs(myMarkers) do addEventHandler("onMarkerHit", createMarker(unpack(markerData)), myMarkerHit) end function myMarkerHit(player) triggerClientEvent(player, "aoutput", player, "Informatie", "Ai gasit un grafiti ascuns si ai primit 100 lei felicitari, poti spreia peste sau pleca mai departe.") exports.global:giveMoney(player, 1000) removeEventHandler("onMarkerHit", source, myMarkerHit) destroyElement(source) end
  14. Aibo

    onDoubleCLick

    lua highlighter is fixed, you can use lua tags now.
  15. testing: assert dofile error getfenv getmetatable ipairs load loadfile loadstring next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall thanks, Blokker
  16. also "Team1" should be in quotes, it's a team name string "cylinder" should be in quotes, it's marker type string setPlayerTeam should use myTeam element and not "Team1" name
  17. its another frankenstein script. meaning you just sticked some parts together, tried it on the server, on the client, and of course it doesnt work anywhere, because you have absolutely no idea what you're doing. main problems here are: the lack of quotes and inconsistent variable names.
  18. you should've checked that file before posting. because it has duplicate functions in "Lua" AND "Client and Server". so first a function like ipairs gets parsed as a Lua function: <a href="http://www.lua.org/manual/5.1/manual.html#pdf-ipairs">... and then parsed again as a MTA Client and Server function: <a href="http://www.lua.org/manual/5.1/manual.html#pdf-<a href="https://wiki.multitheftauto.com/wiki/ipairs">">... and here it breaks down. i guess that file was used in here, and now we got ipairs, tostring and other basic Lua stuff broken. could someone please remove these functions from "MTA Client and Server" array (5) in lua.php: assert dofile error getfenv getmetatable ipairs load loadfile loadstring next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall PS: if that file was generated by a resource, that resource should be fixed to exclude native Lua functions from "Client and Server".
  19. Aibo

    Color = kick.

    Not working. you resource must have access to kickPlayer function. and that is because you dont need getPlayerName() when using onPlayerConnect: function checkForColorCodes(name) if string.find(name, "#%x%x%x%x%x%x") then cancelEvent(true, "Color codes in the name") end end addEventHandler("onPlayerConnect", root, checkForColorCodes)
  20. Aibo

    Color = kick.

    function checkForColorCodes() if string.find(getPlayerName(source), "#%x%x%x%x%x%x") then kickPlayer(source, "Color codes in the name") end end addEventHandler("onPlayerJoin", root, checkForColorCodes)
  21. Aibo

    Some skins

    sorry, was cleaning up my upload folders, deleted them. "Orange" and "Black" links are back. "Lighter Black" is not, since it's a part of MTA install now.
  22. colors dont change because all the values for arguments passed to the timer/function are evaluated before timer starts. so you need to randomize the color in the function that is called by timer. function randomColors(pVehicleSG) local r,g,b = math.random(0,255), math.random(0,255), math.random(0,255) setVehicleColor(pVehicleSG, r, g, b) setPlayerNametagColor(getVehicleController(pVehicleSG), r, g, b) end addEvent("carCol",true) addEventHandler("carCol", root, function(pVehicleSG) setTimer(randomColors, 1000, 1000, pVehicleSG) end )
×
×
  • Create New...