Jump to content

orcun99

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by orcun99

  1. erorr code : call: failed to call 'admin:outputAdminLog' [string "?"] x = lua code : exports.admin:outputAdminLog(player, "xvehicles: Removed ownerid of vehicle"..getVehicleData( theVehicle, 'id' )) this is firt erorr do not have export function admin script maybe ? ( I found that code "x" in internet not my own code) ------ problem 2 for vehicle type-------- function getUserID(username) local ownerq = exports.RPGsql:query("saesrpg", "SELECT id FROM user_data WHERE username=?", username) if ownerq and #ownerq > 0 then return ownerq[1].id end return 0 end function setVehicleOwner(player, _, username, clear) if not exports.sql:isPlayerInGroup(player, "subadmin") then return end if not username then return outputChatBox('You need to specify an username!', player, 255,0,0) end local theVehicle = getPedOccupiedVehicle(player) if not theVehicle then return outputChatBox('You need to be in a vehicle!', player, 255,0,0) end if clear then if not exports.sql:isPlayerInGroup(player, "saeshq") then return outputChatBox('You need to be SAES HQ to do this', player, 255,0,0) end exports.sql:exec("saesrpgslow", 'UPDATE vehicle_data SET ownerid=0 WHERE uid=?', getVehicleData( theVehicle, 'id' )) exports.admin:outputAdminLog(player, "vehicles: Removed ownerid of vehicle"..getVehicleData( theVehicle, 'id' )) return outputChatBox('Successfully removed ownerid of this vehicle',player,0,255,0) end if getVehicleData( theVehicle, 'type' ) ~= 'user' then return outputChatBox('You can not set the owner on a non "user" locked vehicle!', player, 255,0,0) end local groups = getVehicleData( theVehicle, 'groups', true ) if not groups[ username ] then return outputChatBox('The user "'..username..'" needs to be locked on the vehicle!', player, 255,0,0) end local id = getVehicleData( theVehicle, 'id' ) if not id then return outputChatBox('Weird, vehicle does not have an ID? Please contact Team Awesome', player, 255,0,0) end local userID = getUserID(username) if userID == 0 then return outputChatBox('Could not fetch the user id of: '..username, player, 255,0,0) end exports.sql:exec("database", 'UPDATE vehicle_data SET ownerid=? WHERE uid=?', userID, id) reloadVehicleFromDB(id) exports.admin:outputAdminLog(player, "vehicles: Set ownerid of vehicle"..id.." to '"..username.."' ("..userID..")") outputChatBox('All done, owner set to: '..username, player, 0,255,0) end addCommandHandler("setownerid", setVehicleOwner) coomand in game in vehicle: /setownerid user ahmet33 (ahmet33 is player username) erorr message : successfully removed ownerid of this vehicle but already no owner
  2. what I change? can u share code pls
  3. function playerSpawn (spawnX, spawnY, spawnZ, team, permission, skin, weapons, player, skinName, sR, sG, sB, rot, dim, int) local playerAccount = getPlayerAccount(player) local hasPermission = false if getAccountData(playerAccount, "override") then hasPermission = true else if permission:lower() == "none" then hasPermission = true end local outerPerm = split(permission, ";") or {permission} for i,v in ipairs(outerPerm) do local permArray = split(v, ",") if #permArray == 2 then local permType = permArray[1] local permTo = permArray[2] if permType:lower() == "group" then if exports.acl:isPlayerInGroup(player, permTo) then hasPermission = true end if isMayhemEnabled and free2[permTo] then hasPermission = true end elseif permType:lower() == "gang" then local gang = getAccountData(playerAccount, "gang") if gang and gang:lower() == permTo:lower() then hasPermission = true end end end end end if hasPermission then local spawnTeam = getTeamFromName(team) if not rot then rot = 0 end spawnPlayer (player, spawnX , spawnY, spawnZ + 1, rot, skin, 0, 0, spawnTeam) setElementDimension(player, dim or 0) setElementInterior(player, int or 0) fadeCamera (player, true) setCameraInterior (player, int or 0 ) setCameraTarget (player, player) local tR , tG , tB = getTeamColor(spawnTeam) local r = sR or tR local g = sG or tG local b = sB or tB local blip = createBlipAttachedTo(player, 0, 2, r, g, b, 255, 0, 300, getRootElement()) setElementVisibleTo(blip, player, false) setPlayerNametagColor(player, r, g, b) if(weapons) then local weps = split(weapons, ",") for i, node in ipairs(weps) do --outputConsole(node) local wepinfo = split(node, ".") local wepid = wepinfo[1] --outputConsole(wepid) local wepammo = wepinfo[2] --outputConsole(wepammo) giveWeapon ( player, wepid, wepammo ) exports.commands:giveMoney(localPlayer, 500) end end setAccountData(playerAccount, "lastSpawnPerm", permission) setElementData(player, "class", skinName) if getResourceState(getResourceFromName("hud")) == "running" then setPlayerHudComponentVisible(player, "all", false) setPlayerHudComponentVisible(player, "crosshair", true) end if armorTeams[team] then setPedArmor(player, 100) end triggerClientEvent(player, "onSpawnSuccessful", getRootElement()) else triggerClientEvent(player, "onSpawnError", getRootElement() , "Burda Doðamazsýn.!") end end addEvent("onPlayerSpawnButton", true) addEventHandler("onPlayerSpawnButton", getRootElement(), playerSpawn) function playerDespawn() local player = source for i,v in ipairs(getAttachedElements(player)) do if getElementType(v) == "blip" and getElementParent(getElementParent(v)) == resourceRoot then destroyElement(v) end end end addEventHandler("onPlayerWasted", getRootElement(), playerDespawn) addEventHandler("onPlayerQuit", getRootElement(), playerDespawn) function saveProperty(a, b, c, playah) local player = playah or source local playeraccount = getPlayerAccount(player) if not isPedDead(player) then local x, y, z = getElementPosition(player) local rot = getPedRotation(player) setAccountData(playeraccount, "x", x) setAccountData(playeraccount, "y", y) setAccountData(playeraccount, "z", z) setAccountData(playeraccount, "rot", rot) local skin = getElementModel(player) setAccountData(playeraccount, "skin", skin) local team = getTeamName(getPlayerTeam(player)) setAccountData(playeraccount, "team", team) local weaponsarray = {} for i=1, 12 do if(getPedWeapon(player, i) ~= 0 and getPedTotalAmmo(player, i) > 0) then table.insert(weaponsarray, getPedWeapon(player, i) .. "." .. getPedTotalAmmo(player, i)) end end local weaponstring = table.concat(weaponsarray,",") setAccountData(playeraccount, "weapons", weaponstring) setAccountData(playeraccount, "aliveonquit", true) setAccountData(playeraccount, "class", getElementData(player, "class")) local r,g,b = getPlayerNametagColor(player) setAccountData(playeraccount, "r", r) setAccountData(playeraccount, "g", g) setAccountData(playeraccount, "b", b) local dimension = getElementDimension(player) local interior = getElementInterior(player) setAccountData(playeraccount, "interior", interior) setAccountData(playeraccount, "dimension", dimension) else setAccountData(playeraccount, "aliveonquit", false) setAccountData(playeraccount, "x", nil) setAccountData(playeraccount, "y", nil) setAccountData(playeraccount, "z", nil) setAccountData(playeraccount, "permission", nil) setAccountData(playeraccount, "team", nil) setAccountData(playeraccount, "skin", nil) setAccountData(playeraccount, "weapons", nil) setAccountData(playeraccount, "class", nil) setAccountData(playeraccount, "r", nil) setAccountData(playeraccount, "g", nil) setAccountData(playeraccount, "b", nil) setAccountData(playeraccount, "rot", nil) setAccountData(playeraccount, "dimension", nil) setAccountData(playeraccount, "interior", nil) end end addEventHandler("onPlayerQuit", getRootElement(), saveProperty) function wasPlayerAlive() if getAccountData(getPlayerAccount(source), "aliveonquit") then --outputConsole("Seems like playah wus alive!") local playerAccount = getPlayerAccount(source) local x = getAccountData(playerAccount, "x") local y = getAccountData(playerAccount, "y") local z = getAccountData(playerAccount, "z") local rot = getAccountData(playerAccount, "rot") local team = getAccountData(playerAccount, "team") local permission = getAccountData(playerAccount, "lastSpawnPerm") local skin = getAccountData(playerAccount, "skin") local weps = getAccountData(playerAccount, "weapons") local skinName = getAccountData(playerAccount, "class") local r = getAccountData(playerAccount, "r") local g = getAccountData(playerAccount, "g") local b = getAccountData(playerAccount, "b") local dim = getAccountData(playerAccount, "dimension") local int = getAccountData(playerAccount, "interior") playerSpawn(x , y , z, team, permission, skin, weps, source, skinName, r, g, b, rot, dim, int) else triggerClientEvent(source,"showSpawnScreen",source) end end addEvent("wasPlayerAliveEvent", true) addEventHandler("wasPlayerAliveEvent", getRootElement(), wasPlayerAlive) my erorr is : attempt to index local 'permission' (a bloolean value) line: if permission:lower() == "none" then line:
  4. ilk ödemeyi alırım 6yıldır rpg modu oynamaktayım rpgler için script yazmaktayım diğer modlar hakkında pek bilgim yok derdinizi iyi anlatabilirseniz aklınızdaki scripti yapabilirim ilk ödemeyi alırım saesrpg wssrpg tarzı scriptlerim var hazır olarak satabilirim benzerlerinide yapabilirim scriptlerimi görmek denemek isteyen olursada http://www.bdrpg.tk mtasa://http://94.177.214.51 blackdragon:rpg iletişim fb.com/orcun9988
  5. orcun99

    exports

    I solved the problem on your behalf THANK U
  6. orcun99

    exports

    didn't work same erorr acl rights is done still same error
  7. orcun99

    exports

    https://prnt.sc/j8v6oq http://prntscr.com/j8v7bg atm full code: client.lua function createBanking(marker, money) if not isElement(atmWindow) then atmWindow = guiCreateWindow(561, 274, 267, 208, "BD:RPG BANKA", false) guiWindowSetSizable(atmWindow, false) gayLabel = guiCreateLabel(0.05, 0.13, 0.90, 0.08, "Bakiyen:", true, atmWindow) guiLabelSetHorizontalAlign(gayLabel, "center", false) balanceLabel = guiCreateLabel(0.05, 0.21, 0.90, 0.08,tostring(money) .. "$", true, atmWindow) guiSetFont(balanceLabel, "default-bold-small") guiLabelSetHorizontalAlign(balanceLabel, "center", false) closeButton = guiCreateButton(9, 167, 249, 32, "Menüyü Kapat", false, atmWindow) guiSetProperty(closeButton, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", closeButton, function() destroyElement(atmWindow) atmWindow = nil showCursor(false) guiSetInputEnabled(false) end, false) tabPanel = guiCreateTabPanel(9, 71, 249, 91, false, atmWindow) -- Withdraw Tab withdrawTab = guiCreateTab("Çek", tabPanel) withdrawEdit = guiCreateEdit(9, 17, 174, 25, "Bakiye Gir.", false, withdrawTab) addEventHandler ( "onClientGUIClick", withdrawEdit, function () if ( guiGetText ( withdrawEdit ) == "Bakiye Gir." or guiGetText ( withdrawEdit ) == "Geçerli Bir Bakiye Gir" ) then guiSetText ( withdrawEdit, "" ) end end, false ) withdrawButton = guiCreateButton(188, 17, 49, 25, "Tamam", false, withdrawTab) guiSetProperty(withdrawButton, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", withdrawButton, function() local atmAmount = guiGetText(withdrawEdit) if tonumber(atmAmount) and tonumber(atmAmount) > 0 then triggerServerEvent("banking",getLocalPlayer(),"withdrawal",atmAmount) else guiSetText(withdrawEdit,"Geçerli Bir Bakiye Gir!") end end, false) -- Deposit Tab depositTab = guiCreateTab("Yatır", tabPanel) depositEdit = guiCreateEdit(9, 17, 174, 25, "Bakiye Gir..", false, depositTab) addEventHandler ( "onClientGUIClick", depositEdit, function () if ( guiGetText ( depositEdit ) == "Bakiye Gir.." or guiGetText ( depositEdit ) == "Geçerli Bir Bakiye Gir" ) then guiSetText ( depositEdit, "" ) end end, false ) depositButton = guiCreateButton(188, 17, 49, 25, "Tamam", false, depositTab) guiSetProperty(depositButton, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", depositButton, function() local atmAmount = guiGetText(depositEdit) if tonumber(atmAmount) and tonumber(atmAmount) > 0 then triggerServerEvent("banking",getLocalPlayer(),"deposit",atmAmount) else guiSetText(depositEdit,"Geçerli Bir Sayı Gir!") end end, false) -- Enable / Disable Deposit Tab if getElementData(marker, "banking.type") == "ATM" then guiSetEnabled(depositTab, false) end guiSetInputEnabled(true) end end addEvent("showBank", true) addEventHandler ( "showBank", getRootElement(), createBanking) function updateTotalEdit(money) --Called from server, updates total to the value 'money'. if isElement(balanceLabel) then guiSetText(balanceLabel,exports.acommands:formatNumber(money).. "$") end end addEvent("updateTotal", true) addEventHandler ( "updateTotal", getRootElement(), updateTotalEdit) server.lua local db = exports.adatabase local bankData = -- {x,y,z,int,dim} { -- LV BANK {358.69396972656,168.33,1007.2,3,2}, {358.69396972656,165.60,1007.2,3,2}, {358.69396972656,179.76811218262,1007.2,3,2}, {411.56384277344,411.97106933594,980.61560058594,3,1}, -- LS BANK {411.56384277344,411.97106933594,980.61560058594,3,0}, -- SF BANK {412.35479736328,411.85781860352,980.61560058594,3,2}, {2537.5,-1604.5821533203,714,3,1}, {2542.5,-1604.5821533203,714,3,1}, {2547.4,-1604.5821533203,714,3,1} } local atmData = -- {x,y,z,rot,int,dim} { {2573.783447,-2432.050049,13.275315,-3.926991,0,0}, {1950.369995,-2176.166748,13.197108,-3.141592,0,0}, {1070.823975,-1865.652466,13.189775,-1.570795,0,0}, {387.745361,-1868.947632,7.478837,-1.570795,0,0}, {488.096100,-1269.109985,15.372196,0.695398,0,0}, {1011.868042,-928.996338,41.971024,0.166350,0,0}, {1617.280151,-1170.462891,23.721024,-3.171593,0,0}, {2134.264893,-1206.344971,23.526657,-5.482788,0,0}, {2435.497070,-1219.473145,25.037033,-6.268187,0,0}, {2714.669922,-1452.110962,30.1082,-10.980572,0,0}, {2308.478516,-1638.88623,14.444342,-14.122160,0,0}, {2107.753174,-1790.69519,13.203745,-15.692955,0,0}, {1272.961548,-1785.919067,13.19684,-18.834551,0,0}, {664.028992,-577.972839,15.978837,0,0,0}, {1381.084595,259.592773,19.191923,-3.534292,0,0}, {2273.72583,-76.358864,26.167656,-6.283186,0,0}, {193.713776,-181.493698,1.178124,-9.424776,0,0}, {2779.04834,-1821.866577,9.918186,0.589049,0,0}, {-44.305725,-2495.498779,36.157078,-0.981748,0,0}, {-1557.005127,-2735.659668,48.386356,-0.589049,0,0}, {-2168.949951,-2409.553711,30.267899,2.477543,0,0}, {-2683.941895,-283.600403,6.795951,3.973341,0,0}, {-2718.826172,167.332672,4.260992,0.04635,0,0}, {-1978.749878,144.813354,27.269041,-4.696039,0,0}, {-1677.094971,435.290466,6.754690,-3.910640,0,0}, {-2658.843262,1354.059082,6.588484,-4.726038,0,0}, {-1546.152222,-444.761444,5.624444,-0.799047,0,0}, {-2258.562744,2379.001953,4.646098,-0.785398,0,0}, {-1262.308472,2719.562012,49.909180,0.514049,0,0}, {-859.652161,1515.417480,22.162035,0.016350,0,0}, {-133.250870,1232.401978,19.467176,1.587146,0,0}, {-252.458679,2595.852051,62.433189,1.587146,0,0}, {1437.758423,2647.946045,10.992603,-1.554446,0,0}, {2873.047852,2442.524414,10.643948,0.801748,0,0}, {1582.180908,2218.005615,10.705400,0,0,0}, {1680.629639,1437.314453,10.405745,2.234845,0,0}, {2198.292725,1434.394653,10.629679,4.772389,0,0}, {1877.375488,2073.969727,10.662491,1.630798,0,0}, {2107.847656,896.778076,10.779678,3.171595,0,0}, {239.1975402832,1880.4007568359,11.05,0,0,0}, {432.48355102539,2539.2858886719,15.8,0,0,0}, {-551.82763671875,2579.3337402344,53.57767868042,1.59365158,0,0}, {-1895.692,-1657.640,22.65852355957,1.56608466,0,0}, {2019.3,1015.153,10.475,1.59365158,0,0}, {3042.8151855469,-770.16998291016,10.926562309265,0,0,0}, {-1524.7185058594,494.28372192383,6.8796875,0,0,0}, } local bankBlips = -- {x,y,z} { {1571.1135,-1336.7331,17.3}, -- LS {-1749.3680419922,867.71264648438,25.0859375}, -- SF {2446.2106,2376.2634,12.164} -- LV } moneyUpdater = {} bankID = 0 atmMarkers = {} atmID = 0 function getPlayerBankBalance(player) if not player or not isElement(player) or getElementType(player) ~= "player" then return 0 end local account = getPlayerAccount(player) if not account then return 0 end return tonumber(getAccountData(account, "money")) or 0 end function getAccountBankBalance(player) if not player then return 0 end local account = getAccount(player) if not account then return 0 end return tonumber(getAccountData(account, "money")) or 0 end addEvent("getPlayerBankBalance",true) addEventHandler("getPlayerBankBalance",root,getPlayerBankBalance) function setPlayerBankBalance (player,balance) if not player or not isElement(player) or getElementType(player) ~= "player" or not tonumber(balance) then return false end local account = getPlayerAccount(player) if not account then return false end setAccountData(account, "money", tonumber(balance)) return true end function setAccountBankBalance (player,balance) if not player or not tonumber(balance) then return false end local account = getAccount(player) if not account then return false end setAccountData(account, "money", tonumber(balance)) return true end addEvent ( "setPlayerBankBalance", true ) addEventHandler ( "setPlayerBankBalance", getRootElement(), setPlayerBankBalance ) function startBank() for k, v in ipairs(bankBlips) do createBlip(v[1],v[2],v[3],52,2,0,0,0,150,0,2000) end bankBlips = {} for k, v in ipairs(bankData) do local theMarker = createMarker(v[1],v[2],v[3],"cylinder",1.5,204,0,0,200) setElementData(theMarker,"banking.type","bank") setElementInterior(theMarker,v[4]) setElementDimension(theMarker,v[5]) end bankData = {} for k, v in ipairs(atmData) do local atm = createObject(2754,v[1],v[2],v[3],0,0,math.deg(v[4])) local rotX,rotY,rotZ = getElementRotation(atm) setElementRotation(atm, rotX, rotY, rotZ + 90) local theMarker = createMarker(v[1]+math.sin(math.rad(rotZ))*1.2,v[2]-math.cos(math.rad(rotZ))*1.2,v[3]-0.55,"cylinder",1,204,0,0,200) setElementData(theMarker,"banking.type","ATM") setElementInterior(atm,v[5]) setElementInterior(theMarker,v[5]) setElementDimension(atm,v[6]) setElementDimension(theMarker,v[6]) end atmData = {} end function bankPlayerJoined() local Username = getElementData(source,"username") local name = getPlayerName(source) time = getRealTime() days = time.yearday end function bankPlayerQuit(quitType,reason,responsible) local account = getPlayerAccount(source) if not account then return end local moneyBank = tonumber(getAccountData(account, "money")) or 0 local moneyDelta = tonumber(getElementData(source, "money")) or 0 moneyDelta = math.floor(moneyDelta) local playerMoney = moneyBank+moneyDelta local playerMoney = tonumber(playerMoney) setAccountData(account, "money", playerMoney) end function serverBanking(dorw,money) --This is the banking handler, it takes any values from the gui namely dorw (deposit or withdrawal) and money and uses it to set bank and user money. -- both arguements are strings from the gui local moneyBank = getPlayerBankBalance(source) local moneyHeld = tonumber(getElementData(source, "money")) local moneyDelta = math.floor(tonumber(money)) --moneyDelta is the change in ammount of moneys, floor makes it an integer if dorw == "withdrawal" then if moneyDelta <= moneyBank and moneyDelta > 0 then --check they have the available moneys in their account local playermoney = moneyBank-moneyDelta local playermoney = tonumber(playermoney) exports.acommands:giveMoney(source,moneyDelta) setPlayerBankBalance (source,playermoney) exports.acommands:sendMessage("*BD Banka* İşlem Gerçekleşti.",0,255,0,source) triggerClientEvent(source,"updateTotal",source,playermoney) -- this updates the total on the bankers GUI else exports.acommands:sendMessage("*BD BANKA* Bilinmeyen miktar.",255,0,0,source) end elseif dorw == "deposit" then if moneyDelta <= moneyHeld and moneyDelta > 0 then --check they have the available moneys on hand local playermoney = moneyBank+moneyDelta --Put the money into their account local playermoney = tonumber(playermoney) exports.acommands:takeMoney(source,moneyDelta) setPlayerBankBalance(source,playermoney) exports.acommands:sendMessage("*BD BANKA* İşlem Gerçekleşti.",0,255,0,source) triggerClientEvent(source,"updateTotal",source,playermoney) -- this updates the total on the bankers GUI else exports.acommands:sendMessage("*BD BANKA* Bilinmeyen miktar.",255,0,0,source) end else exports.acommands:sendMessage(source, "*BD BANKA* Bilinmeyen Transfer Tipi.",255,0,0,source) end end function bankMarkerHit(hitPlayer,matchingDim) if not matchingDim or getElementType(hitPlayer) ~= "player" or isPedInVehicle(hitPlayer) then return end triggerClientEvent(hitPlayer,"showBank",hitPlayer,source,getPlayerBankBalance(hitPlayer)) end addEvent("banking",true) addEventHandler("banking",root,serverBanking) addEventHandler("onMarkerHit",resourceRoot,bankMarkerHit) addEventHandler("onPlayerLogIn",root,bankPlayerJoined) addEventHandler("onPlayerQuit",root,bankPlayerQuit) addEventHandler("onResourceStart",resourceRoot,startBank) atm meta: <meta> <info author="BlackDragon:rpg scripterları" description="Banka Scripti"/> <script src="bankClient.lua" type="client" /> <script src="bankSQL.lua" type="server" /> <export function="getPlayerBankBalance" type="server"/> <export function="setPlayerBankBalance" type="server"/> <export function="getAccountBankBalance" type="server"/> <export function="setAccountBankBalance" type="server"/> <export function="createBanking" type="client"/> </meta> vippanel. client.lua GUIEditor.button[6] = guiCreateButton(171, 144, 135, 68, "ATM Menüsü Aç", false, GUIEditor.window[1]) --- addEventHandler("onClientGUIClick", GUIEditor.button[6], atm, false) -- function atm() triggerServerEvent("atm", getRootElement(), getLocalPlayer()) end vippanel server.lua --atm function atm(element) exports["WSSbanking"]:createBanking() end addEvent( "atm", true ) addEventHandler( "atm", getRootElement(), atm ) ---
  8. orcun99

    exports

    normalde mapin heryerinde atm var markere girince gui açılıyor ben vippanel diye bi script yaptım f3 e basınca ayrı bi gui açılıyor atm markerına gitmeden atmyi kullanmak amaç vippanelde atm butonuna basınca atm guisi açılsın istiyorum
  9. orcun99

    exports

    neyi değiştirmek lazım
  10. orcun99

    exports

    added meta changed exports but debug erorr: ERROR: vippanel/server.lua:154 call: failed to call 'atm:createBanking' [string "?"]
  11. orcun99

    exports

    Hi, How can export gui in another script? example scriptname: deatchmach/resources/atm/atmc.lua function createBanking(marker, money) if not isElement(atmWindow) then atmWindow = guiCreateWindow(561, 274, 267, 208, "BD:RPG BANKA", false) guiWindowSetSizable(atmWindow, false) gayLabel = guiCreateLabel(0.05, 0.13, 0.90, 0.08, "Bakiyen:", true, atmWindow) guiLabelSetHorizontalAlign(gayLabel, "center", false) balanceLabel = guiCreateLabel(0.05, 0.21, 0.90, 0.08,tostring(money) .. "$", true, atmWindow) guiSetFont(balanceLabel, "default-bold-small") guiLabelSetHorizontalAlign(balanceLabel, "center", false) closeButton = guiCreateButton(9, 167, 249, 32, "Menüyü Kapat", false, atmWindow) guiSetProperty(closeButton, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", closeButton, function() destroyElement(atmWindow) atmWindow = nil showCursor(false) guiSetInputEnabled(false) end, false) tabPanel = guiCreateTabPanel(9, 71, 249, 91, false, atmWindow) -- Withdraw Tab withdrawTab = guiCreateTab("Çek", tabPanel) withdrawEdit = guiCreateEdit(9, 17, 174, 25, "Bakiye Gir.", false, withdrawTab) addEventHandler ( "onClientGUIClick", withdrawEdit, function () if ( guiGetText ( withdrawEdit ) == "Bakiye Gir." or guiGetText ( withdrawEdit ) == "Geçerli Bir Bakiye Gir" ) then guiSetText ( withdrawEdit, "" ) end end, false ) withdrawButton = guiCreateButton(188, 17, 49, 25, "Tamam", false, withdrawTab) guiSetProperty(withdrawButton, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", withdrawButton, function() local atmAmount = guiGetText(withdrawEdit) if tonumber(atmAmount) and tonumber(atmAmount) > 0 then triggerServerEvent("banking",getLocalPlayer(),"withdrawal",atmAmount) else guiSetText(withdrawEdit,"Geçerli Bir Bakiye Gir!") end end, false) -- Deposit Tab depositTab = guiCreateTab("Yatır", tabPanel) depositEdit = guiCreateEdit(9, 17, 174, 25, "Bakiye Gir..", false, depositTab) addEventHandler ( "onClientGUIClick", depositEdit, function () if ( guiGetText ( depositEdit ) == "Bakiye Gir.." or guiGetText ( depositEdit ) == "Geçerli Bir Bakiye Gir" ) then guiSetText ( depositEdit, "" ) end end, false ) depositButton = guiCreateButton(188, 17, 49, 25, "Tamam", false, depositTab) guiSetProperty(depositButton, "NormalTextColour", "FFAAAAAA") addEventHandler("onClientGUIClick", depositButton, function() local atmAmount = guiGetText(depositEdit) if tonumber(atmAmount) and tonumber(atmAmount) > 0 then triggerServerEvent("banking",getLocalPlayer(),"deposit",atmAmount) else guiSetText(depositEdit,"Geçerli Bir Sayı Gir!") end end, false) -- Enable / Disable Deposit Tab if getElementData(marker, "banking.type") == "ATM" then guiSetEnabled(depositTab, false) end guiSetInputEnabled(true) end end addEvent("showBank", true) addEventHandler ( "showBank", getRootElement(), createBanking) I want to open this gui in another script scriptname = deatchmach/resources/vippanel/vippanels.lua ( another folder ) function atm(element) exports.atmc:createBanking() end addEvent( "atm", true ) addEventHandler( "atm", getRootElement(), atm ) ---
  12. thank u very much. works
  13. createTeam("GOD", 0, 255, 0) function tablo(thePlayer) local state = ( not getElementData ( thePlayer, "invincible" ) ) setElementData ( thePlayer, "invincible", state ) local asd = getTeamFromName("GOD") setPlayerTeam(thePlayer, asd) outputChatBox ( "#ffff00Ölümsüzük -> ".. ( state and "#00ff00Açıldı" or "#ff0000Kapandı" ) .."", thePlayer, 0, 255, 0,true) end addCommandHandler("god",tablo) client.lua addEventHandler ( "onClientPlayerDamage",root, function () if getElementData(source,"invincible") then cancelEvent() end end) function deneme() if getElementData(source,"invincible") then triggerServerEvent ( "qwe", resourceRoot, "Hello World!" ) end end addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"invincible") then cancelEvent() end end) imgW = 367 imgH = 91 function adminLogo() local players = getPlayersInTeam(getTeamFromName("GOD")) for i,player in ipairs(players) do if player ~= localPlayer then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, 8) hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, 8) pZ = pZ + 0.5 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "logo.png") end end end end end addEventHandler("onClientRender", root, adminLogo) I need if godmode on and he command /god again turn off god it's okay but I need add If god off then setplayerteam(theplayer,source) need help when u turn off godmode state turn off logo I need this and one more think if player in godmode than can't attack other players
  14. don't working : f6 can't open team Polisss or nill team f6 panel can open Polisss and nill only nill can if Polisss can't
  15. function Show_Groups_Window(player) local team = getPlayerTeam(player) if (getTeamName(team) ~= "Polisss") then outputChatBox ( "Polissin" ) return else outputChatBox("değilsin") end if not guiGetVisible(Groups_Window) then guiSetVisible(Groups_Window, true) showCursor(true) triggerServerEvent("Request_Invite_List", localPlayer) triggerServerEvent("Send_Groups_List", localPlayer) else guiSetVisible(Groups_Window, false) guiSetVisible(Group_List_Window, false) guiSetVisible(Group_Invite_Window, false) guiSetVisible(myGroup_Invite_Window, false) guiSetVisible(MyGroup_Members_Window, false) guiSetVisible(Group_Info_Window, false) guiSetVisible(Group_Leader_Window, false) guiSetVisible(Group_Rank_Window, false) guiSetVisible(Add_Rank_Window, false) guiSetVisible(Edit_Rank_Window, false) guiSetVisible(CheckRemoveRankWindow, false) guiSetVisible(Promote_Demote_Window, false) guiSetVisible(Warn_Window, false) guiSetVisible(GroupBank_Window, false) showCursor(false) end end bindKey("F6", "down", Show_Groups_Window) I need if he is in "Polisss" team then can't open f6 panel ...... if not "Polisss" then can open f6 panel note: Client side this code
  16. orcun99

    godmode

    client.lua local godModeState = false function forceLightsOn() godModeState = ( not godModeState ) outputChatBox ( "God Mode is now ".. ( godModeState and "Enabled" or "Disabled" ) ..".", 0, 255, 0 ) end if ( godModeState ) then cancelEvent ( ) end addEventHandler ( "onClientPlayerDamage", localPlayer, togdamage ) here my code but didn't work I tried fall out builds or car bomb but still have -health point and one more think I need if player godmodestate then he can't damage other users and I want the player to write in immortal mode on his head notice I edit on f1 freeroam panel lightson: wndMain = { 'wnd', text = 'Freeroam Panel | F1', x = 10, y = 150, width = 280, controls = { {'btn', id='playergrav', text='Wheels Settings', window=wndGravity, width = 260}, {'br'}, {'chk', id='lightson', text='GodMode', onclick=forceLightsOn, x = 10}, },
  17. function sendHeadshot ( attacker, weapon, bodypart, loss ) local x, y, z = getElementPosition ( source) if (getZoneName (x, y, z, true) == "Las Venturas") then if attacker == getLocalPlayer() then if bodypart == 9 then setPedAnimation ( source, "KNIFE", "KILL_Knife_Ped_Damage", -1, false, false, false ) triggerServerEvent( "onServerHeadshot", getRootElement(), source, attacker, weapon, loss ) setPedHeadless( source, true ) oldur() end end end end addEventHandler ( "onClientPlayerDamage", getRootElement(), sendHeadshot ) function oldur ( player ) setElementHealth ( source, 0 ) end setTimer ( oldur, 2000, 1, "Hello, World!" ) note script client side
  18. Can u edit this code pls
  19. server side function sendHeadshot ( attacker, weapon, bodypart, loss ) local x, y, z = getElementPosition ( source) if (getZoneName (x, y, z, true) == "Las Venturas") then if attacker == getLocalPlayer() then if bodypart == 9 then setPedAnimation ( source, "KNIFE", "KILL_Knife_Ped_Damage", -1, false, false, false ) triggerServerEvent( "onServerHeadshot", getRootElement(), source, attacker, weapon, loss ) setElementHealth ( source, 0 ) setPedHeadless( source, true ) end end end end addEventHandler ( "onClientPlayerDamage", getRootElement(), sendHeadshot ) there is no anim direct die I want to IF player have headshot then setPedAnimation ( source, "KNIFE", "KILL_Knife_Ped_Damage", -1, false, false, false ) 1one time this anim before die
×
×
  • Create New...