DonOmar Posted July 17, 2016 Share Posted July 17, 2016 (edited) - Edited July 21, 2016 by Guest Link to comment
Walid Posted July 17, 2016 Share Posted July 17, 2016 Very simple if tonumber (ammo) > tonumber (vip) then return end You create all of this and you don't know how to prevent players from converting more than they have. Link to comment
DonOmar Posted July 17, 2016 Author Share Posted July 17, 2016 where shoud i put this Line ? Link to comment
DonOmar Posted July 17, 2016 Author Share Posted July 17, 2016 also i added it and its not working Link to comment
Walid Posted July 17, 2016 Share Posted July 17, 2016 where shoud i put this Line ? also i added it and its not working Lol so why you deleted the code. Link to comment
DonOmar Posted July 17, 2016 Author Share Posted July 17, 2016 (edited) - Edited July 18, 2016 by Guest Link to comment
Walid Posted July 17, 2016 Share Posted July 17, 2016 Lol using 3 server names inside the same code :fp:, and you said that it's your code. function convert(player, cmd, ammo) if player and isElement(player) then local vip = getElementData(player, "CIFvip") or 0 if tonumber(ammo) then if (vip > 0) then if tonumber(ammo) < vip then local cash = math.ceil(tonumber(ammo)*10000 ) exports.CIFvip:removePlayerDonator(getAccountName(getPlayerAccount(player)),ammo) exports.CRPaccounts:GPM(player, cash, "converted "..ammo.." VIP Hours for "..cash) outputChatBox("You have successfully converted "..exports.CORmisc:formatNumber(ammo).." VIP hours to "..exports.CORmisc:formatNumber(cash).."", player, 0, 255, 0) else outputChatBox("You don't have VIP hours to convert!", player, 255, 0, 0) end end end end end addCommandHandler("convertviptomoney", convert) Link to comment
DonOmar Posted July 17, 2016 Author Share Posted July 17, 2016 Dude thank you for ur help and u don't know that CIF firstly was COR then CRP then became CIF just it it's our scripts and thank you for ur much help. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now