Jump to content

DarkBeautyDZ

Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

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

DarkBeautyDZ's Achievements

Civilian

Civilian (7/54)

1

Reputation

  1. Hi guys can you please ,please,please help me with this script , i have problem triggering the server side Event from a gui button as Below , the client side works just fine but the server side doesnt work it should change the Range of the random number according to the chosen difficulty : Client Side : function MKH_OPENHACK (localPlayer) if (source == GUIEditor.button[1]) then ----------the Button open the Hack panel guiSetVisible(GUIEditor.window[1], false) guiSetVisible(ATM.window[1], true) output ("Hacking started..." ) LabelHackTimer = guiCreateLabel ( 0.61,0.61, 0.68, 0.48, "", true, ATM.window[1] ) guiLabelSetColor(LabelHackTimer,255,0,0) guiSetFont(LabelHackTimer, "sa-header") guiSetAlpha ( LabelHackTimer, 1 ) local Difficulty = guiComboBoxGetItemText(GUIEditor.combobox[1], guiComboBoxGetSelected(GUIEditor.combobox[1]))--- combobox with 3 Difficulties if Difficulty and Difficulty ~= "" then triggerServerEvent("onHacking",localPlayer,Difficulty) ----- probably the mistake here ------------------------ all Below working just fine if Difficulty == "Easy" then -------------easy difficulty (the Difference is in time ) HackingStart = setTimer(function() output ( "Time Out" ) destroyElement(LabelHackTimer) guiSetVisible(ATM.window[1], false) showCursor(false) end,30000,1) elseif Difficulty == "Medium" then --------------Medium HackingStart = setTimer(function() output ( "Time Out" ) destroyElement(LabelHackTimer) guiSetVisible(ATM.window[1], false) showCursor(false) end,120000,1) elseif Difficulty == "Hard" then ----- ------------Hard HackingStart = setTimer(function() output ( "Time Out" ) destroyElement(LabelHackTimer) guiSetVisible(ATM.window[1], false) showCursor(false) end,300000,1) end end end end addEventHandler("onClientGUIClick", root, MKH_OPENHACK) Server Side : function HackingRange(source, Difficulty) if source then if Difficulty == "Easy" then local randomNumber = math.random(1, 1000) -----------------Range should change in each Difficulty + chat (both not working) executeSQLQuery("DROP TABLE ATMRobbery" ) executeSQLQuery("CREATE TABLE IF NOT EXISTS ATMRobbery (ATM TEXT, theNumber INT)") executeSQLQuery( "INSERT INTO ATMRobbery(ATM, theNumber) VALUES(?,?)", "ATMs", randomNumber) outputDebugString ("ATM Robbery: SQL Database has been created!") outputDebugString ("ATM Robbery: The Number is "..randomNumber) outputChatBox("Difficulty has been set to Easy you've got 30 Sec ",source, 0, 255, 0) ATM_ROBBERY = true elseif Difficulty == "Medium" then local randomNumber = math.random(1, 1000000) executeSQLQuery("DROP TABLE ATMRobbery" ) executeSQLQuery("CREATE TABLE IF NOT EXISTS ATMRobbery (ATM TEXT, theNumber INT)") executeSQLQuery( "INSERT INTO ATMRobbery(ATM, theNumber) VALUES(?,?)", "ATMs", randomNumber) outputDebugString ("ATM Robbery: SQL Database has been created!") outputDebugString ("ATM Robbery: The Number is "..randomNumber) outputChatBox("Difficulty has been set to Medium you've got 2 Minutes",source, 0, 255, 0) ATM_ROBBERY = true elseif Difficulty == "Hard" then local randomNumber = math.random(1, 1000000000) executeSQLQuery("DROP TABLE ATMRobbery" ) executeSQLQuery("CREATE TABLE IF NOT EXISTS ATMRobbery (ATM TEXT, theNumber INT)") executeSQLQuery( "INSERT INTO ATMRobbery(ATM, theNumber) VALUES(?,?)", "ATMs", randomNumber) outputDebugString ("ATM Robbery: SQL Database has been created!") outputDebugString ("ATM Robbery: The Number is "..randomNumber) outputChatBox("Difficulty has been set to Medium you've got 5 Minutes",source, 0, 255, 0) ATM_ROBBERY = true end end end addEvent("onHacking",true) addEventHandler("onHacking",resourceRoot,HackingRange)
  2. i thought about that but like this it's more realistic and if you thought about it enough you would realize that 43ID weapon is Camera so it's fit for phone you would be able to take pics it's more realistic that way so changing to camera will trigger the whole thing animation the walking style and the phone main page
  3. yes as you say Mr , changing command to bind is what i'm planning to do , but there is something alse about the animation the animation i want it to stop after 1.2 sec means timer after else is another animation 2nd one would be activated for another 1.2 sec (phone out - phone in ) , and about the cursor i got that covered so don't worry
  4. Phone Animation Explanation Hi there i need HELP COMPLETING this Script for phone animation the Idea is replacing the camera with a phone and when ever i chose camera/phone 1st animation start for 2 sec bringing the "phone out" then triggering client event changing walking style to 137ID (modefied to phone walking style) and ofcourse the phone main page with it then when changing to other weapon or activating the "phone command again returning walking style to default and playing 2nd animation "phone in " and closing phone main page with it : well almost like this this is me making the script work but not exactly as i want : -------------------------- The Script : for now it only activate walking style 137 by command(i want to make him chose weapon 43id by that command) i want to disactivate it too by the same command Client Side function togglephone() setPedWalkingStyle (localPlayer ,137) end addEvent("togglephone",true) addEventHandler("togglephone",root, togglephone) function replaceModel() txd = engineLoadTXD("cellphone.txd", 367 ) engineImportTXD(txd, 367) dff = engineLoadDFF("cellphone.dff", 367 ) engineReplaceModel(dff, 367) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Server Side function togglephone ( playerSource ) giveWeapon ( source, 43, 200 ) triggerClientEvent(root, "togglephone", root) end addCommandHandler ( "phone", togglephone ) 2. i need to add the two animaions "phone_out " from ped.ifp block that i modified for 1.2 sec then "phone_in" played when phone is disabled how to mix them both in one script function togglephone(thePlayer) if not getElementData(thePlayer, "phoning") then giveWeapon ( thePlayer, 43, 200 ) --- this give weap but also how chosing it will trigger the animation thing setPedAnimation(thePlayer, "ped", "phone_out", -1, false, false, false, false) setElementData(thePlayer, "phoning", true) else -- If you use again this command will play phone in animation need timer in both animations setPedAnimation(thePlayer, "ped", "phone_in", -1, false, false, false, false) removeElementData(thePlayer, "phoning") end end addCommandHandler("phone", togglephone)
  5. Hi there i need help in making the customblips icons disappear from radar they kept showing after changing to another radar , the original radar isn't showing but the custom blips still there cyrcling arround please help ..
  6. the problem isn't in fogo it's in zones (burn zone doesn't disapair)
  7. it doesn't burn any more i think it's because of this if Elemento and getElementData(source,"colGr") then--i think source is what make the proublem or this another zone in the script make his bike burn peds function IniciarFogoNaMoto(Ve,Assento) if (Assento == 0) then if getElementModel(source) == 78 and getElementModel(Ve) == 463 and getElementData(source,"PLAYERGR") then setVehicleDamageProof ( Ve, true ) local Mx,My,Mz = getElementPosition(Ve) Fogo[1] = createObject(TabeladeFogo[ math.random( 1,#TabeladeFogo ) ],Mx,My,Mz) Fogo[2] = createObject(TabeladeFogo[ math.random( 1,#TabeladeFogo ) ],Mx,My,Mz) Fogo[3] = createObject(TabeladeFogo[ math.random( 1,#TabeladeFogo ) ],Mx,My,Mz) setElementCollisionsEnabled(Fogo[1], false) setElementCollisionsEnabled(Fogo[2], false) setElementCollisionsEnabled(Fogo[3], false) attachElements(Fogo[3],Ve,0,1,0) attachElements(Fogo[1],Ve,0,-1,0) attachElements(Fogo[2],Ve,-0.3,0,0) local zone = createColCuboid(Mx, My, Mz, 3.1827392578125, 3.8387451171875, 2.4195971488953) attachElements(zone,Ve,0,0,0) setElementData(zone,"colGr",true)-- here another zone end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), IniciarFogoNaMoto)
  8. Hi there i'm making this ghost rider script server side and i have trouble making the command fire off the fire shape got destroyed but the zone of burn didn't get destroyed help please : function GrHabilit(Elemento) if Elemento and getElementData(source,"colGr") then if getElementModel(Elemento) ~= 78 then if getElementType(Elemento) == "player" or getElementType(Elemento) == "ped" then setPedOnFire(Elemento,true) elseif getElementType(Elemento) == "vehicle" then --this to not blow his bike XD setElementHealth(Elemento, 200) end end end end addEventHandler("onColShapeHit",getRootElement(),GrHabilit) function fireon (source) if getElementModel(source) == 78 then local x, y, z = getElementPosition (source) Fogo[4] = createObject(TabeladeFogo[ math.random( 1,#TabeladeFogo ) ], x, y, z) setElementCollisionsEnabled(Fogo[4], false) exports.bone_attach:attachElementToBone (Fogo[4], source, 8, -0, 0, -0.3, -125, 0, 0) local zone1 = createColCuboid(x, y, z, 3.1827392578125, 3.8387451171875, 2.4195971488953) attachElements(zone1,source,0,0,0) setElementData(zone1,"colGr",true) -- to burn who ever get near him outputChatBox ( "#FFFF00Power #00FF00Revenge Fire ON", source, 0, 255, 0, true ) end end addCommandHandler ("fireon", fireon) function fireoff (source) if getElementModel(source) == 78 then local x, y, z = getElementPosition (source) local zone1 = getElementAttachedTo ( source ) if ( zone1 ~= false ) then -- supposed to destroy the burn zone destroyElement ( zone1 ) -- supposed to destroy the burn zone destroyElement(Fogo[4]) --destroy the fire shape outputChatBox ( "#FFFF00Power #00FF00Revenge Fire OFF", source, 0, 255, 0, true ) end end end addCommandHandler ("fireoff", fireoff please help ..
  9. yeah so the players who have admin can select the skin , but the other players can't
  10. nvm it show for others but not for the vip owner ;(
  11. DarkBeautyDZ

    vip tag

    hi guys i made a vip script the problem in the vip tag never show i don't know where is the error ? ---Tag--- local VipIconGold = dxCreateTexture("img/Gold.png") local VipIconSilver = dxCreateTexture("img/Silver.png") local VipIconBronze = dxCreateTexture("img/Bronze.png") addEventHandler("onClientPreRender", root, function() for i, player in ipairs(getElementsByType("player")) do if not (isPedInVehicle ( player )) and player ~= localPlayer then local VIPType = getElementData(player, "VIPType") or false local x, y, z = getPedBonePosition(player, 8) if VIPType == "Gold" then dxDrawMaterialLine3D(x, y, z+0.7, x, y, z+0.3, VipIconGold, 0.5, tocolor(255,255,255,255)) elseif VIPType == "Silver" then dxDrawMaterialLine3D(x, y, z+0.7, x, y, z+0.3, VipIconSilver, 0.5, tocolor(255,255,255,255)) elseif VIPType == "Bronze" then dxDrawMaterialLine3D(x, y, z+0.7, x, y, z+0.3, VipIconBronze, 0.5, tocolor(255,255,255,255)) end end end end )
  12. yes nvm this , i need help here this will solve my problem here
  13. i have this modified gangs wars mod script "client.lua" i want to change skin selection restriction in the start from "group" to "Acl group" this is the part that i need to change if SelectedSkin == 278 and getElementData(localPlayer,"Group") ~= "[ARMY]" then output("this skin is only available to [ARMY] group only ! ) return end i need to change restriction so only Acl Group "Admin" For example that can select that skin , please help ...
×
×
  • Create New...