Jump to content

BrianDUTCH

Members
  • Posts

    36
  • Joined

  • Last visited

About BrianDUTCH

  • Birthday 01/07/1997

Details

  • Location
    Netherlands

Recent Profile Visitors

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

BrianDUTCH's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Hello, I need help with a export to get Exp by getting a cashbox.. Levelsystem serverside code: function setExp(playerS,name,amount) local player = getPlayerFromName(name) local account = getPlayerAccount(playerS) local accName = getAccountName(account) if isObjectInACLGroup("user."..accName,aclGetGroup("Admin")) then if getElementType(player) == "player" and tonumber(amount) then setElementData(player,"kill.level",getElementData(player,"kill.level") + amount) outputChatBox("Your Experience level was increased by "..getPlayerName(playerS).." ("..amount.."%)",player,0,255,0) outputChatBox(getPlayerName(player).."'s Experience level was increased.",playerS,0,255,0) else outputChatBox("Failed to give because the player/amount was wrong.",playerS,255,255,0) end end end addCommandHandler("setExp",setExp,false,false) cashbox code after take CB: addEventHandler("onPickupHit", root, function(player) if source == bag then if getElementType(player) == "player" then if isPedInVehicle(player) then return end destroyElement(bag) randomCash = math.random(10000, 100000) randomArmour = math.random(5, 50) exports.levelsystem:setExp (getPlayerName(playerS), getPlayerFromName, math.random (8) ) outputChatBox("You have found $"..tostring(randomCash)..", "..tostring(randomArmour).."% Armour", player, 0, 255, 0) givePlayerMoney(player, randomCash) setPedArmor(player, getPedArmor(player) + randomArmour) destroyElement(bagBlip) setTimer(createMysteryBag, 1000, 1) end end end ) error: cashbox\mbag_s.lua:40: call: failed to call 'levelsystem:setExp' ][string"?"] I'm using this level system: https://community.multitheftauto.com/index.php?p=resources&s=details&id=11050 Cashbox : https://community.multitheftauto.com/index.php?p=resources&s=details&id=11612
  2. Only checking the topic won't help me guys.. please support me in this !!
  3. Anubhav, I still have the same error..
  4. Hello ! I made a CJ Customize GUI only I want to upgrade it, I need some help with it and I have 1 error but I don't know what the problem is.. The GUI looks like this now: Screenshot The Error = ERROR: CJ/customizeCJ-s.lua:18: attempt to index field '?' (a nil value) The error appears when I press on the save button.. I want to upgrade the following thing: The Editbox will be read only if the buttons < and > works. When I would press on the button > I want that the ID go higher so, 1,2,3,4 etc. and when I press it, it must set my new shirt for example.. button < must go down.. so 4,3,2,1,0 Need more info about the idea please just ask I want to fix it.. it will be a public resource to download on community ! Client function activateMenu ( player, key ) if (mainWindow) then guiSetVisible ( mainWindow, true ) else mainWindow = guiCreateWindow(0, 0, 280, 528, "CJ Customize", false) guiCreateLabel(10, 29, 64, 20, "Torso", false, mainWindow) guiCreateLabel(10, 54, 64, 20, "Hair", false, mainWindow) guiCreateLabel(10, 80, 64, 20, "Legs", false, mainWindow) guiCreateLabel(10, 106, 64, 20, "Shoes", false, mainWindow) guiCreateLabel(10, 132, 89, 20, "Left Upper Arm", false, mainWindow) guiCreateLabel(10, 158, 89, 20, "Left Lower Arm", false, mainWindow) guiCreateLabel(10, 184, 93, 19, "Right Upper Arm", false, mainWindow) guiCreateLabel(10, 208, 93, 19, "Right Lower Arm", false, mainWindow) guiCreateLabel(10, 233, 93, 19, "Back Top", false, mainWindow) guiCreateLabel(10, 258, 93, 19, "Left Chest", false, mainWindow) guiCreateLabel(10, 283, 93, 19, "Right Chest", false, mainWindow) guiCreateLabel(10, 308, 93, 19, "Stomach", false, mainWindow) guiCreateLabel(10, 333, 93, 19, "Lower Back", false, mainWindow) guiCreateLabel(10, 358, 93, 19, "Necklace", false, mainWindow) guiCreateLabel(10, 383, 93, 19, "Watch", false, mainWindow) guiCreateLabel(10, 408, 93, 19, "Glasses", false, mainWindow) guiCreateLabel(10, 433, 93, 19, "Hat", false, mainWindow) guiCreateLabel(10, 458, 93, 19, "Suit", false, mainWindow) button1 = guiCreateButton(154, 29, 24, 19, "<", false, mainWindow) button2 = guiCreateButton(154, 54, 24, 19, "<", false, mainWindow) button3 = guiCreateButton(154, 80, 24, 19, "<", false, mainWindow) button4 = guiCreateButton(154, 106, 24, 19, "<", false, mainWindow) button5 = guiCreateButton(154, 132, 24, 19, "<", false, mainWindow) button6 = guiCreateButton(154, 158, 24, 19, "<", false, mainWindow) button7 = guiCreateButton(154, 184, 24, 19, "<", false, mainWindow) button8 = guiCreateButton(154, 208, 24, 19, "<", false, mainWindow) button9 = guiCreateButton(154, 233, 24, 19, "<", false, mainWindow) button10 = guiCreateButton(154, 258, 24, 19, "<", false, mainWindow) button11 = guiCreateButton(154, 283, 24, 19, "<", false, mainWindow) button12 = guiCreateButton(154, 308, 24, 19, "<", false, mainWindow) button13 = guiCreateButton(154, 333, 24, 19, "<", false, mainWindow) button14 = guiCreateButton(154, 358, 24, 19, "<", false, mainWindow) button15 = guiCreateButton(154, 383, 24, 19, "<", false, mainWindow) button16 = guiCreateButton(154, 408, 24, 19, "<", false, mainWindow) button17 = guiCreateButton(154, 433, 24, 19, "<", false, mainWindow) button18 = guiCreateButton(154, 458, 24, 19, "<", false, mainWindow) button19 = guiCreateButton(241, 29, 24, 19, ">", false, mainWindow) button20 = guiCreateButton(241, 54, 24, 19, ">", false, mainWindow) button21 = guiCreateButton(241, 80, 24, 19, ">", false, mainWindow) button22 = guiCreateButton(241, 106, 24, 19, ">", false, mainWindow) button23 = guiCreateButton(241, 132, 24, 19, ">", false, mainWindow) button24 = guiCreateButton(241, 158, 24, 19, ">", false, mainWindow) button25 = guiCreateButton(241, 184, 24, 19, ">", false, mainWindow) button26 = guiCreateButton(241, 208, 24, 19, ">", false, mainWindow) button27 = guiCreateButton(241, 233, 24, 19, ">", false, mainWindow) button28 = guiCreateButton(241, 258, 24, 19, ">", false, mainWindow) button29 = guiCreateButton(241, 283, 24, 19, ">", false, mainWindow) button30 = guiCreateButton(241, 308, 24, 19, ">", false, mainWindow) button31 = guiCreateButton(241, 333, 24, 19, ">", false, mainWindow) button32 = guiCreateButton(241, 358, 24, 19, ">", false, mainWindow) button33 = guiCreateButton(241, 383, 24, 19, ">", false, mainWindow) button34 = guiCreateButton(241, 408, 24, 19, ">", false, mainWindow) button35 = guiCreateButton(241, 433, 24, 19, ">", false, mainWindow) button36 = guiCreateButton(241, 458, 24, 19, ">", false, mainWindow) editA = guiCreateEdit(182, 29, 55, 19, "0", false, mainWindow ) editB = guiCreateEdit(182, 54, 55, 19, "0", false, mainWindow ) editC = guiCreateEdit(182, 80, 55, 19, "0", false, mainWindow ) editD = guiCreateEdit(182, 106, 55, 19, "0", false, mainWindow ) editE = guiCreateEdit(182, 132, 55, 19, "0", false, mainWindow ) editF = guiCreateEdit(182, 158, 55, 19, "0", false, mainWindow ) editG = guiCreateEdit(182, 184, 55, 19, "0", false, mainWindow ) editH = guiCreateEdit(182, 208, 55, 19, "0", false, mainWindow ) editI = guiCreateEdit(182, 233, 55, 19, "0", false, mainWindow ) editJ = guiCreateEdit(182, 258, 55, 19, "0", false, mainWindow ) editK = guiCreateEdit(182, 283, 55, 19, "0", false, mainWindow ) editL = guiCreateEdit(182, 308, 55, 19, "0", false, mainWindow ) editM = guiCreateEdit(182, 333, 55, 19, "0", false, mainWindow ) editN = guiCreateEdit(182, 358, 55, 19, "0", false, mainWindow ) editO = guiCreateEdit(182, 383, 55, 19, "0", false, mainWindow ) editP = guiCreateEdit(182, 408, 55, 19, "0", false, mainWindow ) editQ = guiCreateEdit(182, 433, 55, 19, "0", false, mainWindow ) editR = guiCreateEdit(182, 458, 55, 19, "0", false, mainWindow ) applyButton = guiCreateButton(40, 495, 79, 18, "Save", false, mainWindow ) guiSetProperty( applyButton, "HoverTextColour", "FF00FF00" ) exitButton = guiCreateButton(153, 495, 79, 18, "Exit", false, mainWindow ) guiSetProperty( exitButton, "HoverTextColour", "FFFF0000" ) end showCursor ( true ) end addCommandHandler ( "customize", activateMenu ) function clickedButtonCheck ( element ) if source == applyButton then incredibleTable = { --the order is mixed because i sorted GUI menu better than type listings in code [0] = { storedValue = guiGetText ( editA ) }, [1] = { storedValue = guiGetText ( editB ) }, [2] = { storedValue = guiGetText ( editC ) }, [3] = { storedValue = guiGetText ( editD ) }, [4] = { storedValue = guiGetText ( editE ) }, [5] = { storedValue = guiGetText ( editF ) }, [6] = { storedValue = guiGetText ( editG ) }, [7] = { storedValue = guiGetText ( editH ) }, [8] = { storedValue = guiGetText ( editI ) }, [9] = { storedValue = guiGetText ( editJ ) }, [10] = { storedValue = guiGetText ( editK ) }, [11] = { storedValue = guiGetText ( editL ) }, [12] = { storedValue = guiGetText ( editM ) }, [13] = { storedValue = guiGetText ( editN ) }, [14] = { storedValue = guiGetText ( editO ) }, [15] = { storedValue = guiGetText ( editP ) }, [16] = { storedValue = guiGetText ( editQ ) }, [17] = { storedValue = guiGetText ( editR ) }, } triggerServerEvent ( "applyClothes", localPlayer, incredibleTable ) elseif source == exitButton then guiSetVisible ( mainWindow, false ) showCursor ( false ) end end addEventHandler ( "onClientGUIClick", root, clickedButtonCheck ) Server function applyClothing ( incredibleTable ) if getElementModel ( source ) ~= 0 then setElementModel ( source, 0 ) end count = 0 while count ~= 18 do if tostring(incredibleTable[count].storedValue) == "0" then removePedClothes ( source, count ) elseif tostring(incredibleTable[count].storedValue) ~= "" then --blank fields do nothing texture, model = getClothesByTypeIndex ( count, tostring(incredibleTable[count].storedValue) ) addPedClothes ( source, texture, model, count ) --outputChatBox ( "texture: "..texture.." model: "..model.." count: "..count ) end count = count + 1 end if tostring(incredibleTable[18].storedValue) ~= "" then setPedStat ( source, 21, incredibleTable[18].storedValue ) --outputChatBox ( "Fat stuff triggered" ) end if tostring(incredibleTable[19].storedValue) ~= "" then setPedStat ( source, 23, incredibleTable[19].storedValue ) --outputChatBox ( "Strong stuff triggered" ) end end addEvent("applyClothes", true, "incredibleTable" ) addEventHandler("applyClothes", root, applyClothing)
  5. hmm, u can change rhino color only by a mod as I know.. if u want change all vehicle color's to 1 special color you should use setVehicleColor
  6. This would work better to download vehicle mods I should say use gtainside, For example you can use this Rhino mod. Then make a script: function ReplaceVehicle ( ) outputChatBox ( "> replacing the rhino vehicle" ) txd = engineLoadTXD ( "rhino.txd" ) engineImportTXD ( txd, 432) dff = engineLoadDFF ( "rhino.dff", 0 ) engineReplaceModel ( dff, 432) end addEvent ( "replaceVeh", true ) addEventHandler ( "replaceVeh", getRootElement(), ReplaceVehicle )
  7. as I know that isn't possible on a rhino with setVehicleColor I think you should use mods try to use engineReplaceModel
  8. Thanks for help IIYAMA, it works good. I use the simple respawnVehicle now thanks.
  9. I have a another problem, I made the value's of respawn time in settings. But when I change the time in-game settings to 1 second then it doesn't work it still respawn every 15 seconds. please help ! Meta.xml removed removed Please help ! EDIT: SOLVED
  10. As u see the code above it works fine it respawn when it drown, but it also respawn when a player is inside the car how can I stop that? If players are in the car I don't want it respawn only when nobody is in the car !
×
×
  • Create New...