Jump to content

shoBy

Members
  • Posts

    138
  • Joined

  • Last visited

Everything posted by shoBy

  1. shoBy

    Some problems

    I can't It says already compiled...Please do it for me...And some scripts have error...Please help
  2. shoBy

    Some problems

    Can you help me ? Please do it..
  3. shoBy

    Some problems

    Hey guys...I have some problems with this scripts Can you help me to remove this ? Globalchat/chat_server.lua Script --\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ -- GlobalChat MTA:DayZ addon 1.1 -- Made by -ffs-Sniper -- You are free to edit this addon --/////////////////////////////////// --Add the resource as addon to DayZ function addAddonInfo ( name, description ) return call ( getResourceFromName( "DayZ" ), "addAddonInfo", name, description ) end addAddonInfo ( "GlobalChat", "" ) -------------------------------------------------------------------- --Your Code --Please edit the settings in the meta.xml or admin panel instead of changing those colorCodesDefault = { } colorCodesDefault.colorcode1 = "#00a5ff" colorCodesDefault.colorcode3 = "#00a5ff" colorCodesDefault.colorcode2 = "#00a5ff" colorCodes = { } colorCodes.colorcode1 = get ( "colorcode1" ) or colorCodesDefault.colorcode1 colorCodes.colorcode2 = get ( "colorcode2" ) or colorCodesDefault.colorcode2 colorCodes.colorcode3 = get ( "colorcode3" ) or colorCodesDefault.colorcode3 --Check color code on start for i, v in pairs ( colorCodes ) do if not getColorFromString ( v ) then colorCodes[i] = colorCodesDefault[i] --if the admin fails to enter a valid hex color code outputChatBox ( "Bad " .. i .. " specified at GlobalChat addon (format: #FFFFFF)", root, 255, 0, 0, false) outputDebugString ( "Bad " .. i .. " specified at GlobalChat addon (format: #FFFFFF)", 2 ) end end outputLimit = 128 --character limit for chatbox outputs (do not change this) messagePrefix = get ( "prefix" ) or "[Global]" --prefix for the outputs onlyLatinCharacters = get ( "latinchars" ) == "true" and true or false timeBetweenMessages = tonumber ( get ( "messagedelay" ) ) or 1000 --time to wait between chat messages playerTickTable = { } --create a table with tick counts of the most recent chat message --The message output function playeGlobalChat ( playersource, cmd, ... ) if cmd == "globalchat" then --Check whether the player is muted first if isPlayerMuted ( playersource ) then outputChatBox ("You are muted!", playersource, 255, 128, 22, true) return end local msg = table.concat ( {...} , " " ) --concat the arguments from table to a string seperated by spaces local msg = string.gsub ( msg, '#%x%x%x%x%x%x', '' ) --remove color-codes --Anti-spam checks local onlyLettersMsg = string.gsub ( msg , "%A", "" ) --extract letters only if onlyLettersMsg == string.upper ( onlyLettersMsg ) and #onlyLettersMsg > 6 then --check if there are more than 6 uppercase letters without any lowercase letters outputChatBox ( "Turn off your capslock!", playersource, 255, 0, 0 ) return end if string.find ( msg, "http://" ) then --disallow links outputChatBox ( "Do not spam the chat with links. Please use a private message instead!", playersource, 255, 0, 0 ) return end if onlyLatinCharacters then local noSpacesMsg = string.gsub ( msg, " ", "" ) local onlySpecCharMsg = string.gsub( noSpacesMsg, "[%a%d]", "") --extract special chars only if #onlySpecCharMsg > 10 then --check if there are more than 10 non-latin characters used (including russian, chinese, etc. characters) outputChatBox ( "Do not spam the chat with special (language) characters!", playersource, 255, 0, 0 ) return end end local var, spacesCount = string.gsub( msg, " ", "") --get the count of spaces if ( #msg / spacesCount ) > 20 and #msg > 20 then --check if there is at least one space per 20 or less characters outputChatBox ( "Do not spam the chat with long words!", playersource, 255, 0, 0 ) return end if playerTickTable[playersource] then --check if a table entry for the player exists local tick = getTickCount ( ) --get the current tick count in ms local timePassed = tick - playerTickTable[playersource] --calculate the time that passed between two messages if timePassed <= timeBetweenMessages then outputChatBox ( "Please refrain from chat spam!", playersource, 255, 0, 0 ) return end else playerTickTable[playersource] = getTickCount ( ) end --End of anti-spam checks local message = messagePrefix .. colorCodes.colorcode2 .. string.gsub ( ( getPlayerName ( playersource ) .. " : " ), '#%x%x%x%x%x%x', '' ) .. colorCodes.colorcode3 .. msg --precreate the message string local message = string.sub ( message, 1, outputLimit ) --since the chatbox won't display messages with more than 128 characters we just drop the ones at the end local r, g, b = getColorFromString ( colorCodes.colorcode1 ) outputChatBox ( message, root, r, g, b, true ) playerTickTable[playersource] = getTickCount ( ) end end addCommandHandler ( "globalchat", playeGlobalChat ) --Admin panel resource settings checks addEventHandler ( "onSettingChange", root, function ( setting, oldValue, newValue ) local setting = gettok ( setting, 2, string.byte ( "." ) ) if setting == "colorcode1" or setting == "colorcode2" or setting == "colorcode3" then if getColorFromString ( fromJSON( newValue ) ) then --if the admin fails to enter a valid hex color code colorCodes[setting] = fromJSON( newValue ) else colorCodes[setting] = colorCodesDefault[setting] outputChatBox ( "Bad " .. setting .. " specified at GlobalChat addon (format: #FFFFFF)", root, 255, 0, 0, false) outputDebugString ( "Bad " .. setting .. " specified at GlobalChat addon (format: #FFFFFF)", 2 ) end end if setting == "messagedelay" then --update message delay when changed if tonumber ( fromJSON( newValue ) ) then timeBetweenMessages = tonumber ( fromJSON( newValue ) ) or 1000 --maximum securtiy is usually best end end if setting == "prefix" then --update message prefix when changed if fromJSON( newValue ) then messagePrefix = fromJSON ( newValue ) or "[GLOBAL]" --maximum securtiy is usually best end end if setting == "latinchars" then --update onlyLatinCharacters setting when changed onlyLatinCharacters = fromJSON ( newValue ) == "true" and true or false end end ) addEventHandler ( "onPlayerQuit", root, function ( ) playerTickTable[source] = nil --remove a leaving player from our cached table end ) baseb1/baseb1_s.lua Script RestricLocation = {} TeleportLocation = {} EnabledAlarm = true TimesToKick = {} TimeSireneEnabled = true ColCuboid = false --------------------------------------- CONFIGS -------------------------------------------- RestricLocation["location1"] = {1110.8000488281,1250.9000244141,42.599998474121} --Local PARTE DE CIMA RestricLocation["location2"] = {1167.6999511719,1327.4000244141,6.0999999046326} --LOCAL PARTE DE BAIXO TeleportLocation = {1142.4000244141,1374.8000488281,10.60000038147} --LOCAL TO TELEPORT PLAYER GroupName = "Staff" -- name of the acl/gang group !!! GroupNameBy = 1 -- 1 for gang name, 2 for ACL group ! cmdTurnON = "turnONcmd" -- Command to enable alarm / cmdTurnOFF = "TurnOFFcmd" -- Command to disable alarm / MsgtoKICK = "Area protected! Leave or kick!" MsgCantCreateCollision = "Can't be created the Collision, check your location1 and location2" EnableVehicleGodMode = true -- true enabled, false disabled. KickORBAN = 1 -- 1 for kick player, 2 for BAN BanTime = 900000 -- time in seconds of ban, 900000 sec = 15 min MsgBAN = "Invasor" -- Reason of BAN ! --------------------------------------- CONFIGS -------------------------------------------- function sendMsg(iplayer,msg) outputChatBox ( msg, iplayer, 255, 255, 255, true ) end function EnterPlace ( theElement ) if (getElementType ( theElement ) == "player") and (PlayerHaveLevel (theElement) == false) and (EnabledAlarm == true ) then if(TimesToKick[theElement] > 0) then sendMsg(theElement,MsgtoKICK ..TimesToKick[theElement]) TimesToKick[theElement] = TimesToKick[theElement] -1 setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) if TimeSireneEnabled == true then triggerClientEvent ( "ActiveAlarm", getRootElement() ) end sendMsgOwners(theElement) else if (KickORBAN == 1) then kickPlayer(theElement) else banPlayer ( theElement , false, false, true, "Alarme system Base", MsgBAN, BanTime ) end end elseif getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,true) end end function ExitPlace ( theElement ) if getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,false) end end function ASBenable1 ( source ) if(PlayerHaveLevel (source) == true) then EnabledAlarm = true end end function ASBdisable1 ( source ) if(PlayerHaveLevel (source) == true) then EnabledAlarm = false end end function ResetStats ( ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if TimesToKick[aPlayer] == nil then TimesToKick[aPlayer] = 5 end if(TimesToKick[aPlayer] < 5) then TimesToKick[aPlayer] = TimesToKick[aPlayer] + 1 end end end function playerConnect ( playerNick ) local iPlayer = getPlayerFromName ( =GOW=brokengunman26 ) TimesToKick[iPlayer] = 5 end function PlayerHaveLevel( PlayerID ) if GroupNameBy == 1 then if ( getElementData ( PlayerID , "gang" ) == GroupName ) then return true else return false end else local accName = getAccountName ( getPlayerAccount ( PlayerID ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName ) ) ) then return true else return false end end end function ResourceStart( ) LoadLocations() CreateCollision() local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do TimesToKick[aPlayer] = 5 end end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ),ResourceStart) function LoadLocations() local RX, RY, RZ, WRX, WRX, WRX if(RestricLocation["location1"][1] > RestricLocation["location2"][1]) then RestricLocation["maxx"] = RestricLocation["location1"][1] RestricLocation["minx"] = RestricLocation["location2"][1] else RestricLocation["maxx"] = RestricLocation["location2"][1] RestricLocation["minx"] = RestricLocation["location1"][1] end if(RestricLocation["location1"][2] > RestricLocation["location2"][2]) then RestricLocation["maxy"] = RestricLocation["location1"][2] RestricLocation["miny"] = RestricLocation["location2"][2] else RestricLocation["maxy"] = RestricLocation["location2"][2] RestricLocation["miny"] = RestricLocation["location1"][2] end if(RestricLocation["location1"][3] > RestricLocation["location2"][3]) then RestricLocation["maxz"] = RestricLocation["location1"][3] RestricLocation["minz"] = RestricLocation["location2"][3] else RestricLocation["maxz"] = RestricLocation["location2"][3] RestricLocation["minz"] = RestricLocation["location1"][3] end end function CreateCollision() RX = RestricLocation["minx"] WRX = RestricLocation["maxx"] - RestricLocation["minx"] RY = RestricLocation["miny"] WRY = RestricLocation["maxy"] - RestricLocation["miny"] RZ = RestricLocation["minz"] WRZ = RestricLocation["maxz"] - RestricLocation["minz"] ColCuboid = createColCuboid ( RX, RY, RZ, WRX, WRY, WRZ ) if ColCuboid then addEventHandler ( "onColShapeHit", ColCuboid, EnterPlace ) addEventHandler ( "onColShapeLeave", ColCuboid, ExitPlace ) else outputDebugString(MsgCantCreateCollision) end end function ResourceStop( ) destroyElement ( ColCuboid ) end addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ),ResourceStop) function SireneEnabled() TimeSireneEnabled = true end function sendMsgOwners( PlayerID ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if(PlayerHaveLevel (aPlayer) == true) then sendMsg(aPlayer," Player " ..getPlayerName ( PlayerID ) .." is trying to join in our base!") end end end function SetVehicleGodMode( VehicleID, godEoD ) if EnableVehicleGodMode == true then setElementData(VehicleID, "godmode", godEoD) setVehicleDamageProof (VehicleID, godEoD ) end end setTimer ( SireneEnabled , 20000, 0, "" ) setTimer ( ResetStats , 15000, 0, "" ) addCommandHandler("alarmon",ASBenable1) addCommandHandler("alarmoff",ASBdisable1) addEventHandler ("onPlayerConnect", getRootElement(), playerConnect) spawn/server.lua Script LuaQ @server.lua T J Á@ b@ Š Á A ¢@ Ê A A "A J Š Á B ¢A Ê AB âA A B "B J Š Á C ¢B Ê AC âB A C "C J€ Š€ Ê€ A D "D âC€ ¢C€ bC€ bB bA Š Á B ¢A Ê AB âA â@ A A "A "@ d G€ EÀ Å@ Ü€€ \@ d@ G€ d€ GÀ E À ÅÀ \@€ € ð? @ fcz addEventHandler onsourceLogin getRootElement spawn2 spawn addCommandHandler + E@ …€ \ € EÀ À •À Å@ Ü \€ Z €€EÀ …€ Á A \@ E€ …€ ÁÀ AA \@€E€ À Å€ AA € \@€E€ À Å€ AA € \@€ € getAccountName getsourceAccount source isObjectInACLGroup user. aclGetGroup Admin setElementData adm ð? bindKey F10 both spawnvehh outputChatBox 5 /spawn ID fuel fuelmax tire tiremax engine enginemax ào@ $@ >@" Example: /spawn 521 10 90 1 2 1 1 E € Á@ \@ € setElementData jausou ! [ E € ÁB \‚€Z À€E‚ € \ @ ŒCÁ̃A €ƒ€ à @€€ À€D ƒ€ à ƒ Eà …à ÁÃ Ä AÄ C Eà C À C Eà ƒ À C Eà à À C Eà Åà C Eà Åà C Eà C € C Eà ƒ Áà C Eà À€C Eà C À€C Eà ƒ Ê @€€ À€âC C Eà à À€C € getElementData adm getElementPosition veh createVehicle @ @ vehCol createColSphere ø? attachElements setElementData maxfuel needtires needengines parent vehicle MAX_Slots D@ Tire_inVehicle Engine_inVehicle spawn fuel R\RNj^8ì€PêO)ú|hMI=I”lnmlsTÜ1>}L)ä|hMJ=IŠlnmlmd9ì=,M|ÔLF}d ,y¤\·UJñš Ê ô™J£Ð4_qؤS}Hä•}€˜Ç¬&‘"Ù=½! ž>–ßîæM½Kìóõc]" ¹T]gѼîL˜-
  4. My shop plugin doesn't save money when I logout and login again. Please help!! Here is all my script: kill_zombies.lua addEventHandler( "onZombieGetsKilled", getRootElement(), function( killer ) givePlayerMoney( killer, 15 ); end ) kill_players.lua function createMoney(player) local x, y, z = getElementPosition(player); local x1, y1, x2, y2; x1 = (x-2)+(math.random()*4); y1 = (y-2)+(math.random()*4); x2 = (x-2)+(math.random()*4); y2 = (y-2)+(math.random()*4); local moneyAmmount = getPlayerMoney(player); -- it is not fair too get all the player money. moneyAmmount = math.floor(moneyAmmount/1); -- Create the pickups setElementData(createPickup(x1, y1, z, 3, 1212), "ammount", moneyAmmount); end function moneyPickupHit(player) local money = getElementData(source, "ammount"); if money then givePlayerMoney(player, 30); destroyElement(source); end end function playerJustGotDied(ammo, attacker, weapon, bodypart) createMoney(source); end addEventHandler("onPickupUse", getRootElement(), moneyPickupHit); addEventHandler("kilLDayZPlayer", getRootElement(), playerJustGotDied); Money_chat.lua addEventHandler("onClientResourceStart", resourceRoot, function() end ) addEventHandler("onClientRender", root, function() local cash = getPlayerMoney( getLocalPlayer() ) dxDrawText("Money:", 625, 104, 688, 128, tocolor(30, 247, 7, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText(""..cash, 704,104,796,123, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) end ) Server.lua LuaQ @server.lua h J Á@ b@ Š Á A ¢@ Ê A A "A J Š Á B ¢A Ê AB âA A B "B J Š Á C ¢B Ê AC âB A C "C J€ Š€ Ê€ A D "D âC€ ¢C€ bC€ bB bA Š Á B ¢A Ê AB âA â@ A A "A "@ E€ À Š܀€ $ \@ E€ @ Š܀€ $A \@ d€ G€ E€ À Š܀€ \@ dÀ G€ E€ À Š܀€ \@ d G€ E€ À Š܀€ \@ € ð? @ addEventHandler onPlayerLogin getRootElement onPlayerQuit onJoin onPlayerJoin E@ € ------------------------------------------------------------------------------------------------------------------------------------------------ --|||||||||||||||||||||||||||||||||||||||||||| --|||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-||| --|||- +||| --|||+ @: Criado por iSantista / Scout -||| --|||- @: 12/09/2013 +||| --|||+ @: Cliente.lua -||| --|||- +||| --|||+ -||| --|||- +||| --|||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-||| --|||||||||||||||||||||||||||||||||||||||||||| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Script Inico - ------------------------------------------------------------------------------------------------------------------------------------------------------------------- local tabPanel = {} local buttons = {} local labels = {} local player = localPlayer function shopInterface() shop_window = guiCreateWindow(142,35, 544, 501, "GP Shop", false) guiSetVisible(shop_window, false) guiSetAlpha(shop_window, 0.73) guiWindowSetSizable(shop_window, false) exports.guicols:guiSetColor (shop_window, "red"); tabPanel.myTabPanel = guiCreateTabPanel(14, 120, 516, 318, false, shop_window)-- Create the Tab Panel tabPanel.TabArmas = guiCreateTab("Weapon", tabPanel.myTabPanel) buttons.CZ550 = guiCreateButton(43, 24, 165, 85, "CZ 550 / 1000$\n 5 Mag", false , tabPanel.TabArmas) -- M4 skill guiSetFont(buttons.CZ550, "default-bold-small") buttons.DesertEagle = guiCreateButton(43, 204, 165, 69, "Desert Eagle / 500$ \n 5 Mag", false, tabPanel.TabArmas) -- AK47 skill guiSetFont(buttons.DesertEagle, "default-bold-small") buttons.Granada = guiCreateButton(43, 113, 165, 82, "Granada / 500$ \n 1 Szt", false, tabPanel.TabArmas) -- Sawn-off Shotgun skill guiSetFont(buttons.Granada , "default-bold-small") buttons.M4 = guiCreateButton(291, 24, 175, 85, "M4 / 800 $\n 3 Mag", false, tabPanel.TabArmas) -- Shotgun skill guiSetFont(buttons.M4 , "default-bold-small") buttons.AK47 = guiCreateButton(291, 204, 175, 69, "AK-47 / 700 $ \n 4 Mag", false, tabPanel.TabArmas) -- SPAZ-12 skill guiSetFont(buttons.AK47 , "default-bold-small") buttons.M9SD = guiCreateButton(291, 113, 175, 82, "M9 SD / 300 $ \n 5 Mag", false, tabPanel.TabArmas) -- Silenced Pistol skill guiSetFont(buttons.M9SD , "default-bold-small") ----------- Comidas ---------------- tabPanel.TabComidas = guiCreateTab("Food", tabPanel.myTabPanel) buttons.Pizza = guiCreateButton(24, 21, 184, 84, "Pizza / 30$ \n 5 Szt", false, tabPanel.TabComidas) -- M4 skill guiSetFont(buttons.Pizza , "default-bold-small") buttons.Milk = guiCreateButton(291, 21, 188, 84, "Milk / 30$ \n 5 Szt", false, tabPanel.TabComidas) -- AK47 skill guiSetFont(buttons.Milk , "default-bold-small") buttons.Cooked = guiCreateButton(24, 120, 184, 75, "Cooked Meat / 60$ \n 5 Szt", false,tabPanel.TabComidas) -- Sawn-off Shotgun skill guiSetFont(buttons.Cooked , "default-bold-small") buttons.Soda = guiCreateButton(291, 123, 188, 75, "Soda Bottle / 50 $ \n 5 Szt", false, tabPanel.TabComidas) -- Shotgun skill guiSetFont(buttons.Soda , "default-bold-small") buttons.BeansCan = guiCreateButton(24, 204, 184, 69, "Beans Can / 40 $ \n 4 Szt", false, tabPanel.TabComidas) -- SPAZ-12 skill guiSetFont(buttons.BeansCan , "default-bold-small") buttons.WaterBottle = guiCreateButton(291, 208, 188, 65, "Water Bottle / 50 $ \n 5 Szt", false, tabPanel.TabComidas) -- Silenced Pistol skill guiSetFont(buttons.WaterBottle , "default-bold-small") ------------ Outros ---------------- tabPanel.TabOutros = guiCreateTab("Rest", tabPanel.myTabPanel) buttons.Alice = guiCreateButton(17, 198, 182, 76, "Alice Backpack/ 300$ \n ", false, tabPanel.TabOutros) -- AK47 skill guiSetFont(buttons.Alice , "default-bold-small") buttons.Road = guiCreateButton(17, 115, 182, 73, "RoadFlare / 10$ \n 1 Szt", false, tabPanel.TabOutros) -- Sawn-off Shotgun skill guiSetFont(buttons.Road , "default-bold-small") buttons.Wire = guiCreateButton(309, 26, 175, 80, "WireFence / 50$ \n 1 Szt", false, tabPanel.TabOutros) -- Shotgun skill guiSetFont(buttons.Wire , "default-bold-small") buttons.Czech = guiCreateButton(309, 198, 175, 76, "Czech Backpack/ 600$ \n ", false, tabPanel.TabOutros) -- SPAZ-12 skill guiSetFont(buttons.Czech , "default-bold-small") buttons.Full = guiCreateButton(309, 116, 175, 73, "Full Patrol Canister/ 300$ \n 2 Szt", false, tabPanel.TabOutros) -- Silenced Pistol skill guiSetFont(buttons.Full , "default-bold-small") ------------- Municao -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabMunicao = guiCreateTab("Ammo", tabPanel.myTabPanel) buttons.CZ550Mag = guiCreateButton(14, 28, 112, 60, "CZ 550 Mag / 500$ \n 5 Mag", false, tabPanel.TabMunicao) -- M4 skill guiSetFont(buttons.CZ550Mag , "default-bold-small") buttons.MP5Mag = guiCreateButton(146, 179, 112, 60, "MP5A5 Mag / 100$ \n 3 Mag", false, tabPanel.TabMunicao) -- AK47 skill guiSetFont(buttons.MP5Mag , "default-bold-small") buttons.PDWMag = guiCreateButton(146, 103, 112, 60, "PDW Mag / 200$ \n 2 Mag", false, tabPanel.TabMunicao) -- Sawn-off Shotgun skill guiSetFont(buttons.PDWMag , "default-bold-small") buttons.WinchesterMAG = guiCreateButton(14, 179, 112, 60, "1866 Slug / 200$ \n 3 Mag", false, tabPanel.TabMunicao) -- Shotgun skill guiSetFont(buttons.WinchesterMAG , "default-bold-small") buttons.AKMag = guiCreateButton(14, 103, 112, 60, "AK Mag / 400$ \n 3 Mag", false, tabPanel.TabMunicao) -- SPAZ-12 skill guiSetFont(buttons.AKMag , "default-bold-small") buttons.M4Mag = guiCreateButton(146, 28, 112, 60, "M4 Mag / 450$ \n 4 Mag", false, tabPanel.TabMunicao) -- Silenced Pistol skill guiSetFont(buttons.M4Mag , "default-bold-small") ------------- Skins -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabSkins = guiCreateTab("Skins", tabPanel.myTabPanel) buttons.Civilian = guiCreateButton(302, 30, 179, 98, "Civilian Skin $250 \n ", false, tabPanel.TabSkins) guiSetFont(buttons.Civilian, "default-bold-small") buttons.Camouflage = guiCreateButton(23, 147, 179, 98, "Camouflage Clothing $200 \n ", false, tabPanel.TabSkins) guiSetFont(buttons.Camouflage, "default-bold-small") buttons.Survivor = guiCreateButton(302, 147, 179, 98, "Survivor Clothing 50$ \n ", false, tabPanel.TabSkins) guiSetFont(buttons.Survivor, "default-bold-small") ------------- Parte de Carros -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabParteDeCarros = guiCreateTab("Auto Parts", tabPanel.myTabPanel) buttons.Tires = guiCreateButton(23, 23, 183, 97, "1 Tire / 250 $ \n ", false, tabPanel.TabParteDeCarros) guiSetFont( buttons.Tires, "default-bold-small") buttons.TankParts = guiCreateButton(291, 23, 183, 97, "5 Tank Parts / 200$ \n ", false, tabPanel.TabParteDeCarros) guiSetFont(buttons.TankParts, "default-bold-small") buttons.Engine = guiCreateButton(62, 143, 385, 111, "1 Engine 1000$ \n ", false,tabPanel.TabParteDeCarros) guiSetFont(buttons.Engine , "default-bold-small") ------------- Medicos -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabMedico = guiCreateTab("Medics", tabPanel.myTabPanel) buttons.Medickit = guiCreateButton(33, 28, 195, 103, "2 Medic kit / 1000 $", false, tabPanel.TabMedico) guiSetFont(buttons.Medickit, "default-bold-small") buttons.Bandage = guiCreateButton(33, 141, 195, 122, "4 Bandage / 250 $", false, tabPanel.TabMedico) guiSetFont(buttons.Bandage, "default-bold-small") buttons.PainKiller = guiCreateButton(270, 28, 193, 107, "4 Painkiller / 100 $", false, tabPanel.TabMedico) guiSetFont(buttons.PainKiller, "default-bold-small") buttons.Morphine = guiCreateButton(270, 141, 193, 122, "4 Morphine / 500 $", false, tabPanel.TabMedico) guiSetFont(buttons.Morphine, "default-bold-small") ------------- Criador -------------------------------------------------------------------------------------------------------------------------- Painel = guiCreateLabel(96, 41, 386, 68, "Global DayZ Shop", false, shop_window) guiSetFont(Painel, "sa-header") ----- Sair buttons.Sair = guiCreateButton(15, 443, 515, 48, "Zamknij", false, shop_window) guiSetFont(buttons.Sair , "default-bold-small") ----------- Button Color ---------------------------------------------------------------- for _, button in pairs(buttons) do guiSetProperty(button, "HoverTextColour", "FFFF0000") end end addEventHandler("onClientResourceStart", resourceRoot, shopInterface) ----------- Buy Armas --------------------------------------------------------------- addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.CZ550) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_CZ550") end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.DesertEagle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_DesertEagle") end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Granada) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_Granada") end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.M4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_M4") end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.AK47) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_AK47") end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.M9SD) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_M9SD") end end ) ----------- Comidas ----------------------------------------------------- addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Pizza) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_Pizza") end end ) addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Milk) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_Milk") end end )
  5. 2 problems: 1. My server(windows) is on 1.3 version of MTA and that server is for 1.4 version. 2. That commands like tar, don't work on my cmd(command prompt), or I need to use a mta console server?
  6. Anybody can help me ? EDIT: Is for 1.4 ?! I need for 1.3 EDIT2: I try to make it on 1.4 first, but that commands are not working on my cmd.
  7. You can also try an house system which can make an interior for a house, that you'll make fence for your house and sell it.
  8. Thist thing I can't solve alone...I need help...
  9. Ok man. Thank you! If i'll fail, i'll search for you. Thanks a lot!
  10. Hey guys! If i buy host for my server(ps: my server is on windows), I know that the host is GNU/LINUX. So...If i buy host for my server, how can I change windows on Linux ? What I need to change in .so or anything...Please tell me...
  11. Now says line 123 setPedFrozen replace with setElementFrozen but the problem is that at line 123 isn't any setPedFrozen...WTF!?
  12. In game with /debugscript 3 ? P.S.: And thanks!
  13. So...Is good or not ? Please say to me
  14. Sever.lua setPedFrozen( player, true ); Edit server.lua setElementFrozen( player, true ); is good ?
  15. I don't know what I have to do here core_client.lua local me = getLocalPlayer(); local scX, scY = guiGetScreenSize(); local hc_gui = {}; --house construction local hc_edit = {}; --edit fields local hm_gui = {}; --management addEventHandler( 'onClientResourceStart', resourceRoot, function() hc_gui['main'] = guiCreateWindow( scX-310, scY/2-450/2, 300, 450, 'House creating', false ); guiSetAlpha( hc_gui['main'], 1.0 ); --Entrance-- hc_gui['label_ec'] = guiCreateLabel( 0.042, 0.05, 0.4, 0.1, 'Coordinates of the entrance', true, hc_gui['main'] ); guiLabelSetHorizontalAlign( hc_gui['label_ec'], 'center', true ); hc_edit['edit_ec_X'] = guiCreateEdit( 0.063, 0.15, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_ec_Y'] = guiCreateEdit( 0.063, 0.22, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_ec_Z'] = guiCreateEdit( 0.063, 0.29, 0.39, 0.06, '', true, hc_gui['main'] ); hc_gui['btn_ecPick'] = guiCreateButton( 0.063, 0.36, 0.39, 0.06, 'Pick up coordinates', true, hc_gui['main'] ); --1 --Entrance teleport-- hc_gui['label_etc'] = guiCreateLabel( 0.009, 0.45, 0.5, 0.1, 'Coordinates of teleport inside the house', true, hc_gui['main'] ); guiLabelSetHorizontalAlign( hc_gui['label_etc'], 'center', true ); hc_edit['edit_etc_X'] = guiCreateEdit( 0.063, 0.55, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_etc_Y'] = guiCreateEdit( 0.063, 0.62, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_etc_Z'] = guiCreateEdit( 0.063, 0.69, 0.39, 0.06, '', true, hc_gui['main'] ); hc_gui['btn_etcPick'] = guiCreateButton( 0.063, 0.76, 0.39, 0.06, 'Pick up coordinates', true, hc_gui['main'] ); --2 --Exit-- hc_gui['label_exc'] = guiCreateLabel( 0.55, 0.05, 0.4, 0.1, 'Coordinates of the Exit', true, hc_gui['main'] ); guiLabelSetHorizontalAlign( hc_gui['label_exc'], 'center', true ); hc_edit['edit_exc_X'] = guiCreateEdit( 0.55, 0.15, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_exc_Y'] = guiCreateEdit( 0.55, 0.22, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_exc_Z'] = guiCreateEdit( 0.55, 0.29, 0.39, 0.06, '', true, hc_gui['main'] ); hc_gui['btn_excPick'] = guiCreateButton( 0.55, 0.36, 0.39, 0.06, 'Pick up coordinates', true, hc_gui['main'] ); --3 --Exit teleport-- hc_gui['label_extc'] = guiCreateLabel( 0.51, 0.45, 0.47, 0.1, 'Coordinates of teleport outside the house', true, hc_gui['main'] ); guiLabelSetHorizontalAlign( hc_gui['label_extc'], 'center', true ); hc_edit['edit_extc_X'] = guiCreateEdit( 0.55, 0.55, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_extc_Y'] = guiCreateEdit( 0.55, 0.62, 0.39, 0.06, '', true, hc_gui['main'] ); hc_edit['edit_extc_Z'] = guiCreateEdit( 0.55, 0.69, 0.39, 0.06, '', true, hc_gui['main'] ); hc_gui['btn_extcPick'] = guiCreateButton( 0.55, 0.76, 0.39, 0.06, 'Pick up coordinates', true, hc_gui['main'] ); --4 for i, v in pairs( hc_edit ) do guiEditSetReadOnly( v, true ); end; hc_gui['btn_close'] = guiCreateButton( 0.88, 0.915, 0.09, 0.05, 'X', true, hc_gui['main'] ); hc_gui['btn_reset'] = guiCreateButton( 0.88-0.21, 0.915, 0.2, 0.05, 'Reset', true, hc_gui['main'] ); hc_gui['btn_create'] = guiCreateButton( 0.0, 0.915, 0.3, 0.05, 'Create House', true, hc_gui['main'] ); hc_gui['main_add'] = guiCreateWindow( scX-310-200, (scY/2-250/2)-450/4.5, 200, 250, 'Additional info', false ); hc_gui['edit_intID'] = guiCreateEdit( 0.09, 0.1, 0.35, 0.1, '', true, hc_gui['main_add'] ); hc_gui['label_intID'] = guiCreateLabel( 0.57, 0.09, 0.3, 0.1, 'Interior ID', true, hc_gui['main_add'] ); guiLabelSetVerticalAlign( hc_gui['label_intID'], 'center' ); hc_gui['edit_dim'] = guiCreateEdit( 0.09, 0.25, 0.35, 0.1, '', true, hc_gui['main_add'] ); hc_gui['label_dim'] = guiCreateLabel( 0.57, 0.249, 0.3, 0.1, 'Dimension', true, hc_gui['main_add'] ); guiLabelSetVerticalAlign( hc_gui['label_dim'], 'center' ); hc_gui['edit_cost'] = guiCreateEdit( 0.09, 0.4, 0.45, 0.1, '', true, hc_gui['main_add'] ); hc_gui['label_cost'] = guiCreateLabel( 0.57, 0.399, 0.3, 0.1, 'Cost $$$', true, hc_gui['main_add'] ); guiLabelSetVerticalAlign( hc_gui['label_cost'], 'center' ); for i, v in pairs( hc_gui ) do guiSetFont( v, 'default-bold-small' ); if getElementType( v ) == 'gui-button' then guiButtonSetColor( v, '0099FFFF' ); end; if getElementType( v ) == 'gui-window' then guiWindowSetMovable( v, false ); guiWindowSetSizable( v, false ); end; end; guiSetVisible( hc_gui['main'], false ); guiSetVisible( hc_gui['main_add'], false ); addEventHandler( 'onClientGUIClick', hc_gui['btn_close'], function( btn ) if btn ~= 'left' then return false; end; triggerEvent( 'HP_SetVisible', me, false ); end, false ); addEventHandler( 'onClientGUIClick', root, function( btn ) if btn ~= 'left' then return false; end; if source == hc_gui['btn_ecPick'] then local x, y, z = getElementPosition( me ); guiSetText( hc_edit['edit_ec_X'], x ); guiSetText( hc_edit['edit_ec_Y'], y ); guiSetText( hc_edit['edit_ec_Z'], z ); elseif source == hc_gui['btn_etcPick'] then local x, y, z = getElementPosition( me ); guiSetText( hc_edit['edit_etc_X'], x ); guiSetText( hc_edit['edit_etc_Y'], y ); guiSetText( hc_edit['edit_etc_Z'], z ); elseif source == hc_gui['btn_excPick'] then local x, y, z = getElementPosition( me ); guiSetText( hc_edit['edit_exc_X'], x ); guiSetText( hc_edit['edit_exc_Y'], y ); guiSetText( hc_edit['edit_exc_Z'], z ); elseif source == hc_gui['btn_extcPick'] then local x, y, z = getElementPosition( me ); guiSetText( hc_edit['edit_extc_X'], x ); guiSetText( hc_edit['edit_extc_Y'], y ); guiSetText( hc_edit['edit_extc_Z'], z ); end; end ); addEventHandler( 'onClientGUIClick', hc_gui['btn_reset'], function( btn ) if btn ~= 'left' then return false; end; for i, v in pairs( hc_edit ) do guiSetText( v, '' ); end; for i, v in pairs( hc_gui ) do if getElementType( v ) == 'gui-edit' then guiSetText( v, '' ); end; end; end, false ); addEventHandler( 'onClientGUIChanged', root, function() if source == hc_gui['edit_intID'] or source == hc_gui['edit_dim'] or source == hc_gui['edit_cost'] then local currText = guiGetText( source ); local newText = string.gsub( currText, '[^0-9]', '' ); if newText ~= currText then guiSetText( source, newText ); end; end; end ); addEventHandler( 'onClientGUIClick', hc_gui['btn_create'], function( btn ) if btn ~= 'left' then return false; end; for i, v in pairs( hc_edit ) do if guiGetText( v ) == '' then outputChatBox( '* All edit fields must be filled in!', 255, 51, 36 ); return false; end; end; for i, v in pairs( hc_gui ) do if getElementType( v ) == 'gui-edit' and guiGetText( v ) == '' then outputChatBox( '* All edit fields must be filled in!', 255, 51, 36 ); return false; end; end; local tableToSend = { [1] = guiGetText( hc_edit['edit_ec_X'] ), [4] = guiGetText( hc_edit['edit_etc_X'] ), [2] = guiGetText( hc_edit['edit_ec_Y'] ), [5] = guiGetText( hc_edit['edit_etc_Y'] ), [3] = guiGetText( hc_edit['edit_ec_Z'] ), [6] = guiGetText( hc_edit['edit_etc_Z'] ), [7] = guiGetText( hc_edit['edit_exc_X'] ), [10] = guiGetText( hc_edit['edit_extc_X'] ), [8] = guiGetText( hc_edit['edit_exc_Y'] ), [11] = guiGetText( hc_edit['edit_extc_Y'] ), [9] = guiGetText( hc_edit['edit_exc_Z'] ), [12] = guiGetText( hc_edit['edit_extc_Z'] ), [13] = guiGetText( hc_gui['edit_intID'] ), [14] = guiGetText( hc_gui['edit_dim'] ), [15] = guiGetText( hc_gui['edit_cost'] ) }; for i, v in ipairs( tableToSend ) do tableToSend[ i ] = tonumber( tableToSend[ i ] ); end; triggerServerEvent( 'onPlayerAttemptCreateHouse', me, tableToSend ); triggerEvent( 'HP_SetVisible', me, false ); end, false ); hm_gui['main'] = guiCreateWindow( scX-360, scY-360, 350, 350, 'House Management', false ); guiSetAlpha( hm_gui['main'], 1.0 ); hm_gui['label_buy'] = guiCreateLabel( 0.03, 0.08, 0.255, 0.1, 'Buy this House', true, hm_gui['main'] ); guiLabelSetHorizontalAlign( hm_gui['label_buy'], 'center', true ); guiLabelSetColor( hm_gui['label_buy'], 0, 153, 255 ); hm_gui['bck_buy'] = guiCreateGridList( 0.03, 0.15, 0.255, 0.255, true, hm_gui['main'] ); hm_gui['icon_buy'] = guiCreateStaticImage( 0.005, 0.05, 1.0, 1.0, 'images/script/icon_buy.png', true, hm_gui['bck_buy'] ); hm_gui['label_sale'] = guiCreateLabel( 0.365, 0.08, 0.255, 0.1, 'Sell this House', true, hm_gui['main'] ); guiLabelSetHorizontalAlign( hm_gui['label_sale'], 'center', true ); guiLabelSetColor( hm_gui['label_sale'], 0, 153, 255 ); hm_gui['bck_sale'] = guiCreateGridList( 0.365, 0.15, 0.255, 0.255, true, hm_gui['main'] ); hm_gui['icon_sale'] = guiCreateStaticImage( 0.005, 0.05, 1.0, 1.0, 'images/script/icon_sale.png', true, hm_gui['bck_sale'] ); hm_gui['label_key'] = guiCreateLabel( 0.7, 0.08, 0.255, 0.1, 'Set Key', true, hm_gui['main'] ); guiLabelSetHorizontalAlign( hm_gui['label_key'], 'center', true ); guiLabelSetColor( hm_gui['label_key'], 0, 153, 255 ); hm_gui['bck_key'] = guiCreateGridList( 0.7, 0.15, 0.255, 0.255, true, hm_gui['main'] ); hm_gui['icon_key'] = guiCreateStaticImage( 0.005, 0.05, 1.0, 1.0, 'images/script/icon_key.png', true, hm_gui['bck_key'] ); hm_gui['label_enter'] = guiCreateLabel( 0.03, 0.45, 0.265, 0.1, 'Enter this House', true, hm_gui['main'] ); guiLabelSetHorizontalAlign( hm_gui['label_enter'], 'center', true ); guiLabelSetColor( hm_gui['label_enter'], 0, 153, 255 ); hm_gui['bck_enter'] = guiCreateGridList( 0.03, 0.53, 0.255, 0.255, true, hm_gui['main'] ); hm_gui['icon_enter'] = guiCreateStaticImage( 0.005, 0.05, 1.0, 1.0, 'images/script/icon_enter.png', true, hm_gui['bck_enter'] ); hm_gui['label_newowner'] = guiCreateLabel( 0.365, 0.45, 0.255, 0.1, 'Set new Owner', true, hm_gui['main'] ); guiLabelSetHorizontalAlign( hm_gui['label_newowner'], 'center', true ); guiLabelSetColor( hm_gui['label_newowner'], 0, 153, 255 ); hm_gui['bck_newowner'] = guiCreateGridList( 0.365, 0.53, 0.255, 0.255, true, hm_gui['main'] ); hm_gui['icon_newowner'] = guiCreateStaticImage( 0.005, 0.05, 1.0, 1.0, 'images/script/icon_newowner.png', true, hm_gui['bck_newowner'] ); hm_gui['label_destroy'] = guiCreateLabel( 0.68, 0.45, 0.295, 0.1, 'Destroy this House', true, hm_gui['main'] ); guiLabelSetHorizontalAlign( hm_gui['label_destroy'], 'center', true ); guiLabelSetColor( hm_gui['label_destroy'], 0, 153, 255 ); hm_gui['bck_destroy'] = guiCreateGridList( 0.7, 0.53, 0.255, 0.255, true, hm_gui['main'] ); hm_gui['icon_destroy'] = guiCreateStaticImage( 0.005, 0.05, 1.0, 1.0, 'images/script/icon_destroy.png', true, hm_gui['bck_destroy'] ); addEventHandler( 'onClientMouseEnter', root, function() for i, v in ipairs( { 'buy', 'sale', 'key', 'enter', 'newowner', 'destroy' } ) do if source == hm_gui['bck_'..v] or source == hm_gui['icon_'..v] then guiSetAlpha( hm_gui['icon_'..v], 0.5 ); break; end; end; end ); addEventHandler( 'onClientMouseLeave', root, function() for i, v in ipairs( { 'buy', 'sale', 'key', 'enter', 'newowner', 'destroy' } ) do if source == hm_gui['bck_'..v] or source == hm_gui['icon_'..v] then guiSetAlpha( hm_gui['icon_'..v], 1.0 ); break; end; end; end ); hm_gui['label_ID'] = guiCreateLabel( 0.05, 0.82, 0.25, 0.1, 'House ID: ', true, hm_gui['main'] ); hm_gui['label_owner'] = guiCreateLabel( 0.05, 0.88, 0.25, 0.1, 'House owner: ', true, hm_gui['main'] ); hm_gui['label_price'] = guiCreateLabel( 0.4, 0.82, 0.25, 0.1, 'House Price $: ', true, hm_gui['main'] ); hm_gui['label_ID_dyn'] = guiCreateLabel( 0.22, 0.82, 0.25, 0.1, '0', true, hm_gui['main'] ); hm_gui['label_owner_dyn'] = guiCreateLabel( 0.29, 0.88, 0.49, 0.1, 'none', true, hm_gui['main'] ); hm_gui['label_price_dyn'] = guiCreateLabel( 0.64, 0.82, 0.35, 0.1, '0', true, hm_gui['main'] ); hm_gui['btn_close'] = guiCreateButton( 0.89, 0.89, 0.07, 0.07, 'X', true, hm_gui['main'] ); guiSetVisible( hm_gui['main'], false ); addEventHandler( 'onClientGUIClick', hm_gui['btn_close'], function( btn ) if btn ~= 'left' then return false; end; guiSetVisible( hm_gui['main'], false ); triggerServerEvent( 'setFrozen', me, false ); showCursor( false ); end, false ); addEventHandler( 'onClientGUIClick', root, function( btn ) if btn ~= 'left' then return false; end; if source == hm_gui['icon_buy'] then guiSetVisible( hm_gui['main'], false ); guiSetVisible( hm_gui['wnd_key_onBuy'], true ); guiSetText( hm_gui['onBuy_edit'], 'Key' ); playSound( 'sounds/click_icon.wav' ); guiSetInputEnabled( true ); elseif source == hm_gui['icon_sale'] then guiSetVisible( hm_gui['main'], false ); guiSetVisible( hm_gui['wnd_key_onSale'], true ); guiSetText( hm_gui['onSale_edit'], 'Key' );
  16. Look at errors ! (superman)
  17. Not same things...But, here, can you help me ? At that topic, I tryed it, but it doesn't work... local groups = { "Owner", "Co-Owner", "SuperModerator" } And I want more groups...(I have more but I don't know how to give access)
  18. shoBy

    Admin rights

    Patrick Stump - Yes! Dimos - I don't understand
  19. Can you help me ? I don't understand..
  20. shoBy

    Admin rights

    Already tryed...doesn't work... Thanks for reply...
  21. shoBy

    Admin rights

    Hey guys! I want to know how can I make a new admin rank like the default ranks: Admin SuperModerator Moderator, I created the Owner rank and I don't have all accesses from the Admin rank. Somebody said that the Admin rank is default and is the biggest...How can i make Admin and Owner the biggest rank? Like...Owner and Co-Owner, owner should be the first one and Co-Owner should be the Admin rank...Sorry for bad english...
×
×
  • Create New...