Mahlukat

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

6 Neutral

2 Followers

About Mahlukat

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Mahlukat

    [HELP] GUI GridList

    can you try this? teams = {"Liberation Army", "Imperial Forces"} function getPos() local x, y ,z = getElementPosition(localPlayer) local pos = tostring(x..", "..y..", "..z) outputChatBox(pos, 255, 100, 100, false) setClipboard(pos) end addCommandHandler("pos", getPos) ---- GUI Creation addEventHandler("onClientResourceStart", resourceRoot, function() window = guiCreateWindow(0.57, 0.25, 0.19, 0.37, "Spawn Menu", true) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetAlpha(window, 1.00) team_gridlist = guiCreateGridList(10, 32, 284, 98, false, window) column = guiGridListAddColumn(team_gridlist, "Team", 0.9) for i,teamtext in pairs(teams) do local row = guiGridListAddRow(team_gridlist,teamtext) end -- rowA = guiGridListAddRow(team_gridlist) -- rowB = guiGridListAddRow(team_gridlist) -- guiGridListSetItemText(team_gridlist, 0, 1, "Liberation Front", false, false) -- guiGridListSetItemText(team_gridlist, 1, 1, "Imperial Forces", false, false) skin_label = guiCreateLabel(58, 248, 71, 15, "Select a skin", false, window) skin_btn_next = guiCreateButton(96, 273, 33, 16, ">", false, window) skin_btn_previous = guiCreateButton(58, 273, 33, 16, "<", false, window) location_gridlist = guiCreateGridList(10, 140, 284, 98, false, window) location_col = guiGridListAddColumn(location_gridlist, "Location", 0.9) weapon_label = guiCreateLabel(155, 248, 96, 15, "Select a weapon", false, window) weapon_btn_next = guiCreateButton(165, 273, 33, 16, ">", false, window) weapon_btn_previous = guiCreateButton(204, 273, 33, 16, "<", false, window) spawn_btn = guiCreateButton(114, 299, 67, 24, "Spawn", false, window) guiSetVisible(window, false) end ) ---- GUI functions function isGUIVisible(gui) return (guiGetVisible(gui) == true) end -- Make the GUI appear on login. addEvent("onClientPlayerLoginn", true) addEventHandler("onClientPlayerLoginn", root, function() if isGUIVisible(window) then return end guiSetVisible(window, true) -- Set the camera to the desired location. setCameraMatrix(-2610.9792480469, 1445.4840087891, 7.1875, -2610.9792480469, 1445.4840087891, 7.1875) -- Make a ped with default skin (0). local ped = createPed(0, -2614.0212402344, 1451.1651611328, 7.1875, 180) end) -- Team addEventHandler("onClientGUIClick", resourceRoot, function() if (source == spawn_btn) then local team = getSelectedTeam() if team then triggerServerEvent("setTeam", localPlayer, team) end end end) function getSelectedTeam() local row, col = guiGridListGetSelectedItem(team_gridlist) if row and col and row ~= -1 and col ~= -1 then return guiGridListGetItemText(team_gridlist, row, col) else return false end end local LALocations = {"LA Test 1", "LA Test 2", "LA Test 3"} local IFLocations = {"IF Test 1", "IF Test 2", "IF Test 3"} -- Location (according to the team) addEventHandler("onClientGUIClick", resourceRoot, function(button, state) if source == team_gridlist then local team = getSelectedTeam() if team then guiGridListClear(location_gridlist) if team == "Liberation Army" then outputChatBox("Test successful", 100, 255, 100) for _, locations_LA in ipairs(LALocations) do local location_row_LA = guiGridListAddRow(location_gridlist,locations_LA) --guiGridListSetItemText(location_gridlist, location_row_LA, location_col, locations_LA, false, false) end elseif team == "Imperial Forces" then for _, locations_IF in ipairs(IFLocations) do local location_row_IF = guiGridListAddRow(location_gridlist,locations_IF) --guiGridListSetItemText(location_gridlist, location_row_IF, location_col, locations_IF, false, false) end end end end end) -- Skin -- Weapon
  2. Mahlukat

    [Help] getPlayerFromPhoneNumber Help

    function getPlayerFromPhoneNumber(phoneNumber) local phoneNumber = tonumber(phoneNumber) for i,v in pairs(getElementsByType("player")) do local playerNumber = tonumber(getElementData(v,"YOUR_PHONE_NUMBER_DATA_HERE")) if playerNumber and playerNumber == phoneNumber then return v end end return false end try this
  3. Mahlukat

    Text

    carshopWindow = guiCreateWindow(0.01, 0.22, 0.39, 0.58, "CarShop", true) guiSetVisible(carshopWindow, false) guiSetAlpha(carshopWindow, 1) guiWindowSetSizable(carshopWindow, false) carGridList = guiCreateGridList(0.02, 0.06, 0.47, 0.80, true, carshopWindow) guiGridListSetSelectionMode(carGridList, 0) carColumn = guiGridListAddColumn(carGridList, "Car", 0.4) costColumn = guiGridListAddColumn(carGridList, "$", 0.4) local cars = { ["Level1"] = { ------------------TEXT TEX {481, 50000},-- BMX {509, 50000},-- bike {529, 55000},-- Willard {492, 60000},-- Gleenwood }, ["Level2"] = { ------------------TEXT TEX {421, 60000},-- Whasington {466, 65000},-- Glendale {422, 65000},-- Bobcat {600, 70000},-- Picador {578, 70000},-- DFT-30 {582, 70000},-- Newsvan {410, 71000},-- Manana {489, 75000},-- Rancher {474, 75000},-- Hermes {491, 75000}, -- Virgo }, } function setTexts() for i,v in pairs(cars) do local row = guiGridListAddRow(carGridList) guiGridListSetItemText(carGridList,row,1,i,true,false) for i,k in pairs(v) do local model,price = unpack(k) local row2 = guiGridListAddRow(carGridList) guiGridListSetItemText(carGridList,row2,1,getVehicleNameFromModel(model),false,false) guiGridListSetItemText(carGridList,row2,2,price,false,false) end end end setTexts()
  4. Mahlukat

    Death

    try this addEventHandler("onPlayerWasted", root, function() local x,y,z = getElementPosition(source) spawnPlayer(source,x,y,z) end
  5. Mahlukat

    [Help] onClientResourceStop

    Yea, i tried but wiki said; This event is triggered when a remote player quits the game or leaves the server. It will not get triggered on the source player's client. (Use onClientResourceStop to save client side data when the local player quits.) thanks for help but it's still not triggered :((
  6. Mahlukat

    [Help] onClientResourceStop

    Hey i want to save table in client-side when localPlayer disconnected --client addEventHandler( "onClientResourceStop", resourceRoot,function() triggerServerEvent("Freeroam:SureKaydet", localPlayer, sureVerileri, true) if sureVerileri[localPlayer] and isTimer(sureVerileri[localPlayer].timer) then killTimer(sureVerileri[localPlayer].timer) end end) --server addEvent("Freeroam:SureKaydet", true) addEventHandler("Freeroam:SureKaydet", root, function(sureVerileri,bosmu) outputServerLog("triggered server") -- i can't see this message in console local hesap = getPlayerAccount(source) if not isGuestAccount(hesap) then outputServerLog("not guest") local sure = 60*10 if sureVerileri[source] and sureVerileri[source].sure then sure = sureVerileri[source].sure end exports.Hesaplar:SAD(hesap, "KiralikSure", sure) outputServerLog("saved.") outputServerLog(sure) if bosmu then exports.Hesaplar:SAD(hesap, "KiralikSureBos", true) end end end) but event isn't triggered :(( how can ido it? -
  7. Mahlukat

    Ant-Kill

    Canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead.
  8. Mahlukat

    Help in onColShapeHit

    for disable skin changing; --server-side local yourCol = createColSphere(...) addEventHandler("onElementModelChange", root, function(oldModel,newModel) if getElementType(source) == "player" then if isElementWithinColShape(source,yourCol) then setTimer(setElementModel,50,1,source,oldModel) outputChatBox("You can't change skin in this place!",source,255,0,0) end end end)
  9. Mahlukat

    Help GetPlayerSerial

    function spamEngelle(oyuncu,deger) -- spam engelleme fonksiyon if isElement (oyuncu) then -- player check local serial = getPlayerSerial(oyuncu) if deger == "Mutele" then outputChatBox(getPlayerName(oyuncu).."#CC0000 60 #FFFFFFSaniye Susturuldun. #CC0000Sebep: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(oyuncu, true) setTimer (spamEngelle, 60000, 1, oyuncu, "Mute Kaldır") muteliler[serial] = true elseif deger == "Mute Kaldır" then if isElement (oyuncu) and isPlayerMuted (oyuncu) then setPlayerMuted ( oyuncu, false ) antiSpam[oyuncu] = nil muteliler[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( oyuncu ).." #66FF00Cezan Bitti.",root, 255, 255, 0,true ) else antiSpam[oyuncu] = nil end end end end try this
  10. Mahlukat

    [HELP] GridList

    You can hide with other gui element like this; local backLabel = guiCreateLabel(x,y,w,h, "", relative, parent) local list = guiCreateGridList(0,0,w+15,h, false, backLabel)
  11. Mahlukat

    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
  12. Mahlukat

    Remove double player blip

    if you using freeroam script, check joinHandler function in fr_server.lua
  13. Mahlukat

    Allow only numbers in editboxes (patterns)

    guiSetProperty(yourEdit, "ValidationString", "[0-9]*")
  14. Mahlukat

    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)
  15. Mahlukat

    [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 ?