Jump to content

John Smith

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by John Smith

  1. The place where u have set elseif column.name =="rank"then Is placed where column table isnt defined yet so it returns nil
  2. replace ( from line 136 to line 144 with:) addEventHandler('onClientResourceStart', g_Root, function() for i,player in ipairs(getElementsByType"player") do nametag.create ( player ) end end )
  3. give me an example please i dont know how would code look like with the argument in function
  4. umm something like this? function deleteTeam() for i,team in ipairs(getElementsByType("team")) do if getTeamName(team) == "Team Name" then destroyElement(team) else return end end end
  5. which function do i need to remove team?
  6. John Smith

    nvm

    i havent removed them, but edited them. i have edited my post so that people wouldn't reply to it as i have solved the problem while there were no replies anyway as you request i have had a problem with tables considering assigning something depending on something but i have fixed it and used string.find feature to look through the table and got it like this like this arenaDimensions = { {"Zombie",0}, {"Freeroam",2}, {"Sumo",3}, {"Paintball",4}, {"Advanced Warfare",5}, {"Demolition",6}, {"Capture The Flag",7}, {"Capture The Vehicle",8}, {"Hide N Seek",9}, {"RPG",10}, {"Assassin",11}, {"Gun Game",12}, {"Lobby",9835}, } function applyDimensionOnStart() local arenaData = getElementData(source,"arena") for i,room in ipairs(arenaDimensions) do -- loop the table if string.find(room[1],arenaData) then -- if our element data is in table(e.g "Freeroam") outputChatBox("found data") -- let us know on chat setElementDimension(source,room[2]) -- set our dimension (data 2 in the table(number)) outputChatBox(tostring(room[2])) -- let us know about our dimension number end end end addEventHandler("onPlayerSpawn",root,applyDimensionOnStart) so i have a resource which changes my element data(by clicking my own buttons) and if my data of arena is "Freeroam", when i spawn it will look in the table to which dimension it should put me in and thats number 2 so when i spawn it's gonna give me 2nd dimension because my element data is "Freeroam" i can't really write what i've fixed as i deleted the whole code and started again to write it(from function till the event handler)
  7. John Smith

    nvm

    edit: nevermind i figured it out
  8. sumo image outputs in debugscript INFO: sumo image and theres no sumo anim image text when i leave the button and freeroam changes picture only ONCE and after that when i reach freeroam button it doesnt change the picture anymore edit: i have noticed that problem is that picture is being drawn over a button so i cant reach the button as image is "hiding" it but not sure how to make it that image changes when i hit gui image element
  9. i have done this function buttonEnter () if source == freeRoomButton then --freeRoomAnimImg = guiCreateStaticImage(500,500,675,122,"files/images/freeroam_hover.png",false,lobbyWindow) fh = guiStaticImageLoadImage(freeRoom,"files/images/freeroam_hover.png") outputDebugString("freeroam anim image") else return end if source == sumoButton then --sumoAnimImg = guiCreateStaticImage(500,300,675,122,"files/images/sumo_hover.png",false,lobbyWindow) sh = guiStaticImageLoadImage(sumoRoom,"files/images/sumo_hover.png") outputDebugString("sumo anim image") else return end end addEventHandler( "onClientMouseEnter", getRootElement(),buttonEnter) function buttonExit () if source == freeRoomButton then --freeRoom = guiCreateStaticImage(500,500,675,122,"files/images/freeroam.png",false,lobbyWindow) nf = guiStaticImageLoadImage(freeRoomAnimImg,"files/images/freeroam.png") outputDebugString("freeroam image") end if source == sumoButton then --sumoRoom = guiCreateStaticImage(500,300,675,122,"files/images/sumo.png",false,lobbyWindow) ns = guiStaticImageLoadImage(sumoAnimImg,"files/images/sumo.png") outputDebugString("sumo image") end end addEventHandler( "onClientMouseLeave", getRootElement(),buttonExit) now it makes image for freeroam but doesnt remove it when i leave it, and sumo image doesnt work at all when i move my cursor to it
  10. i tried this function buttonEnter () if source == freeRoomButton then freeRoomAnimImg = guiCreateStaticImage(500,500,675,122,"files/images/freeroam_hover.png",false,lobbyWindow) fh = guiStaticImageLoadImage(freeRoom,"files/images/freeroam_hover.png") outputDebugString("freeroam anim image") else return end if source == sumoButton then sumoAnimImg = guiCreateStaticImage(500,300,675,122,"files/images/sumo_hover.png",false,lobbyWindow) sh = guiStaticImageLoadImage(sumoRoom,"files/images/sumo_hover.png") outputDebugString("sumo anim image") else return end end addEventHandler( "onClientMouseEnter", getRootElement(),buttonEnter) function buttonExit () if source == freeRoomButton then freeRoom = guiCreateStaticImage(500,500,675,122,"files/images/freeroam.png",false,lobbyWindow) nf = guiStaticImageLoadImage(freeRoomAnimImg,"files/images/freeroam.png") outputDebugString("freeroam image") end if source == sumoButton then sumoRoom = guiCreateStaticImage(500,300,675,122,"files/images/sumo.png",false,lobbyWindow) ns = guiStaticImageLoadImage(sumoAnimImg,"files/images/sumo.png") -- line 90 outputDebugString("sumo image") end end addEventHandler( "onClientMouseLeave", getRootElement(),buttonExit) it outputs in debug that event was triggered but works only once and image doesnt change at all only error:90 bad argument guiStaticImageLoadImage (gui element is nil and idk how its nil)
  11. hey guys im trying to change image when my cursor enters a button's position but the image isnt changing at all and no debugscript 3 errors function buttonEnter () if source == freeRoomButton then freeRoom = nil freeRoomAnimImg = guiCreateStaticImage(500,500,675,122,"files/images/freeroam_hover.png",false,lobbyWindow) end if source == sumoButton then sumoRoom = nil sumoAnimImg = guiCreateStaticImage(500,300,675,122,"files/images/sumo_hover.png",false,lobbyWindow) end end addEventHandler( "onClientMouseEnter", getRootElement(),buttonEnter) function buttonExit () if source == freeRoomButton then freeRoomAnimImg = nil freeRoom = guiCreateStaticImage(500,500,675,122,"files/images/freeroam.png",false,lobbyWindow) end if source == sumoButton then sumoAnimImg = nil sumoRoom = guiCreateStaticImage(500,300,675,122,"files/images/sumo.png",false,lobbyWindow) end end addEventHandler( "onClientMouseLeave", getRootElement(),buttonExit) please help if you know how i could fix this edit: i have discovered by debugging that when this events work only once and then when i enter the button again it doesnt work
  12. denny give more links of trap music plz
  13. Guys, it's his choice to decide how much it costs, if you think it's expensive you can write that it is too expensive, but don't argue about it.There are many things in world which are overpriced (e.g apple products) and i guess you haven't went to their website(s) to complain about their prices, have you? This guy has made a nice radar, he has set a fair price, and 1 post of your opinion is enough.There is no need to keep repeating your own opinion about price over and over again.If you don't want to buy it, don't.You can share your opinion, but don't just spam this topic just about that 1 little thing because you think you will make something out of it. As i said, it's up to him to decide the cost of this, there is no need to argue and/or make drama out of the price value.
  14. if it's already to me, it can't go back to me nor reverse to me which causes a paradox in time and space continuum in universe and therefore sends a 'fy' message to everyone except me.
  15. it works same like it did before and also like before its still like this projectile changes rotation of movement depending on my position but they go in sky far far away and they dont come to ground at all i just want to make it realistic so when player hits marker it creates projectile from a51 rocket launcher object and sends projectile onto my position and i am not sure how to do it... it goes in wrong direction
  16. i need to make multiple missiles thats why im using a timer but i dont know how to make createProjectile with all those arguments inside a timer...
  17. im trying to make a marker and when player hits marker from one of area 51 rocket objects come projectiles and it should go to the player position but instead it goes to random positions function createMissiles() missileMarker = createMarker(355.373046875,1944.513671875,17.640625,"corona",1.5,255,0,0,255) -- create red corona end addCommandHandler("missile",createMissiles) function triggerMissiles(hitPlayer,matchingDimension) if source == missileMarker then local x,y,z = getElementPosition(hitPlayer) setTimer(function() createProjectile(localPlayer,20,354.0361328125,2027.9912109375,26.000198364258,nil,hitPlayer,0,90,0,1,1,1) end,250,0) end end addEventHandler("onClientMarkerHit",getRootElement(),triggerMissiles) please help
  18. At the moment using custom vehicle IDs is not possible so instead you need to replace already existing vehicle IDs and that line would only add bmw z4 on freeroam panel list You need to add custom vehicle model by yourself
  19. Zerb je global moderator i iz balkana al je inaktivan
  20. oh yeah, he is spoke on chinese, probably just a little rare mistake. i think he meant how can he draw a gif animation which would be loading gif animation there is a 'Useful function' for that https://wiki.multitheftauto.com/wiki/DxDrawGifImage
×
×
  • Create New...