Jump to content

Aibo

Retired Staff
  • Posts

    1,105
  • Joined

  • Last visited

Everything posted by Aibo

  1. it wasn't stopped, more like stalled. you know not a huge lot of people care about it at all
  2. Aibo

    Website designing

    your own site is broken. none of the links work and contact page throws 404 error.
  3. Aibo

    delete

    what exactly is "not working"? /debugscript 3 can help you with that. from a quick look: in client script you are adding event handlers with functions like buyNextMap before those functions even created.
  4. nothing happened because nobody is working on the current community site. so this was acknowledged for (actually it was already in) the new version, which is in (slow) development.
  5. 1. isElementWithinMarker 2. triggerServerEvent > triggerClientEvent 3. guiSetText 4. stopSound/destroyElement
  6. function fixCar(player) if getPedSkin(player) == 50 and isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) if getElementHealth(vehicle) < 80 then fixVehicle(vehicle) givePlayerMoney(player, math.random(10, 100)) else outputChatBox("`Эта машина не нуждается в ремонте...", player, 0, 213, 0) end end end addCommandHandler("x", fixCar)
  7. Aibo

    Fire

    createFire() doesn't create any elements, and returns only true/false. its just an effect. you might want to take a look at particle objects resource.
  8. change skin to Classic. i wouldnt say its "cant be seen" totally, but yeah, its lower conrast than the old one.
  9. yet you've decided to post it here as a tutorial? good grief.
  10. first thing you should've done is output the values you're trying to compare, because it is obvious that something is wrong there. -- before if (getElementData ( playercar, "owner" ) == getElementData ( source, "playerid" )) then -- you should do something like outputChatBox("Car owner value: "..tostring(getElementData ( playercar, "owner" ))..", playerid value: "..tostring(getElementData ( source, "playerid" ))) or outputDebugString if debugging is on. see what is in those values, if they are the same (numbers? idk what playerid is), maybe one of the numbers is not a number, but a string.
  11. well that't what i meant by "mine is different". it's not a bug, it's supposed to work that way. since you've used both 'up' and 'down' keybinds yourself, i assumed that is how you wanted it to work. well anyway, if you want switching: local hiding = false function hideVehicles(key, state) hiding = not hiding for _, player in ipairs(getElementsByType('player')) do if player ~= localPlayer then setElementDimension(getPedOccupiedVehicle(player), hiding and 1 or 0) setElementDimension(player, hiding and 1 or 0) end end outputChatBox(hiding and "[iNFO]: Currently Hiding Vehicles." or "[iNFO]: Currently Showing Vehicles.") end bindKey('F1', 'down', hideVehicles)
  12. ага. апдейт кстати, что-то я не подумал вообще: -- clientside function outputPlayerList() outputChatBox("Players online: "..table.concat(getElementsByType("player"), ", ")) end addEventHandler("onClientResourceStart", resourceRoot, outputPlayerList) -- serverside function outputPlayerList() outputChatBox("Players online: "..table.concat(getElementsByType("player"), ", "), source) end addEventHandler("onPlayerJoin", root, outputPlayerList)
  13. im amazed it even works with missing ends for first if/else in both functions.
  14. local hiding = false addEventHandler("onClientResourceStart", resourceRoot, function() bindKey('F1', 'down', hideVehicles) bindKey('F1', 'up', hideVehicles) end ) function hideVehicles(key, state) if (hiding and state == 'down') or (not hiding and state == 'up') then return false end hiding = not hiding for _, player in ipairs(getElementsByType('player')) do if player ~= localPlayer then setElementDimension(getPedOccupiedVehicle(player), hiding and 1 or 0) setElementDimension(player, hiding and 1 or 0) end end outputChatBox(hiding and "[iNFO]: Currently Hiding Vehicles." or "[iNFO]: Currently Showing Vehicles.") end PS: meh , already posted. well mine is a little different
  15. Aibo

    Show Time

    local screenWidth, screenHeight = guiGetScreenSize() addEventHandler("onClientRender", root, function() local time = getRealTime() dxDrawText(string.format("%02d:%02d", time.hour, time.minute), screenWidth - 1160, 920, screenWidth - 110, 200, tocolor(0, 159, 255, 255), 1.5, "Arial", "center", "top", false, false, false) end ) also you should really fix your positioning (screenWidth - 1160 is not the way, people with 1024 or 800 screen width wont see anything). if you want it to be on the left side, use positive pixel offset from the left side, which is 0. same with height. 920 pixels is way too far, for example i run mta at 1280x720, i wont see that. people with 1024x768 resolution also wont see that. and you'll be amazed how many people play at 800x600.
  16. -- clientside function outputPlayerList() local list = "You" for i, player in ipairs(getElementsByType("player")) do if player ~= localPlayer then list = list..", "..getPlayerName(player) end end outputChatBox("Players online: "..list) end addEventHandler("onClientResourceStart", resourceRoot, outputPlayerList) -- serverside (по идее не будет ждать, пока что-то там загрузится) function outputPlayerList() local list = "You" for i, player in ipairs(getElementsByType("player")) do if player ~= source then list = list..", "..getPlayerName(player) end end outputChatBox("Players online: "..list, source) end addEventHandler("onPlayerJoin", root, outputPlayerList)
  17. "else" is not obligatory. and you dont need "return" for a loop to work. also you can exit the loop using "break", though im not sure if that is what you want
  18. i wonder, why noone cares about: --Copyright ©, Jesseunit --Please, do not Re-distribute
  19. rotation parameters in moveObject function are relative. so if you don't want to rotate your object - dont use them, or put 0,0,0.
  20. create it clientside and use onClientMarkerHit event.
×
×
  • Create New...