Jump to content

.:HyPeX:.

Members
  • Posts

    1,255
  • Joined

  • Last visited

Everything posted by .:HyPeX:.

  1. As the title says, server function is never called... Client: addEvent('onClientWantStats',true) addEvent('onPlayerRequestMapList',true) function askStats() if not cooldown then cooldown = true setTimer(function() cooldown = nil end, 10000,1) outputChatBox("Asked: C") triggerServerEvent("onPlayerRequestMapList",localPlayer) return triggerServerEvent('onClientWantStats',localPlayer) else return false end end Server: function onClientAskMapList() outputChatBox("Called",root) if client ~= source then outputChatBox("Client Faking!! Player: "..getPlayerName(client), root,255,255,255,true) return end local maplist = exports.mapmanager:getMapsCompatibleWithGamemode( getResourceFromName('race') ) outputChatBox(#maplist,root) triggerClientEvent(client,"onPlayerReturnMapList",client,maplist) end addEventHandler("onPlayerRequestMapList",root,onClientAskMapList)
  2. I dont think so, its a ped attacking, i think only GTA's gamespeed can affect that..
  3. As the title says, are mapmanager calls ( exports ) server only? I'm reciving "call failed" from client so far. Error: call: failed to call 'mapmanager:getMapsCompatibleWithGamemode' [string "?"] local maplist = exports.mapmanager:getMapsCompatibleWithGamemode( getResourceFromName('race') ) However command "maps race" returns: 'race' has 7 maps: -FUN-airplaNe---Reality ([FUN] airplaNe - Reality) KiwiVol7 ([DM] Kiwi Vol.7 - Perception) [DM]AbodyRulez-Vol6-Seven-Deaths ([DM]AbodyRulez Vol.6 - Seven Deaths) [DM]OldSchoolSkillZ ([DM]>>|-Old_School_SkillZ-|<<) [DM]ZeroCool_-v4-_Dirty_Imaginations ([DM] ZeroCool vol.4 - Dirty Imaginations) editor_test ([DM] ZeroCool vol.4 - Dirty Imaginations) hypex-testtop (Hypex-Testtopmap)
  4. Thank You. But how do i obtain it (root of resource) coming from another resource? (I.e. a resource manages the rest for this scenario) Edit: Nevemind. Thanks.
  5. Hello, is there any way i could attach some kind of element data to resources ? (Since they're not elemments...) Mainly the idea is to save in the resource some info but i'm not sure. Another way would be some XML info files in the resource's directory, but if it was a compressed one, MTA could still write inside it? Greetz HyPeX
  6. Is there any limit? Becouse i see how it could abuse some of those "clicks per min" pages hehe.
  7. Yeah, i was also wondering if there was any other. (For example, exports)
  8. Hello everyone, my idea today is converting a JSON string (created from an array or the array itself depending on the method) to be constantly updated, To indicate the player's pressed keys. My first thought was element data, the second one was triggerEvent. Wich is the best and fastest method to do this? (Lowest latency / delay) Greetz HyPeX
  9. Its not a single problem of mine, it was experienced amongst 3 or 4 players (all the ones who were there) Restarting the server & clients somewhat fixed the issue...
  10. Everything running is default from MTA right now. the FPS lags are still visible..
  11. That runs on server's performance sadly, there's no client part.
  12. Hello everyone, how can i check wich resource could be causing FPS lags on the client? i couldnt find it by disabling & enabling resources, it is laggy overally...
  13. Oh thanks, i guess that will help, i'll try that.
  14. bump, any idea over this? Else i thought about disabling Gravatar itself, but i dont know how.
  15. Make them cache? Or just edit it with fileWrite functions, add some random character when stopping the script at the start of the image file, and remove it when loading, so it will be corrupted.
  16. I'm looking at the profile_portal table, pp_gravatar is an empty field... This is the current link showed in the avatar of said member: http://www.gravatar.com/avatar/c675d881 ... _large.png However i coudlnt find this anywhere..
  17. Hello, i got a question, where in the IPB database can i find the external link for external images used on avatars? This is becouse normal uploaded images are seen in the table "profile_portal", under the "pp_main_photo" column, but if the avtar is an external link, then the field appears blank...
  18. Hello everyone, i just had an idea crossing my mind. Whenever you download an image, you can have it as a simple text string. Now, my question is, knowing how the .gif image is coded, couldnt some code decode it into images manually? (To fix the need to do it manually with the usefull function dxDrawGifImage) So far this is how an image is in a text string: I belive this is not possible to "decode" itself, but if we could just open it like hexeditor does.. Then decoding it and separating every image shouldnt be that hard. (Comparatively) Is it possible by any means in MTA? EDIT: It seems like it al relies on being able to go back and forth to the hex, this page seemed pretty easy: http://www.flexhex.com/docs/howtos/hex-editing.phtml
  19. .:HyPeX:.

    sendKeys

    Did you even read my post?
  20. The scrollbar just jumps to the top whenever i click to move it (And it was already moved down), and starts to move from there.
  21. Well this is weird, every time i click the position where it is is not remembered and jumps to 0... scrollbar = {} function scrollBar(_,_,cx,cy) if not scrollbar.oldx then return end local bx,by = 582,368 local mx,my = cx - scrollbar.oldx, cy - scrollbar.oldy if upanel.tab.achivements.scroll.moving1 then local start = by-338 local ending = by-166 local total = ending-start local oldprog = upanel.tab.achivements.scroll.list1 -- This is a 0-1 progress local current = (total * oldprog) outputChatBox(my.." "..my / (total / 338) ) local my = my local current = current + my local prog = current / 338 local prog = math.min(prog,1) local prog = math.max(prog,0) --outputChatBox(oldprog.. " "..prog) upanel.tab.achivements.scroll.list1 = prog end end addEventHandler('onClientKey',root,function(key,status) local bx,by = 582,366 if key == "mouse1" then if showingPanel then if tab == 1 then if isCursorShowing() then local cx,cy = getCursorPosition() local cx,cy = cx*x,cy*y if status then outputChatBox(cx.." "..x*0.525+22+bx-12) if cx > x*0.525+22+bx-12 and cx < x*0.525+22+bx then local progress = upanel.tab.achivements.scroll.list1 or 0.2 local start = by-338 local ending = by-166 local middle = ending-start local pos = middle*progress local by = by-338 + y*0.4+20 + pos if cy > by and cy < by + 166 then addEventHandler('onClientCursorMove',root,scrollBar) upanel.tab.achivements.scroll.moving1 = true scrollbar.oldx = cx scrollbar.oldy = cy end end else if upanel.tab.achivements.scroll.moving1 then removeEventHandler('onClientCursorMove',root,scrollBar) scrollbar = {} end end end end end end end) I tried doing the follow on the first function: local prog = current / total It works.. but the scrollbar kinda bugs on, moves faster than the mouse and not properly.
  22. .:HyPeX:.

    sendKeys

    Just edit the code wich uses autosignin and call the function or cmd on resource start or whenever.
  23. What about attachElements? cold you attach the ped to the car?
×
×
  • Create New...