Jump to content

Some problems


shoBy

Recommended Posts

Hey guys...I have some problems with this scripts :| Can you help me to remove this ?

svm.png

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˜- 

Link to comment
  • Moderators

Discussing illegal software on a public forum. That is what you did, like many others still do.

I don't blame you for that :) , but in my opinion it is disrespectful towards to creators.

Also I just told you what you should do to solve your problems, so I am not that bad am I?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...