Jump to content

LiOneLMeSsIShoT

Members
  • Posts

    609
  • Joined

  • Last visited

Everything posted by LiOneLMeSsIShoT

  1. Why when i try to shot the zombie on his body he don't even lose -1..but when i kill him in his head he die....from one shot.. in Zady script.. ? ? ? ?
  2. Alright work...but i didn't make them in one function because idk how to make all levels in one table...
  3. Yes man i will try but how i give name to the first pickup to use it? i mean how to give the x,y,z names to use them?
  4. alright i must store them in table...can you give me an example with this table which i'm going to make and store everything on it? C'mon man ! give me an example to store them in table please.
  5. I got errors from "guiSetText" in all functions..check: client: Levels1 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 69) for i, o in ipairs(Levels1) do if skill >= o[2] then Level = o[1] end end guiSetText(Colt45_Levels, Levels1) end) Levels2 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 70) for i, o in ipairs(Levels2) do if skill >= o[2] then Level = o[1] end end guiSetText(Silenced_Levels, Levels2) end) Levels3 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 71) for i, o in ipairs(Levels3) do if skill >= o[2] then Level = o[1] end end guiSetText(DesertEagle_Levels, Levels3) end) Levels4 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 72) for i, o in ipairs(Levels4) do if skill >= o[2] then Level = o[1] end end guiSetText(Shotgun_Levels, Levels4) end) Levels5 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 73) for i, o in ipairs(Levels5) do if skill >= o[2] then Level = o[1] end end guiSetText(SawnOff_Levels, Levels5) end) Levels6 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 74) for i, o in ipairs(Levels6) do if skill >= o[2] then Level = o[1] end end guiSetText(CombatShotgun_Levels, Levels6) end) Levels7 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 75) for i, o in ipairs(Levels7) do if skill >= o[2] then Level = o[1] end end guiSetText(UZI_Levels, Levels7) end) Levels8 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 75) for i, o in ipairs(Levels8) do if skill >= o[2] then Level = o[1] end end guiSetText(TEC9_Levels, Levels8) end) Levels9 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 76) for i, o in ipairs(Levels9) do if skill >= o[2] then Level = o[1] end end guiSetText(MP5_Levels, Levels9) end) Levels10 = { {"Level 0", 0}, {"Level 1", 100}, {"Level 2", 200}, {"Level 3", 300}, {"Level 4", 400}, {"Level 5", 500}, {"Level 6", 600}, {"Level 7", 700}, {"Level 8", 800}, {"Level 9", 900}, {"Level 10", 1000} } addEventHandler("onClientRender", root, function() local skill = getPedStat(localPlayer, 77) for i, o in ipairs(Levels10) do if skill >= o[2] then Level = o[1] end end guiSetText(AK47_Levels, Levels10) end) Levels11 = {
  6. alright i must store them in table...can you give me an example with this table which i'm going to make and store everything on it?
  7. Alright... i did it: local pbags = { {2293.154, 561.47, 7.78}, {2287.2265625, 566.3486328125, 7.78125} } for _, i in ipairs(pbags) do local baga = createPickup(i[1], i[2], i[3], 3, 1210) end function onPickupHit(player) if source == baga then if not isPedInVehicle(player) and not isPedDead(player) then bagb = createObject(1210, 0, 0, 0) exports.bone_attach:attachElementToBone(bagb,player,12,0,0.1,0.3,0,180,0) destroyElement(source) end end end addEventHandler("onPickupHit", root, onPickupHit) function onBtnClick() local atthedTo = exports.bone_attach:getElementBoneAttachmentDetails(bagb) if atthedTo == source then local money = math.random(1000, 2000) givePlayerMoney(source, money) destroyElement(bagb) setTimer(function() x, y, z = unpack(pbags[math.random(#pbags)]) baga = createPickup(x, y, z, 3, 1210) end, 50000, 1) triggerClientEvent(source, "WarningText", source, "reward", "You have rewarded and got "..money.. "$ from the dealer!! Good Job Pro!") outputChatBox ("you have Rewarded and got "..money.."$ from the dealer...You are PRO!! Good JOB!", source, 0, 255, 0, false) triggerClientEvent (source,"winSound", source) else triggerClientEvent(source, "WarningText", source, "reward", "You have to get the briefcase of weapons First!") end end addEvent("reward", true) addEventHandler ("reward", root, onBtnClick) function onPlayerQuit() local atthedTo = exports.bone_attach:getElementBoneAttachmentDetails(bagb) if atthedTo == source then destroyElement(bagb) local x, y, z = getElementPosition(source) baga = createPickup(x, y, z, 3, 1210) end end addEventHandler("onPlayerQuit", root, onPlayerQuit) but still when i hit the pickup..it don't get attached on bone..
  8. what i[1] , 2 and 3 !! don't understand Anyway i've tried it... local pbags = { {2293.154, 561.47, 7.78}, {2296, 150390625540, 82324218751, 794376373291} } for _, i in ipairs(pbags) do createPickup(i[1], i[2], i[3], 3, 1210) end and the pickup spawn...but when i try to get the pickup..it don't be attached.
  9. what i[1] , 2 and 3 !! don't understand
  10. can you give me example to do with my table?
  11. ًًWOow.. Cool works..but how can i make all pickups in the table respawn? like i don't need only one x , y, z spawn..i want all of them spawn...it's able to do or what
  12. Thanks PRO! :D I should learn from the errors you fix for me but i want to "setTimer" to re create the bag when it get removed after time...but actually setTimer (x, y, z, 50000, 1) gives me error so what should i do..
  13. Alright i will ..and sorry. Same Error when i changed.
  14. I got error i don't understand..plesae check client: function SuccessSnd () local sound = playSound ("Jobs_System/songs/MissionComplete.mp3") setSoundVolume (sound, 1.0) end addEvent ("winSound", true) addEventHandler ("winSound", getRootElement(), SuccessSnd) server: function onBtnClick() local atthedTo = exports.bone_attach:getElementBoneAttachmentDetails(bagb) if atthedTo == source then local money = math.random(1000, 2000) givePlayerMoney(source, money) destroyElement(bagb) triggerClientEvent(source, "WarningText", source, "reward", "You have rewarded and got "..money.. "$ from the dealer!! Good Job Pro!") outputChatBox ("you have Rewarded and got "..money.."$ from the dealer...You are PRO!! Good JOB!", source, 0, 255, 0, false) triggerClientEvent ("winSound", source) else triggerClientEvent(source, "WarningText", source, "reward", "You have to get the briefcase of weapons First!") end end error: Bad 'sound/player' pointer @ 'setSoundVolume'(1) Help Please
  15. Alright so when i tried it i got error in argument 2 got nil so
  16. Cool..Thanks..but may you tell me what the error was with?
  17. client: function showBriefcaseMission (button, state) if (button == "left" and state == "up") then guiSetVisible (MainWin, false) triggerClientEvent ("briefcasebtn", localplayer) showCursor (true) end end addEventHandler ("onClientGUIClick", BriefcaseMission, showBriefcaseMission) client: function briefcasebtn () guiSetVisible ("BriefcaseWin", true) end addEvent ("briefcasebtn", true) addEventHandler ("briefcasebtn", getRootElement(), briefcasebtn) error: attempt to call global 'triggerClientEvent' (a nil value) this problem because i can't trigger client event and i'm already in client event and not in server side? ..please help!
  18. C'mon guys i'm really need your help!
  19. crateMarker = createMarker(unpack(BoxPos[math.random(1,3)]),"cylinder") Error Because: because it was "CreateMarker"...and it hve to be "createMarker"
  20. Alright first..the script got problem...when i try to click on button "get Reward" and i have the bag...it says the message after Else....if i haven't the bag..it says the else message too..and not giving any money or anything... the second problem: when i hit the marker...my another gui for the weapon shop be shown too...so when i hit any marker the both of guis be shown..how to fix this? and thanks server side: local pbags = { {2293.154296875, 561.470703125, 7.78125}, } briefcaseMarker = createMarker(2291.1999511719, 537, 0.80000001192093, "cylinder", 1.5, 255, 0, 0) x, y, z = unpack(pbags[math.random(#pbags)]) baga = createPickup(x, y, z, 3, 1210) function Marker (hitPlayer) triggerClientEvent(hitPlayer, "Marker", getRootElement(), hitPlayer) end addEventHandler ("onMarkerHit",briefcaseMarker, Marker) function onPickupHit(player) if source == baga then if not isPedInVehicle(player) and not isPedDead(player) then bagb = createObject(1210, 0, 0, 0) exports.bone_attach:attachElementToBone(bagb,player,12,0,0.1,0.3,0,180,0) destroyElement(source) end end end addEventHandler("onPickupHit", root, onPickupHit) function onBtnClick(player) local atthedTo = exports.bone_attach:getElementBoneAttachmentDetails(bagb) if atthedTo == player then local money = math.random(1000, 2000) givePlayerMoney(player, money) destroyElement(bagb) triggerClientEvent(source,"WarningText",getRootElement(),"reward","You have rewarded from the dealer") else triggerClientEvent(source,"WarningText",getRootElement(),"reward","You Must get the briefcase of weapons First!") end end addEvent ("reward", true) addEventHandler ("reward", getRootElement(), onBtnClick) function onPlayerQuit() local atthedTo = exports.bone_attach:getElementBoneAttachmentDetails(bagb) if atthedTo == source then destroyElement(bagb) local x, y, z = getElementPosition(source) baga = createPickup(x, y, z, 3, 1210) end end addEventHandler("onPlayerQuit", root, onPlayerQuit) client side: --[[------------------------------------------------- Notes: > This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running. To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there. --]]------------------------------------------------- GUIEditor = { window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(319, 155, 640, 434, "Weapon Briefcase Dealer", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0B21F2") guiSetVisible (GUIEditor.window[1], false) Close = guiCreateButton(505, 372, 115, 45, "Close", false, GUIEditor.window[1]) guiSetFont(Close, "default-bold-small") guiSetProperty(Close, "NormalTextColour", "FF6A9470") GUIEditor.label[1] = guiCreateLabel(118, 47, 391, 16, "If you found a Briefcase of weapons get it here and get your Rewards!", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) GUIEditor.staticimage[1] = guiCreateStaticImage(53, 84, 538, 153, ":Jobs_System/images/briefcase.png", false, GUIEditor.window[1]) Rewards = guiCreateButton(229, 276, 160, 67, "Get Your Rewards", false, GUIEditor.window[1]) Warning = guiCreateLabel(4, 240, 632, 34, "", false, GUIEditor.window[1]) guiSetFont(Warning, "default-bold-small") guiLabelSetColor(Warning, 253, 0, 5) guiLabelSetHorizontalAlign(Warning, "center", false) guiLabelSetVerticalAlign(Warning, "center") ---handlers addEventHandler ("onClientGUIClick", Rewards, onRewardButton, false) addEventHandler ("onClientGUIClick", Close, CloseBtn, false) end ) function Marker () guiSetVisible (GUIEditor.window[1], true) showCursor (true) end addEvent ("Marker", true) addEventHandler ("Marker", getRootElement(), Marker) function onRewardButton (button,state) if (button == "left" and state == "up") then triggerServerEvent ("reward", getLocalPlayer()) end end function Error_msg (Tab,Text) if Tab == "reward" then guiSetText (Warning, tostring(Text)) setTimer(function() guiSetText(Warning, "") end, 25000, 1) end end addEvent ("WarningText", true) addEventHandler ("WarningText", getRootElement(), Error_msg) function CloseBtn () guiSetVisible (GUIEditor.window[1], false) showCursor (false) end
×
×
  • Create New...