Jump to content

w3rt1x

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

w3rt1x's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Hello y'all! I need help. I wanna do this, when I click to the dxImage "phone.png" this image will be destroyed and the "phone_main.png" will draw. How can I do this? I tried to do "creatingMain" function to draw and destroy, however it ain't working. Thank you! Maybe it's the stupid question, but im just noob local isImage = false addEventHandler("onClientRender", root, function() if(isImage) then block = dxDrawImage(969, 618, 220, 423, "phone.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) -- draw image if isImage true function creatingMain() dxDrawImage(969, 618, 220, 423, "phone_main.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) destroyElement(block) end addEventHandler ( "onClientClick", root, creatingMain) -- dxDrawImage(969, 618, 220, 423, "phone_main.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) showCursor(true) end end ) bindKey("i", "down", function() if(isImage) then isImage = false showCursor(false) else isImage = true end end )
  2. w3rt1x

    dxImage

    Hello everyone! I wanna draw dxDrawImage when I clicked "O" on keyboard and destroy it to same button keyboard. How can I do that? @Shady1
  3. yea, sorry, this is what I wanted thank you so much!
  4. Hello! I need to spawn marker when I'm working and destroy it when I ain't working, how can I do that? thanks in advance! @Shady1 local marker = createMarker(-704.3701171875,963.20855712891,11, "cylinder", 1.3, 244, 244, 244, 244) local skin = getElementModel(localPlayer) function startJob(hitPlayer) local marker_1 = createMarker(-688.35162353516, 953.43170166016, 11, "cylinder", 1.3, 244, 244, 244, 244) if not getElementData(hitPlayer, 'job') then setElementData(hitPlayer,'job',true) outputChatBox('Hey! You can work.', 255, 255, 255,true) setElementModel (hitPlayer, 50) else setElementData(hitPlayer, 'job', nil) setElementModel(hitPlayer, skin) outputChatBox('Goodbye, now you cant work', 255, 255, 255,true) end end addEventHandler('onClientMarkerHit', marker, startJob)
  5. I need to give money on server client code: local marker = createMarker(-699.07342529297, 955.33538818359, 11, "cylinder", 2, 255, 255, 0, 170) function giveMoney(hitPlayer, matchingDimension) if hitPlayer == localPlayer then outputChatBox("Okey it's your money") end end addEventHandler("onClientMarkerHit", marker, giveMoney)
  6. local x, y, z = 215.54638671875,2068.0607910156,20 local marker = createMarker(x, y, z, "cylinder", 1.3, 255, 0, 0) addEventHandler("onClientMarkerHit", marker, function(hitPlayer, matchingDimension) if hitPlayer == getLocalPlayer() then giveWeapon(hitPlayer, 23, 250) end end) attempt to call global 'giveWeapon' (a nil value) hello everyone, how to fix it?
×
×
  • Create New...