Shux

Members
  • Content Count

    487
  • Joined

  • Last visited

  • Days Won

    1

Shux last won the day on May 16

Shux had the most liked content!

Community Reputation

7 Neutral

About Shux

  • Rank
    Hustler
  • Birthday 02/02/1997

Details

  • Location
    Trinidad & Tobago
  • Occupation
    Scripter
  • Interests
    Scripting - Mapping - Helping

Recent Profile Visitors

576 profile views
  1. Shux

    [HELP] Set Timer

    'client' isn't defined in the function with the timer. addEvent("getTicket",true) addEventHandler("getTicket", root, function() setElementInterior(client, 1) setElementPosition(client, 1.76953125 ,28.478515625 ,1199.59375) outputChatBox("#00ff00You are now in air plane!", client, 255, 255, 255, true) setTimer( function(client) setElementInterior(client, 0) setElementPosition(client, 1685.8193359375 ,-2237.5400390625 ,13.546875) outputChatBox("#00ff00Welcome To Los Santos!", client, 255, 255, 255, true) end , 60000, 1 ,client) end)
  2. Shux

    [help] example

    https://wiki.multitheftauto.com/wiki/Main_Page Tons there
  3. Shux

    Help error with marker and blip

    This is what you want local startbus = createMarker ( 2184.10229, -1451.73291, 25.55586, "cylinder",1.0,254,239,0,255 ) if ( startbus ) then local startbusblip = createBlipAttachedTo ( startbus , 46, 2, 255, 0, 0, 255, 0, 16383) end function startjobbus() if ( not bus ) then bus = createVehicle ( 431, 2180.24292, -1460.47717, 25.53906 ) if ( bus ) then warpPedIntoVehicle ( localPlayer, bus ) end end end addEventHandler( "onClientMarkerHit", startbus, startjobbus )
  4. Shux

    [HELP] gui Get Combo Text

    https://wiki.multitheftauto.com/wiki/GuiComboBoxGetSelected https://wiki.multitheftauto.com/wiki/GuiComboBoxGetItemText
  5. Shux

    youtube streame panel

    Basically the main things you need.. https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/TriggerClientEvent https://wiki.multitheftauto.com/wiki/PlaySound
  6. Shux

    [HELP] OnClientClick

    You pretty much wanna do something like this. function testImage() dxDrawImage(0,0,50,50,"image.png") end function createOnClick ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if ( clickedElement ) then addEventHandler("onClientRender",root,testImage) end end addEventHandler ( "onClientClick", getRootElement(), createOnClick )
  7. Shux

    setTimer

    Place that code into the event where the first button is clicked (make sure you put it after checking if the button clicked is the button you're looking for)
  8. Shux

    checkBoxGetSelected

    Oops, this is what you want here. if source == bv2 then if ( DGS:dgsCheckBoxGetSelected(v12) == true ) and ( DGS:dgsCheckBoxGetSelected(v14) == true ) then window5 = DGS:dgsCreateWindow((sw-424)/2,(sh-363)/2,400,200,"+",false) elseif ( DGS:dgsCheckBoxGetSelected(v12) ~= true ) and ( DGS:dgsCheckBoxGetSelected(v14) ~= true )then window6 = DGS:dgsCreateWindow((sw-424)/2,(sh-363)/2,400,200,"-",false) end end
  9. Shux

    checkBoxGetSelected

    if source == bv2 then if DGS:dgsCheckBoxGetSelected(v12,true) and DGS:dgsCheckBoxGetSelected(v14,true) then window5 = DGS:dgsCreateWindow((sw-424)/2,(sh-363)/2,400,200,"+",false) elseif DGS:dgsCheckBoxGetSelected(v12,false) and DGS:dgsCheckBoxGetSelected(v14,false) then window6 = DGS:dgsCreateWindow((sw-424)/2,(sh-363)/2,400,200,"-",false) end end
  10. Shux

    Exporting to the scoreboard.

    Oops! Forgot to replace something that I changed in your code leading to me checking a variable that didn't exist. I edited my code, try it now.
  11. Shux

    Exporting to the scoreboard.

    Use that as a replacement of the code in your server file where your 'onPlayerLogin' and 'onResourceStart' events triggers
  12. Shux

    Exporting to the scoreboard.

    function setFactionOnLogin() local faction, player_rank = getPlayerFaction(source) local data = getFactionData(faction) if faction and player_rank then for rank,kk in pairs(clanRankNames) do if ( rank == player_rank ) then local GangRank = clanRankNames[rank] setElementData(source,"faction",faction) setElementData(source,"GangRank",GangRank) if getTeamFromName (faction) then setPlayerTeam(source,getTeamFromName (faction)) else local team = createTeam(faction,unpack(data["Color"])) setPlayerTeam(source,team) end local oldName = getPlayerName(source) local newName = "["..faction.."]"..oldName setPlayerName(source, newName ) if data["X"] ~= 0 and data["Y"] ~= 0 and data["Z"] ~= 0 then setElementPosition(source,data["X"],data["Y"],data["Z"]+0.2) end break end end end end addEventHandler("onPlayerLogin",root,setFactionOnLogin) function setFactionOnStart() exports.scoreboard:addScoreboardColumn("GangRank") for i, v in ipairs (getElementsByType ("player")) do local acc = getPlayerAccount (v) if not isGuestAccount (acc) then local faction, player_rank = getPlayerFaction(v) local data = getFactionData(faction) if faction and player_rank then for rank,kk in pairs(clanRankNames) do if ( rank == player_rank ) then local GangRank = clanRankNames[rank] setElementData(v,"faction",faction) setElementData(v,"GangRank",GangRank) if getTeamFromName (faction) then setPlayerTeam(v,getTeamFromName (faction)) else local team = createTeam(faction,unpack(data["Color"])) setPlayerTeam(v,team) end local oldName = getPlayerName(v) local newName = "["..faction.."]"..oldName setPlayerName(v, newName ) if data["X"] ~= 0 and data["Y"] ~= 0 and data["Z"] ~= 0 then setElementPosition(v,data["X"],data["Y"],data["Z"]+0.2) end break end end end end end end addEventHandler("onResourceStart",resourceRoot,setFactionOnStart)
  13. Basically you want.. local function outputTeamChatToAdmins(plr,msg) for i,admin in ipairs(getElementsByType("player")) do local plr_teamName = getTeamName(getPlayerTeam(plr)) local accName = getAccountName(getPlayerAccount(admin)) if ( accName ) then if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "LathatatlanAdmin" ) ) then outputChatBox("#00FF01[Csoport chat - "..plr_teamName.."] ".. string.format("#%02X%02X%02X", getPlayerNametagColor(plr)) ..""..getPlayerName(plr).."#73FF73: "..msg, admin, 255,255,255, true ) end end end end local function playerTeamChat(message, messageType) if ( messageType == 2 ) then outputTeamChatToAdmins(source,message) end end addEventHandler("onPlayerChat", root, playerTeamChat)
  14. Shux

    problem with ped

    No big problem, just some spaces in the code wasn't making it start, removed them for you. Also added in a simple one-liner so the gui isn't showing when the client downloads the file. Here you go. function cancelPedDamage ( attacker ) cancelEvent() -- cancel any damage done to peds end addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage) GUIEditor = { checkbox = {}, memo = {} } local screenW, screenH = guiGetScreenSize() windowStart = guiCreateWindow((screenW - 441) / 2, (screenH - 317) / 2, 441, 317, "Handlarz bronią", false) guiSetVisible(windowStart,false) guiWindowSetSizable(windowStart, false) guiSetAlpha(windowStart, 0.72) textAk47 = guiCreateEdit(10, 32, 255, 19, "AK-47 | 10, 000$", false, windowStart) buyAk47 = guiCreateButton(283, 31, 148, 20, "Zakup", false, windowStart) textM231 = guiCreateEdit(9, 60, 256, 20, "Karabin M231 FPW | 15, 000$", false, windowStart) buyM231 = guiCreateButton(283, 62, 148, 18, "Zakup", false, windowStart) leaveButton = guiCreateButton(75, 292, 291, 15, "Wyjdz", false, windowStart) markerCreate = createMarker(-369.2470703125, 1202.2958984375, 19.7421875, "cylinder", 1) function guiStart() guiSetVisible(windowStart, true) guiSetVisible(textAk47, true) guiSetVisible(buyAk47, true) guiSetVisible(textM231, true) guiSetVisible(buyM231, true) guiSetVisible(leaveButton, true) showCursor(true) end addEventHandler("onClientMarkerHit", markerCreate, guiStart) function guiStop(btn,state) if ( source == leaveButton ) then -- If the player presses the 'leaveButton' guiSetVisible(windowStart, false) guiSetVisible(textAk47, false) guiSetVisible(buyAk47, false) guiSetVisible(textM231, false) guiSetVisible(buyM231, false) guiSetVisible(leaveButton, false) showCursor(false) elseif ( source == buyAk47 ) then -- If the player presses the 'buyAk47' button triggerServerEvent("onBuyAK47",localPlayer) end end addEventHandler("onClientGUIClick", root, guiStop)
  15. Shux

    problem with ped

    Client: function cancelPedDamage ( attacker ) cancelEvent() -- cancel any damage done to peds end addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage) GUIEditor = { checkbox = {}, memo = {} } local screenW, screenH = guiGetScreenSize() windowStart = guiCreateWindow((screenW - 441) / 2, (screenH - 317) / 2, 441, 317, "Handlarz bronią", false) guiWindowSetSizable(windowStart, false) guiSetAlpha(windowStart, 0.72) textAk47 = guiCreateEdit(10, 32, 255, 19, "AK-47 | 10, 000$", false, windowStart) buyAk47 = guiCreateButton(283, 31, 148, 20, "Zakup", false, windowStart) textM231 = guiCreateEdit(9, 60, 256, 20, "Karabin M231 FPW | 15, 000$", false, windowStart) buyM231 = guiCreateButton(283, 62, 148, 18, "Zakup", false, windowStart) leaveButton = guiCreateButton(75, 292, 291, 15, "Wyjdz", false, windowStart) markerCreate = createMarker(-369.2470703125, 1202.2958984375, 19.7421875, "cylinder", 1) function guiStart() guiSetVisible(windowStart, true) guiSetVisible(textAk47, true) guiSetVisible(buyAk47, true) guiSetVisible(textM231, true) guiSetVisible(buyM231, true) guiSetVisible(leaveButton, true) showCursor(true) end addEventHandler("onClientMarkerHit", markerCreate, guiStart) function guiStop(btn,state) if ( source == leaveButton ) then -- If the player presses the 'leaveButton' guiSetVisible(windowStart, false) guiSetVisible(textAk47, false) guiSetVisible(buyAk47, false) guiSetVisible(textM231, false) guiSetVisible(buyM231, false) guiSetVisible(leaveButton, false) showCursor(false) elseif ( source == buyAk47 ) then -- If the player presses the 'buyAk47' button triggerServerEvent("onBuyAK47",localPlayer) end end addEventHandler("onClientGUIClick", root, guiStop) Server: function buyAkPlayer() takePlayerMoney(client, 10000) giveWeapon(client, 30, 80) outputChatBox("Otrzymales AK47",client) end addEvent("onBuyAK47",true) addEventHandler("onBuyAK47",root,buyAkPlayer)