Ranking system

Is there a way to make a ranking system that you could pay Ig money to earn a rank?

Yeah, Lua.

EDIT: Guess I won’t be an asshole, I felt bad - What do you mean by ingame money? Pointshop points?

Nono, you weren’t an asshole, the guy just came here to the dev section to ask how to make a system without even have idea or giving info about what he asked, like…“Code for me for free”

The money from darkrp. The money you use to buy guns and stuff.

[editline]2nd November 2014[/editline]

Look, you might know how to code easily, but not everyone on this world does. People like you just doesn’t help people, you guys just help people if they pay. Are you really one of those assholes?

Look at:
(I’m assuming you’re using ULX here)
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/modules/sh/user.lua#L51
and
http://wiki.darkrp.com/index.php/Functions/player/server/addmoney

Don’t just come here expecting everyone to give you code, you could at least make an attempt first.

Brah, you got balls, if we never helped people this section wouldn’t exist.
3/4 of my posts are me helping people and same goes for a lot of us.

Don’t think you can do some speech and get us to spoon feed you.

[sp] Not our fault you are stupid [/sp]

Actually i’ve worked with glua by 3 years, maybe that’s why we code easily, but hey! it’s not about “We help people that pays”, anontakesover helps lots of time, to people that have an idea about what they want

I repeat you, you came here with “Is there a way to make a ranking system that you could pay Ig money to earn a rank?”

Short answer, yeah, with lua, you asked for something else? You told us how much lua do you know? Acecool will come and give you lots of examples, and you will be like whaaat, in certain point, you are looking too high with the lack of knowledge that do you know about lua

[lua]rankstore = {}

rankstore.alive = false
– has to be alive or not?

rankstore.available = {
[“trusted”] = 1000,
[“admin”] = 1000000
}

function rankstore.Purchase(player, rank)
if IsValid(player) and player:IsPlayer() and rankstore.available[rank] then
if rankstore.alive then
if player:Alive() then
if player:canAfford(rankstore.available[rank]) then
player:addMoney( -(rankstore.available[rank]) )
player:ChatPrint("You just bought "… rank … “!”)
player:SetUserGroup(rank)
end
end
else
if player:canAfford(rankstore.available[rank]) then
player:addMoney( -(rankstore.available[rank]) )
player:ChatPrint("You just bought "… rank … “!”)
player:SetUserGroup(rank)
end
end
end
end[/lua]

you are welcome. this is untested by the way.

Nvm