• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua prevent cheat

Legoland

Legoland OT
Joined
Mar 3, 2013
Messages
75
Reaction score
4
Location
Sweden
Hello! :)

im using: (The Forgotten Server - Edited By Cyko V8, version 0.3.6 - Edited By Cyko V8 (Crying Damson - Edited By Cyko V8)

i wonder if there is any way to prevent cheat fraging on OT's..
I know there is several scripts that prevents exp gain on PVP-E if you're using mc because you have the same ip-adress but i need more than that!

on my serv im working on you gain 2x golden nuggets if you kill somebody.. The golden nuggets will be in use for free points on the serv if you turn 100 in.
(not sure if the "gain 2x golden nuggets" scripts works and do not have the "return 100 golden nuggets for points" system either..)

I need a script which makes it not possible to gain 2x golden nuggets, you will lose 1 lvl, you wont gain frags and will be put to jail automatic in 1h if you use mc because the player has the same ip-adress.


Thank you for reading my thread! Hope you can help me. :D
 
Just use ANTI MC Script lol so player get banned if 2x = same Ip on server^^

Code:
function onSay(cid, words, param, channel)
    local _ip = nil
    if(param ~= '') then
        _ip = tonumber(param)
        if(not _ip or _ip == 0) then
            local revertIp = doRevertIp(param)
            if(not revertIp) then
                local tid = getPlayerByNameWildcard(param)
                if(not tid) then
                    _ip = nil
                else
                    _ip = getPlayerIp(tid)
                end
            else
                _ip = doConvertIpToInteger(revertIp)
            end
        end
    end

    local list, ips = {}, {}
    local players = getPlayersOnline()
    for i, pid in ipairs(players) do
        local ip = getPlayerIp(pid)
        local tmp = table.find(ips, ip)
        if(tmp ~= nil and (not _ip or _ip == ip)) then
            if(table.countElements(list, ip) == 0) then
                list[players[tmp]] = ip
            end

            list[pid] = ip
        end

        table.insert(ips, ip)
    end

    if(table.maxn(list) > 0) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently online players with same IP address(es):")
        for pid, ip in pairs(list) do
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (" .. doConvertIntegerToIp(ip) .. ")")
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).")
    end

    return true
end
 
Last edited by a moderator:
Just use ANTI MC Script lol so player get banned if 2x = same Ip on server^^

Code:
function onSay(cid, words, param, channel)
    local _ip = nil
    if(param ~= '') then
        _ip = tonumber(param)
        if(not _ip or _ip == 0) then
            local revertIp = doRevertIp(param)
            if(not revertIp) then
                local tid = getPlayerByNameWildcard(param)
                if(not tid) then
                    _ip = nil
                else
                    _ip = getPlayerIp(tid)
                end
            else
                _ip = doConvertIpToInteger(revertIp)
            end
        end
    end

    local list, ips = {}, {}
    local players = getPlayersOnline()
    for i, pid in ipairs(players) do
        local ip = getPlayerIp(pid)
        local tmp = table.find(ips, ip)
        if(tmp ~= nil and (not _ip or _ip == ip)) then
            if(table.countElements(list, ip) == 0) then
                list[players[tmp]] = ip
            end

            list[pid] = ip
        end

        table.insert(ips, ip)
    end

    if(table.maxn(list) > 0) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently online players with same IP address(es):")
        for pid, ip in pairs(list) do
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (" .. doConvertIntegerToIp(ip) .. ")")
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).")
    end

    return true
end

that's rather stupid.
You'd ban everyone on a LAN-party lol...
 
i havent said anyting about any ban. and the ppl who use LAN teamworks! its the other 1 % that doesnt because of cheatfrag i want to make sure of they dont cheat at all.
 
i havent said anyting about any ban. and the ppl who use LAN teamworks! its the other 1 % that doesnt because of cheatfrag i want to make sure of they dont cheat at all.

I would just go with the anti mc because its really funny to pk with ur brother u ued him and then he dies by other team but the frags include there so you will get jailed...

Just use ANTI MC Script lol so player get banned if 2x = same Ip on server^^

Code:
function onSay(cid, words, param, channel)
    local _ip = nil
    if(param ~= '') then
        _ip = tonumber(param)
        if(not _ip or _ip == 0) then
            local revertIp = doRevertIp(param)
            if(not revertIp) then
                local tid = getPlayerByNameWildcard(param)
                if(not tid) then
                    _ip = nil
                else
                    _ip = getPlayerIp(tid)
                end
            else
                _ip = doConvertIpToInteger(revertIp)
            end
        end
    end

    local list, ips = {}, {}
    local players = getPlayersOnline()
    for i, pid in ipairs(players) do
        local ip = getPlayerIp(pid)
        local tmp = table.find(ips, ip)
        if(tmp ~= nil and (not _ip or _ip == ip)) then
            if(table.countElements(list, ip) == 0) then
                list[players[tmp]] = ip
            end

            list[pid] = ip
        end

        table.insert(ips, ip)
    end

    if(table.maxn(list) > 0) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently online players with same IP address(es):")
        for pid, ip in pairs(list) do
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (" .. doConvertIntegerToIp(ip) .. ")")
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).")
    end

    return true
end


Ray how exaccly is this working ? i am intreseted into this script because i have on my server that you get 1x items when you getting frags but would be nice with anti mc
 
Last edited by a moderator:
I think y'all misread. He know there's anti MC, but he need to fix his script that gives players golden nuggets.
@ Legoland But to do that, We'd have to see your nugget script to put restrictions in it. A "elseif getplayerIP == getKiller ip then return false" ;D (I don't think there's a getKiller but I did just to show)
 
@Swiff Yes, they misread big time and you're right! is my english rly that bad? anyways i will post my gold nuggets script :)

btw ofc i can skip the automatic jail system if you cheatfrag!
 
Last edited:
dont have source map bro ^^ i still use The Forgotten Server - Edited By Cyko V8, version 0.3.6 - Edited By Cyko V8 (Crying Damson - Edited By Cyko V8
 
Back
Top