Sign in to follow this  
TwiX!

[REL]Mini Map Shop Panel {SELL NEW}

Recommended Posts

because they using the giveplayerMoney if they used element data money then will work + bad maked at alive and ded players

That because you have that Probs Mossy

I mean, all I did was remove the map buttons (except for DM) and put in the resource correctly and gave it admin rights etc. What should I do then?

Share this post


Link to post

Hello.. i know this topic is old but i want to use it in my server... and it doesnt work by unknow reason :L

[2013-06-28 04:54:11] start: Requested by Admin

[2013-06-28 04:54:11] Starting mapratings

[2013-06-28 04:57:46] ADMIN: Resource 'tx_minimapshop' restarted by Admin

[2013-06-28 04:57:46] Stopping tx_minimapshop

[2013-06-28 04:57:46] Starting tx_minimapshop

[2013-06-28 04:57:46] tx_minimapshop restarted successfully

i did everything writen on install.txt

The window loads but it doesnt show the maps

K8t8hLv5

Do you know the problem?

Regards

Share this post


Link to post

realy? follow better the instructions

for me it's work Perfect

Share this post


Link to post

hmm, i have idea > can create a PVP (Player Vs Player) in the maps same DD or DM win a hunter < Sorry Bad English

Share this post


Link to post

Something is wrong with this:

function getAliveGuys ( mode ) 
    if not mode then return end 
    if mode == 1 then 
        pAlive = { }; 
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            if ( getElementData ( player, "state" ) == "alive" ) then 
                table.insert ( pAlive, player ); 
            end 
        end 
        return pAlive; 
    elseif mode == 2 then 
        return #pAlive; 
    elseif mode == 3 then 
        if pAlive then 
            pAlive = nil; 
        end 
        return false 
    end 
end 

It says i'm always at the last position, and gives mostly 50$.

Share this post


Link to post
Something is wrong with this:
function getAliveGuys ( mode ) 
    if not mode then return end 
    if mode == 1 then 
        pAlive = { }; 
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            if ( getElementData ( player, "state" ) == "alive" ) then 
                table.insert ( pAlive, player ); 
            end 
        end 
        return pAlive; 
    elseif mode == 2 then 
        return #pAlive; 
    elseif mode == 3 then 
        if pAlive then 
            pAlive = nil; 
        end 
        return false 
    end 
end 

It says i'm always at the last position, and gives mostly 50$.

function getAliveGuys ( mode ) 
    if not mode then return end 
    pAlive = { }; 
    if mode == 1 then 
        for _, player in ipairs ( getElementsByType ( "player" ) ) do 
            if ( getElementData ( player, "state" ) == "alive" ) then 
                table.insert ( pAlive, player ); 
            end 
        end 
        return pAlive; 
    elseif mode == 2 then 
        return #pAlive; 
    elseif mode == 3 then 
        if pAlive then 
            pAlive = nil; 
        end 
        return false 
    end 
end 

by logic the table must be up i mean before asked if mode == blabla as all modes use that table

Share this post


Link to post

Sorry, it's my fault, but I don't understand what to do. :\

Share this post


Link to post

easy replace the code that you have of function getAliveGuys ( mode ) with mine that i post after quote

Share this post


Link to post

Oh, yes..

Forgive my mistake, I was a bit inattentive at the morning and didn't see the difference between the two codes. :D

I have this problem now:

http://i.imgur.com/QxoaJWp.png

It'd be okay that the player earns nothing if he's alone ot the server, but that -10000000 is kinda scary. :mrgreen:

Please help...

Share this post


Link to post

bump..

Sorry for double-post, but I really need some help in this. It's kinda irritating that everybody gets the last place at every single round.

Edited by Guest

Share this post


Link to post

Finally, I mended it!!

Here you go:

function getAliveGuys() 
    local alivePlayers = 0 
    for index,player in ipairs(getElementsByType("player")) do 
        if getElementData(player,"state") == "alive" then 
            alivePlayers = alivePlayers + 1 
        end 
    end 
    return alivePlayers 
end 
  
  
function getDeadGuys() 
    local deadPlayers = 0 
    for index,player in ipairs(getElementsByType("player")) do 
        if getElementData(player,"state") == "dead" then 
            deadPlayers = deadPlayers + 1 
        end 
    end 
    return deadPlayers 
end 
  
function giveMoneyWinDie ( ) 
    local account = getPlayerAccount ( source ); 
    local playersAlive = getAliveGuys ( 2 ); 
    local playersDead = getDeadGuys ( ); 
    local checkYourPos = playersAlive + 1 
    local pos = nil; 
    if not (checkYourPos <= 0) then 
        if tonumber ( checkYourPos ) == 1 then pos = 1 else pos = checkYourPos; end 
        if tonumber ( checkYourPos ) == 2 then pos = 2; end 
        if pos == 1 or pos == 21 or pos == 31 then 
            posName = "st"; 
        elseif pos == 2 or pos == 22 or pos == 32 then 
            posName = "nd"; 
        elseif pos == 3 or pos == 23 or pos == 33 then 
            posName = "rd"; 
        else 
            posName = "th"; 
        end 
        if not getElementData ( source, "gotMoney" ) then 
            local money = math.ceil ( getPlayerCount ( ) * 50 / pos ); 
            givePlayerMoney ( source, money ); 
            outputChatBox ( "* You were #abcdef[#ff0000" .. pos .. posName .. "#abcdef]#ffffff and #abcdefearned #ffffff" .. money .. "#00ff00$!", source, 255, 255, 255, true ); 
            setElementData ( source, "gotMoney", true ); 
            if account then 
                setAccountData ( account, "money", tostring ( getPlayerMoney ( source ) ) ); 
            end 
        end 
    end 
end 
addEventHandler ( "onPlayerWasted", root , giveMoneyWinDie ) 

Compare it with the original one, and you'll see what changed.

Share this post


Link to post
Finally, I mended it!!

Here you go:

function getAliveGuys() 
    local alivePlayers = 0 
    for index,player in ipairs(getElementsByType("player")) do 
        if getElementData(player,"state") == "alive" then 
            alivePlayers = alivePlayers + 1 
        end 
    end 
    return alivePlayers 
end 
  
  
function getDeadGuys() 
    local deadPlayers = 0 
    for index,player in ipairs(getElementsByType("player")) do 
        if getElementData(player,"state") == "dead" then 
            deadPlayers = deadPlayers + 1 
        end 
    end 
    return deadPlayers 
end 
  
function giveMoneyWinDie ( ) 
    local account = getPlayerAccount ( source ); 
    local playersAlive = getAliveGuys ( 2 ); 
    local playersDead = getDeadGuys ( ); 
    local checkYourPos = playersAlive + 1 
    local pos = nil; 
    if not (checkYourPos <= 0) then 
        if tonumber ( checkYourPos ) == 1 then pos = 1 else pos = checkYourPos; end 
        if tonumber ( checkYourPos ) == 2 then pos = 2; end 
        if pos == 1 or pos == 21 or pos == 31 then 
            posName = "st"; 
        elseif pos == 2 or pos == 22 or pos == 32 then 
            posName = "nd"; 
        elseif pos == 3 or pos == 23 or pos == 33 then 
            posName = "rd"; 
        else 
            posName = "th"; 
        end 
        if not getElementData ( source, "gotMoney" ) then 
            local money = math.ceil ( getPlayerCount ( ) * 50 / pos ); 
            givePlayerMoney ( source, money ); 
            outputChatBox ( "* You were #abcdef[#ff0000" .. pos .. posName .. "#abcdef]#ffffff and #abcdefearned #ffffff" .. money .. "#00ff00$!", source, 255, 255, 255, true ); 
            setElementData ( source, "gotMoney", true ); 
            if account then 
                setAccountData ( account, "money", tostring ( getPlayerMoney ( source ) ) ); 
            end 
        end 
    end 
end 
addEventHandler ( "onPlayerWasted", root , giveMoneyWinDie ) 

Compare it with the original one, and you'll see what changed.

you will get warning,and if player will training, your stats will ***cked

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.