-
Posts
864 -
Joined
-
Last visited
-
Days Won
57
Everything posted by Shady1
-
as far as i know, you can encode it by serial id,you can get help from wiki for this,if you can't, contact me privately. https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#ACL_functions
-
I have a dayz server and the code to create items on dayz server is "function createItemLoot(lootPlace,x,y,z)" I am opening the interior system, I will place loot in the interior and when I place it, the loot does not appear, I want the loots to appear in the interior : function createItemLoot(lootPlace,x,y,z) local theItemTable = itemTable local theItemTableLootPlaceTable = theItemTable[lootPlace] local theItemTableLootPlaceTableSize = #theItemTableLootPlaceTable local col = createColSphere(x,y,z,1.25) local lootMarker = createMarker(x,y,(z-1),"cylinder",0.5,255,255,255,30) local hasLoot = false lootPilesDataTable[col] = {} setElementData(col,"unknownlootpile",true) setElementData(col,"itemloot",true) setElementData(col,"parent",lootPlace) setElementData(col,"marker",lootMarker) setElementData(col,"MAX_Slots",100) for i = 1,theItemTableLootPlaceTableSize do local item = theItemTableLootPlaceTable if not ((hasLoot or 0) >= 3) then local item5 = item[5] local value = 0 local number = math.random(1,10000)/100 if number <= item5 then value = 1 end if (value > 0) then local item1 = item[1] local ammoName = weaponAmmoNames(item1) if ammoName then hasLoot = ((hasLoot or 0)+1) setElementData(col,ammoName,math.random(1,3)) end hasLoot = ((hasLoot or 0)+1) setElementData(col,item1,value) end else break end end if not hasLoot then local itemData = theItemTableLootPlaceTable[math.random(1,theItemTableLootPlaceTableSize)][1] local ammoName = weaponAmmoNames(itemData) if ammoName then setElementData(col,ammoName,math.random(1,3)) end setElementData(col,itemData,1) end refre:~emLoot(col) end function createlootpilegroups(pickupPositionsTableTypesIndex) local pickupPositionsTableTypes = {"residential","industrial","farm","supermarket","military"} local pickupPositionsTableType = pickupPositionsTableTypes[pickupPositionsTableTypesIndex] if not pickupPositionsTableType then return end local pickupPositionsTableTypeTable = pickupPositions[pickupPositionsTableType] local pickupPositionsTableTypeTableSize = #pickupPositionsTableTypeTable for i = 1,pickupPositionsTableTypeTableSize do local pos = pickupPositionsTableTypeTable createItemLoot(pickupPositionsTableType,pos[1],pos[2],pos[3]) if (i == pickupPositionsTableTypeTableSize) then createlootpilegroups(pickupPositionsTableTypesIndex+1) return end end end
-
When I place loot inside the interiors, the loots do not appear, I can't find the codes for it, can you help? function createItemLoot(lootPlace,x,y,z) setElementData(col,"itemloot",true)
-
If you tell me which functions to look at on the wiki, that's enough for me, I have lua knowledge too.
-
what if i can put color in the names of the players but according to the ACL. These are the ACLs, how can I assign color codes to people automatically, I couldn't find it aclGetGroup("Founder") aclGetGroup("Developer") aclGetGroup("Admin") aclGetGroup("Moderator") aclGetGroup("Support")
-
I hadn't tried this, now I'm going to try this "content_color" XML and : <setting name="*allowColorcodedNames" value="true" friendlyname="Allow colorcoded names" group="General" accept="false,true" desc="Should the player's color code be used as the display color in scoreboard?" />
-
I'm glad you worked for me, and I thank you, you are a good person.
-
first of all thank you for answering me, i tried your codes but it didn't work,
-
hi, i wrote my scoreboard tabulation rank system, but i can't color the ranks,F2B Founder's color is red I want Developer's color to be Blue, what should I do for that? if(isObjectInACLGroup("user."..accountName, aclGetGroup("Founder"))) then return "F2BFounder" elseif(isObjectInACLGroup("user."..accountName, aclGetGroup("Developer"))) then return "Developer" elseif(isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then return "Admin" elseif(isObjectInACLGroup("user."..accountName, aclGetGroup("Moderator"))) then return "Moderator" elseif(isObjectInACLGroup("user."..accountName, aclGetGroup("VIP"))) then return "VIP" else return "Member" end
-
Ich habe den Server wieder aktiviert, ich habe einige Features entwickelt, ich warte auf euch alle.
-
Freunde, ich habe einen mta dayz Server, ich bin Deutscher und Türke Ich habe keine deutschen Freunde auf meinem Server. Wenn Sie die The Walking Dead-Serie mögen, werden Sie diesen Server lieben. Serverfunktionen Server IP : 91.134.166.76:22013 - Item Shop - Advanced group system - Missions - Vehicles of all types - Smart Zombies - NPC Bandit Groups - CCTV - Bases - Lobby - Derby - Race Mode - all databases available - old Accounts available - Shop Token - etc.
-
@nikitafloy now i wrote a new one,There is an error on the 4th line, I kill myself and I use the ./adminvip command, it does not give my inventory item server.lua function vipItemCek () local account = getPlayerAccount ( source ) local accName = getAccountName ( account ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then if getElementData(source,"Alive Time") = 0 then setElementData(source, "Map", 1)--bu soldaki 1 adet haberin olsun setElementData(source, "GPS", 1) setElementData(source, "Alice Pack", 1) setElementData(source, "Camouflage Clothing", 1) setElementData(source, "Water Bottle", 1) else outputChatBox("İtemleri yeniden alman için ölmen gerekir.",source) end else outputChatBox("Yetkili değilsin.",source) end end addEvent( "ıtemCek", true ) addEventHandler( "ıtemCek", getRootElement(), vipItemCek ) client.lua function vip() triggerServerEvent ( "ıtemCek", getLocalPlayer() ) end addCommandHandler ("adminvip", vip)
-
did not improve function giveAcl(thePlayer, cmd, target) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("VIP")) then local target = getPlayerFromNamePart(target) if(getElementType(target) == "player") then setElementData(target, "IsPlayerVip", true) local acc = getPlayerAccount(target) if acc then setAccountData(acc, "IsPlayerVip", true) end end end end addCommandHandler("setvip", giveAcl) function rmvVipD() setElementData(source, "vip.items", 0) end addEventHandler("onPlayerWasted", getRootElement(), rmvVipD) function loadVip() local VIPi = getAccountData(getPlayerAccount(source), "vip.items") setElementData(source, "vip.items", VIPi) end addEventHandler("onPlayerLogin", getRootElement(), loadVip) function saveVip() local player = getPlayerAccount(source) setAccountData(player, "vip.items", getElementData(source, "vip.items")) end addEventHandler("onPlayerQuit", getRootElement(), saveVip) addEventHandler("onPlayerSpawn", root, function() local acc = getPlayerAccount(source) if getAccountData(acc, "IsPlayerVip") then outputDebugString("Entered 1") local VIPi = getElementData(source, "vip.items") or 0 if VIPi == 0 then outputDebugString("Entered 2") setElementData(source, "Map", 1) setElementData(source, "GPS", 1) setElementData(source, "Bandage", 2) setElementData(source, "Morphine", 1) setElementData(source, "Painkiller", 1) setElementData(source, "Water Bottle", 5) setElementData(source, "Camouflage Clothing", 1) setElementData(source, "Alice Pack", 1) outputChatBox("VIP: VIP Items loaded press 'J'!", source, 0, 255, 0, false) else end end end )
-
i tested this but it didn't work, why might
-
hi guys, I wrote a vip system for my own dayz server, but I wrote something wrong, can you help me? When vip players spawn, automatic special loots will be given, I set them, but it does not work, can you fix it? function giveAcl(thePlayer, cmd, target) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("VIP")) then local theTargetElement = getPlayerFromNamePart(target) if(getElementType(theTargetElement) == "player") then setElementData(theTargetElement, "IsPlayerVip", true) local acc = getPlayerAccount(theTargetElement) if acc then setAccountData(acc, "IsPlayerVip", true) end end end end addCommandHandler("setvip", giveAcl) function rmvVipD() setElementData(source, "vip.items", 0) end addEventHandler("onPlayerWasted", getRootElement(), rmvVipD) function loadVip() local VIPi = getAccountData(getPlayerAccount(source), "vip.items") setElementData(source, "vip.items", VIPi) end addEventHandler("onPlayerLogin", getRootElement(), loadVip) function saveVip() local player = getPlayerAccount(source) setAccountData(player, "vip.items", getElementData(source, "vip.items")) end addEventHandler("onPlayerQuit", getRootElement(), saveVip) addEventHandler("onPlayerSpawn", root, function() local acc = getPlayerAccount(source) if getAccountData(acc, "IsPlayerVip") then outputDebugString("Entered 1") local VIPi = getElementData(source, "vip.items") or 0 if VIPi == 0 then outputDebugString("Entered 2") setElementData(source, "Map", 1) setElementData(source, "GPS", 1) setElementData(source, "Bandage", 2) setElementData(source, "Morphine", 1) setElementData(source, "Painkiller", 1) setElementData(source, "Water Bottle", 5) setElementData(source, "Camouflage Clothing", 1) setElementData(source, "Alice Pack", 1) outputChatBox("VIP: VIP Items loaded press 'J'!", source, 0, 255, 0, false) else end end end )
-
i want to get 1 dollar when i kill a zombie but it won't work out getPlayerMoney command,Shop token instead of getplayermoney this is the old script, can you help me: addEventHandler( "onZombieGetsKilled", getRootElement(), function( killer ) givePlayerMoney( killer, 1 ); end )
-
I do not sell, I use myself
-
-- HELI CRASH SIDES local fgCrashSpawns = { ["helicrash"] = { {1146.16,1221.79,10.1}, }, } local fgLootItems = { ["helicrashLoots"] = { -- WEAPONS {"M4",1}, {"AK-47",1}, -- ITEMS {"Toolbox",2}, {"Infrared Goggles",1}, {"Night Vision Goggles",1}, {"GPS",2}, {"Map",2}, -- MED {"Painkiller",8}, {"Morphine",8}, -- CLOTH {"Punk Clothing",2}, {"Ghillie Suit",3}, -- BACKPACK {"Alice Pack",1}, {"Czech Backpack",1}, {"Coyote Backpack",1}, {"OS Backpack",1}, }, ["helicrashMags"] = { {"M4 Mag",1}, {"AK Mag",1}, }, } function math.percentChance( percent, repeatTime ) local hits = 0 for i = 1, repeatTime do local number = math.random( 0, 200 ) / 2 if number <= percent then hits = hits + 1 end end return hits end function createHeliCrashSite( ) if heliCol then destroyElement( getElementData( heliCol, "parent" ) ) destroyElement( heliCol ) destroyElement( heliBlip ) end local item_id = math.random( 1, #fgCrashSpawns["helicrash"] ) local x,y,z = fgCrashSpawns["helicrash"][item_id][1],fgCrashSpawns["helicrash"][item_id][2],fgCrashSpawns["helicrash"][item_id][3] helicrash = createVehicle( 417, x,y,z+1,0,0,90, nil, nil, nil ) blowVehicle( helicrash ) setElementFrozen( helicrash, true ) heliCol = createColSphere( x,y,z, 6 ) heliBlip = createBlip( x,y,z, 5 ) outputChatBox( "#ffdf32[Klarice] #e5e5e5New Heli-Crash has been destroyed!", root, 0, 255, 0, true ) setElementData( heliCol, "parent", helicrash ) setElementData( heliCol, "helicrash", true ) setElementData( heliCol, "MAX_Slots", 0 ) for i, item in ipairs( fgLootItems["helicrashLoots"] ) do local value = math.percentChance( item[2] * 3.5, 15 ) setElementData( heliCol, item[1], value ) end for i, item in ipairs( fgLootItems["helicrashMags"] ) do setElementData( heliCol, item[1], math.random( 10, 30 ) ) end setTimer( createHeliCrashSite, 3600000, 1 ) end createHeliCrashSite( ) meta.xml : <meta> <info author="shady" name="heliCrash" version="1.0" type="script" /> <script src="helicrashes.lua" type="server" /> </meta>
-
if you want i can give you free airdrop system
-
Hi Mta players and officials, I want to ask a question, I am Turkish and I do not see a Turkish official in the forum, when will the Turkish official be recruited and what are the conditions?
-
thank you but when i log in the music still continues, can you help me if i give you client and server
-
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() setTimer(function() --playSound("winsound.mp3") end, 2000, 1) end ) How can I integrate the codes you wrote into them exactly? can you help me because i tried i couldn't. brruggghh
-
I installed music on login panel and it works, but when I log in, the music still continues, how can I stop it?
-
I activate the color codes by meta.xml in the score table and enter the color code in the rank.lua file to the admin authority, but I can't get any results, what should I do?