Mahlukat

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Mahlukat

  • Rank
    Square
  1. OR logical operator problem

    -- it's too short :P local icon = getBlipIcon(blip) if icon == 32 or icon == 35 then -- or icons = { [32] = true, [35] = true, } if icons[getBlipIcon(blip)] then
  2. Remove double player blip

    if you using freeroam script, check joinHandler function in fr_server.lua
  3. Allow only numbers in editboxes (patterns)

    guiSetProperty(yourEdit, "ValidationString", "[0-9]*")
  4. help Windons

    GUIEditor = { gridlist = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() mission = guiCreateWindow(596, 264, 204, 247, "Zombie Mission", false) guiSetVisible(mission,false) guiWindowSetSizable(mission, true) GUIEditor.button[1] = guiCreateButton(10, 22, 184, 15, "\"MISSIONS\"", false, mission) GUIEditor.button[2] = guiCreateButton(-1, 154, 31, 33, "", false, GUIEditor.button[1]) GUIEditor.button[3] = guiCreateButton(9, 214, 92, 18, "TAKE", false, mission) GUIEditor.button[4] = guiCreateButton(106, 214, 88, 18, "EXIT", false, mission) GUIEditor.gridlist[1] = guiCreateGridList(230, 206, 0, 15, false, mission) GUIEditor.gridlist[2] = guiCreateGridList(10, 39, 184, 168, false, mission) guiGridListAddColumn(GUIEditor.gridlist[2], "Mission", 0.9) for i = 1, 9 do guiGridListAddRow(GUIEditor.gridlist[2]) end guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "Kill 1 boss RED", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "Kill 1 boss yellow", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 2, 1, "Kill 2 boss RED", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 3, 1, "Kill 2 boss yellow", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 4, 1, "Kill 3 boss RED", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 5, 1, "Kill 3 boss yellow", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 6, 1, "Kill 300 zombies", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 7, 1, "Kill 600 zombies", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 8, 1, "Kill 900 zombies", false, false) end ) bindKey ("U","down",function() guiSetVisible(mission, not guiGetVisible(mission)) showCursor(guiGetVisible(mission)) end)
  5. [Help] Spray Smoke Color

    Hello How can i change spray color like this; I've tried change color with png like this; local shader = dxCreateShader("shader.fx") local texture = dxCreateTexture("smoke.png") dxSetShaderValue(shader,"Tex0",texture) engineApplyShaderToWorldTexture(shader,"smoke") its worked without white color and i need white color too Anybody can explain me ?
  6. [HELP] get player with hex code

    maybe you can like this; guiGridListSetItemText (moneysend,row,col,(string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData (moneysend,row,col,player) player = guiGridListGetItemData(moneysend, row, col) if isElement(player) then
  7. Tables

    can you try this ? table = {} local function take(thePlayer) for i,pickup in pairs(getElementsByType("pickup", resourceRoot)) do if isElementWithinColShape(thePlayer,table[pickup]) then local ammo = getPickupAmmo(pickup) local bron = getPickupWeapon(pickup) giveWeapon(thePlayer,bron,ammo, true) outputChatBox(getWeaponNameFromID(bron).. " | "..ammo, thePlayer) destroyElement(table[pickup]) destroyElement(pickup) end end end local function weapon_drop (thePlayer) local bron = getPlayerWeapon(thePlayer) local ammo = getPedTotalAmmo(thePlayer) local slot = getPedWeaponSlot(thePlayer) local x,y,z = getElementPosition(thePlayer) local pickup_bron = getPedWeapon(thePlayer) local p = getPedWeapon(thePlayer) if slot > 0 then if ammo > 0 then local pickup = createPickup(x,y,z,2,p,0,ammo) table[pickup] = createColSphere(x,y,z,1) takeWeapon(thePlayer,p,ammo) end end end addCommandHandler("bind_q",function(thePlayer) bindKey(thePlayer,"U","down",weapon_drop,thePlayer) bindKey(thePlayer,"I","down",take,thePlayer) end)
  8. Timer

    can u try this ? function timer(player) -- if getPlayerTeam(player)==team then print("Work") local losuj = math.random(1,3) if losuj==1 then givePlayerMoney(player,2000) elseif losuj==2 then setPedArmor(player,100) setElementHealth(player,100) elseif losuj==3 then giveWeapon(player,36,3) end --end end function allPlayers() for i,player in pairs(getElementsByType("player")) do if getPlayerTeam(player)==team then -- check timer(player) end end setTimer(allPlayers,2000,1) end allPlayers()
  9. Problem in my DX Vip Panel | HELP

    client.lua painel = false function abrir () dxDrawRectangle(24, 230, 450, 280, tocolor(0, 0, 0, 190), false) dxDrawRectangle(34, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 365, 210, 50, tocolor(254, 254, 254, 150), false) -- vida dxDrawRectangle(254, 365, 210, 50, tocolor(254, 254, 254, 150), false) -- armas dxDrawRectangle(34, 425, 430, 50, tocolor(181, 15, 19, 169), false) dxDrawRectangle(24, 172, 450, 48, tocolor(0, 0, 0, 190), false) dxDrawText("PAINEL EXCLUSIVO [Hawk]", 24, 172, 474, 220, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 1", 34, 245, 244, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 2", 254, 245, 464, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 1", 34, 305, 244, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 2", 254, 305, 464, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VIDA/COLETE", 34, 365, 244, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ARMAS", 254, 365, 464, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("DESTRUIR VEÍCULO", 34, 425, 464, 475, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Créditos: KingBC | Role Play Brasil", 24, 485, 474, 505, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false) end function abrirbind() if painel == false then showCursor (true) addEventHandler ("onClientRender", root,abrir) painel = true else if painel == true then showCursor(false) removeEventHandler("onClientRender",root,abrir) painel = false end end end addEvent("STOP", true) addEventHandler("STOP", getRootElement(), abrirbind) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end function skin1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 245, 244, 50 ) then triggerServerEvent ("skinns1", localPlayer) end end end end addEventHandler ("onClientClick", root, skin1) function skin2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 245, 464, 50 ) then triggerServerEvent ("skinns2", localPlayer) end end end end addEventHandler ("onClientClick", root, skin2) function veiculo1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 305, 244, 50 ) then triggerServerEvent ("carro1", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo1) function veiculo2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 305, 464, 50 ) then triggerServerEvent ("carro2", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo2) function vidas(_,state) if painel == true then if state == "down" then if isCursorOnElement (34, 365, 210, 50) then triggerServerEvent ("vida", getLocalPlayer()) end end end end addEventHandler ("onClientClick", root, vidas) function arms (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 365, 464, 415 ) then triggerServerEvent ("arms", localPlayer) end end end end addEventHandler ("onClientClick", root, arms) function destroy (_,state) if painel == true then if ( isCursorOnElement (34, 425, 464, 475) ) then --- destruir triggerServerEvent ("destroy", localPlayer) end end end addEventHandler ("onClientClick", root, destroy) server.lua function showPanel(thePlayer) local accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("hawk")) then triggerClientEvent(thePlayer, "STOP", getRootElement()) else end end function onResStart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart) function onPlayerJoin() bindKey(source, "o", "down", showPanel) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin) function cleanAll(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll) function skin1 () setPedSkin ( source, 1 ) end addEvent("skinns1",true) addEventHandler ( "skinns1", getRootElement(), skin1 ) function skin2 () setPedSkin ( source, 303 ) end addEvent("skinns2",true) addEventHandler ( "skinns2", getRootElement(), skin2 ) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(562, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro1",true) addEventHandler("carro1",root,criarxx) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(413, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro2",true) addEventHandler("carro2",root,criarxx) function vida() setElementHealth(source, 100) setPedArmor(source, 100) end addEvent("vida", true) addEventHandler("vida", root, vida) function arms () giveWeapon ( source, 31, 9999 ) giveWeapon ( source, 34, 9999 ) giveWeapon ( source, 28, 9999 ) giveWeapon ( source, 27, 9999 ) giveWeapon ( source, 24, 9999 ) giveWeapon ( source, 23, 9999 ) end addEvent("arms",true) addEventHandler ( "arms", getRootElement(), arms ) function destruircarro () destroyElement ( veh[source] ) end addEvent ("destroy", true) addEventHandler ("destroy", getRootElement(), destruircarro)
  10. timer help

    can you try this ? tablo = {} function paraVer(para) local uyelik = getPlayerAccount(source) local uyelikname = getAccountName(uyelik) if tablo[uyelikname] == "Used" then outputChatBox("you are already used command you need wait 10min", source, 255,0,0) return end for _, player in ipairs(getElementsByType("player")) do outputChatBox ( getPlayerName(source).."#e4e4e4 isimli kullanici kumarda #0589f9"..para.."$ #e4e4e4kazandi..!",player, 255,255,255,true ) end givePlayerMoney(source, para ) tablo[uyelikname] = "Used" setTimer(timer, 60000*10,1, uyelikname) end addEvent("moneyVer", true) addEventHandler("moneyVer", getRootElement(), paraVer) function timer(accname) local acc = getAccount(accname) local accPlayer = getAccountPlayer(acc) tablo[accname] = nil if accPlayer then outputChatBox ( "10min expried you can use command again", accPlayer, 0,255,0) end end
  11. little help

    try this function onSafeZoneHit (theElement) if theElement == localPlayer then if getElementData(theElement, "Group") ~= "Four Dragons Family" then outputChatBox(enterMessage, 0, 255, 0) toggleControl("fire", false) toggleControl("aim_weapon", false) toggleControl("next_weapon", false) toggleControl("previous_weapon", false) addEventHandler("onClientPlayerDamage", root, cancelEvent) drainTimer = setTimer(function() setElementHealth(localPlayer, 0) end, 10000, 1) end end end
  12. Removing HUD?

    You can use setTimer and check like this; local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "area_name", "vehicle_name", "radio" } setTimer(function() for i,v in pairs(components) if isPlayerHudComponentVisible(v)then setPlayerHudComponentVisible( v, false ) end end end, 1000,0)
  13. [Help] in Grid List

    can u try this ? addCommandHandler ( Table.Commands.WindowOpen , function ( Player ) local Account = getPlayerAccount ( Player ) if ( isGuestAccount ( Account ) ) then return end local Name = getAccountName ( Account ) for _ , v in pairs ( Table.Accounts ) do if ( Name == v ) then triggerClientEvent ( Player , 'OpenWnd' , Player ) outputChatBox ( '*Welcome Manager' , Player ) end end end )
  14. Invite Wont Show. In Other Person Panel

    Im using too this group panel. Put anywhere in groups_s.lua file and do /reconnect or logout addEventHandler("onPlayerLogin", root, function(_,acc) local accname = getAccountName(acc) setElementData(source, "AccountData:Username", accname) end)
  15. Private base for team

    alanlar = { { -2627, 2273, 5, 320, 200, 50, -- x, y, z, width, height, depth { {-2658.91064, 2326.26294, 23.60156}, -- outside pos {-2590.89331, 2244.58374, 4.98438} -- outside pos }, "Admin", "ACL"}, -- Acl Group and Setting { -2682.15820, 2162.93921, 50, 100, 100, 50, -- x, y, z, width, height, depth { {-2669.75488, 2146.68677, 55.42969}, -- outside pos {-2697.34961, 2170.46924, 55.79964} -- outside pos }, "Admin", "Team"}, -- Acl Group and Setting } for i,v in pairs(alanlar) do local x, y, z, width, height, depth, disari, grup, ayar = unpack(v) rad = createRadarArea ( x, y, width, height, 255, 0, 0, 170, root ) col = createColCuboid ( x, y, z, width, height, depth) addEventHandler("onColShapeHit", col, function(giren) random = math.random(#disari) if getElementType(giren) == "vehicle" then aracSahibi = getVehicleController(giren) end local hesap = getAccountName(getPlayerAccount(aracSahibi or giren)) if ayar == "ACL" and not isObjectInACLGroup("user." ..hesap, aclGetGroup(grup)) then setElementPosition(giren, disari[random][1],disari[random][2],disari[random][3]) outputChatBox("You cant enter this zone.", giren, 255,0,0) elseif ayar == "Team" then local takim = getPlayerTeam(aracSahibi or giren) if not takim then setElementPosition(giren, disari[random][1],disari[random][2],disari[random][3]) return end if takim and getTeamName(takim) ~= grup then setElementPosition(giren, disari[random][1],disari[random][2],disari[random][3]) outputChatBox("You cant enter this zone.", giren, 255,0,0) end end end) end can you try this ?