Jump to content
Sign in to follow this  

Function Party.check_level

Recommended Posts

Well guys, i do this bcs i need to put a minimum lv in a party and i dont know how i do so, for that i do this :)

function party:check_lv(value)
    local player_count,status = d.getf("player_count")
    for i = 1,player_count,1 do
        if(d.getf(string.format("player%d",tonumber(i))) != 0) then
            local vid = pc.select_vid(d.getf(string.format("player%d",tonumber(i))))
            if(party.is_party()) then
                if (pc.get_level() < value) then
                status = false
                status = true
            status = false
    return status,names

With that you check the lv of all characters in the group and you have the option to show the names of the ppl who dont have the minimum lv for enter :)


King Regards Deadman

  • Love 2

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.

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.