redditing

Members
  • Content Count

    50
  • Joined

Community Reputation

3 Neutral

About redditing

  • Rank
    Snitch

Recent Profile Visitors

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

  1. redditing

    Button

    -- Client Side Button = guiCreateButton(0.45, 0.54, 0.10, 0.06, "Get Value", true) guiSetProperty(Button, "NormalTextColour", "FFAAAAAA") guiSetVisible(Button, false) EditBox= guiCreateEdit(0.41, 0.45, 0.18, 0.04, " chcesz tego kupić sztuk?", true) guiSetProperty(EditBox, "NormalTextColour", "FFFF0000") guiEditSetMaxLength(EditBox, 3) guiSetVisible(EditBox, false) addEventHandler("onClientGUIClick", Button function() local inputBox = tonumber(guiGetEdit(EditBox)) if inputBox==0 then outputChatBox("U set value input "..inputBox, 255, 255, 0) end end) -- Another Client Side addCommandHandler("TurnOnButton", function() guiSetVisible(Button, true) guiSetVisible(EditBox, true) end) I don't know what's wrong, but when I type the command 'TurnOnButton' I can't click the button and the editBox as if they didn't exist
  2. redditing

    BindKey

    I can't show the code because it has 7000 lines What I mean the most is that I have equipment and when I use some things in it, I have to click "i" twice to reset and work normally, so I thought that there is a function that will make me click "bindKey"
  3. redditing

    BindKey

    Maybe I will explain otherwise, I have equipment that I open with the "i" button bindKey("i", "down", Inventory) Well, when I click "i" this is all right, but I would like to click "i" with a script. I would like to run it the same way as SetPedControlState() function setPedControlState(localPlayer, "i", true) But I know that this function doesn't have such a thing, that's why I'm asking if there is a similar function but with the properties I showed in the case of the SetPedControlState () function
  4. redditing

    BindKey

    Is there a function similar to ToogleControl but with Binds? I mean, there is such a function attached to BindKey (under the "k" key), and I would like to press the "k" function just like in ToggleControl, where we clicked eg left mouse button to shoot
  5. YEAH, IT WORKS!! THANKS SO MUCH
  6. 98/5000 So I have a question (hypothetical question) can I return the value using "callServer", "callClient"?
  7. Okay, I have one problem, when I get into this "cylinder" then it gives me a pistol but with 30 bullets despite the fact that "Ammo" has a value of 72 Can you help me with that? -- Client side addEvent("WeaponGetAmmoToServer", true) local Ammo = 72 local AmmoMarker = createMarker(0, 0, 1, "cylinder", 2.0) local WeaponMarker = createMarker(0, 0, 1, "cylinder", 2.0) addEventHandler("onClientMarkerHit", AmmoMarker, function() Ammo = Ammo + 1 end) addEventHandler("onClientMarkerHit", WeaponMarker, function() addEventHandler("WeaponGetAmmoToServer", root, function() return Ammo end) triggerServerEvent("GiveWeaponToPlayer", root) end) -- Server Side addEvent("GiveWeaponToPlayer", true) addEventHandler("GiveWeaponToPlayer", root, function(prl) local prl = client giveWeapon(prl, 22, triggerClientEvent("WeaponGetAmmoToServer", source), true) end) This script return Colt45 with 30 Ammo, but i want 72 from variable
  8. Ok i understand thx
  9. The case looks like this, I have a variable (Let's call it Ammo) that IS TO be in the giveWeapon function (source, 22, Ammo, true) but the problem is that this Ammo variable has the script type "client" and the function is the server script type, so how can I make this variable in this function? If someone has not understood what is going on, there is still a code to simplify... -- Client side local Ammo = 60 local AmmoMarker = createMarker(0, 0, 1, "cylinder", 2.0) local WeaponMarker = createMarker(0, 0, 1, "cylinder", 2.0) addEventHandler("onClientMarkerHit", AmmoMarker, function() Ammo = Ammo + 1 end) addEventHandler("onClientMarkerHit", WeaponMarker, function() -- Here I get a weapon, the variable "Ammo" is the number of bullets end) -- Server Side --??? Problem with importing variable "Ammo"
  10. I know that, i created colissions woth other objects in normal scale and alpha 0
  11. I have an object enlarged by 30 times [SetObjectScale ('object', 30.0)] and my problem is when you look, e.g. slightly to the right, the object disappears, and if you turn left, it suddenly appears. It can be fixed, please help!
  12. I'm creating a server with minigames, and I'll probably use dimensions to split the maps, and my question is this. If I have a script for a given mini-game, then in every dimension does this script change in its own way ?. I give an example. I have two maps ... the first one is in the first dimension, the name is attached, the script is attached after the player teleports to him and plays with other players who are in the first dimension. But there is also a second dimension with the same script. And this is about whether there will be no undesirable consequences between these two dimensions. For example, with Equipment, at the end of the minigame and resetting it again, I will have to clear Equipment, and I do not know if I will clear the equipment of players who are in this dimension or all who are on the server in general. ; /
  13. Okay, I know where this problem comes from, because I gave the eventhandler when when I click the "i" button on the keyboard, he checked when this Event was firing up and then he didn't, but thank you for helping me
  14. i upload how to look like and upload my code again here is there link to see how it look like https://imgur.com/a/ZzGGRcX there is a code function tablecontains(tabl, element) for index, value in pairs(tabl) do if value == element then return index end end return false end function tablecheck(tabl, element) for index, value in pairs(tabl) do if value == element then return true end end return false end button1 = createButton(etc) button2 = createButton(etc) money = 100 EQ = {} function buttonpress1() if money>=2 then outputChatBox("Here, there is ITEM1", 255, 255, 0) money = money-2 if not tablecontains(EQ, "P1") then table.insert(EQ, "P1") end if tablecheck(EQ, "P1") then local variable = tablecontains(EQ, "P1") if variable==1 then AdxItem1 = 255 SLOT1 = SLOT1 + 1 elseif variable==2 then BdxItem1 = 255 SLOT2 = SLOT2 + 1 elseif variable==3 then CdxItem1 = 255 SLOT3 = SLOT3 + 1 elseif variable==4 then DdxItem1 = 255 SLOT4 = SLOT4 + 1 elseif variable==5 then EdxItem1 = 255 SLOT5 = SLOT5 + 1 elseif variable==6 then FdxItem1 = 255 SLOT6 = SLOT6 + 1 elseif variable==7 then GdxItem1 = 255 SLOT7 = SLOT7 + 1 elseif variable==8 then HdxItem1 = 255 SLOT8 = SLOT8 + 1 end end else outputChatBox("u dont have money", 255, 0, 0) end end addEventHandler("onClientGUIClick", button1, buttonpress1) function buttonpress2() if money>=4 then outputChatBox("Here, there is ITEM2", 255, 255, 0) money = money-4 if not tablecontains(EQ, "P2") then table.insert(EQ, "P2") end if tablecheck(EQ, "P2") then local variable = tablecontains(EQ, "P2") if variable==1 then AdxItem1 = 255 SLOT1 = SLOT1 + 1 elseif variable==2 then BdxItem1 = 255 SLOT2 = SLOT2 + 1 elseif variable==3 then CdxItem1 = 255 SLOT3 = SLOT3 + 1 elseif variable==4 then DdxItem1 = 255 SLOT4 = SLOT4 + 1 elseif variable==5 then EdxItem1 = 255 SLOT5 = SLOT5 + 1 elseif variable==6 then FdxItem1 = 255 SLOT6 = SLOT6 + 1 elseif variable==7 then GdxItem1 = 255 SLOT7 = SLOT7 + 1 elseif variable==8 then HdxItem1 = 255 SLOT8 = SLOT8 + 1 end end else outputChatBox("u dont have money", 255, 0, 0) end end addEventHandler("onClientGUIClick", button2, buttonpress2)