Submitter Posted July 5, 2016 Share Posted July 5, 2016 Hello, How I can disabled commas, or - or + when I type a text in the chat box? Link to comment
#Humber* Posted July 5, 2016 Share Posted July 5, 2016 I think you can use string.gsub Link to comment
Submitter Posted July 5, 2016 Author Share Posted July 5, 2016 I think you can use string.gsub Can u gimme a code? Link to comment
Tails Posted July 5, 2016 Share Posted July 5, 2016 https://wiki.multitheftauto.com/wiki/OnPlayerChat local chars = {',','-','+'} for _,chr in ipairs(chars) do msg = msg:gsub(chr,'') end Hope this helps. Link to comment
Submitter Posted July 5, 2016 Author Share Posted July 5, 2016 (edited) removed Edited July 6, 2016 by Guest Link to comment
Walid Posted July 6, 2016 Share Posted July 6, 2016 Here is what you need local chars = {',','-','+'} function convert(player, cmd, amount) local account = getPlayerAccount(player) if account and not isGuestAccount(account) then local accountName = getAccountName(account) local vip = getElementData(player, "CISvip") or 0 if vip ~= 0 then for _,chr in ipairs(chars) do amount = amount:gsub(chr,'') end if (amount) and tonumber(amount) then if tonumber(amount) <= vip then local cash = math.ceil(amount*10000) exports.CISvip:removePlayerVIP(accountName,tonumber(amount)) exports.CISaccounts:GPM(player, cash, "converted "..amount.." VIP Hours for "..cash) outputChatBox("You have successfully converted "..amount.." VIP hours to $"..cash.."", player, 0, 255, 0) else outputChatBox("You can't convert more than you have",player,255,0,0) end else outputChatBox("[usage]/convertviptomoney ",player,255,0,0) end else outputChatBox("You don't have VIP hours to convert!", player, 255, 0, 0) end end end addCommandHandler("convertviptomoney", convert) Link to comment
Bean666 Posted July 6, 2016 Share Posted July 6, 2016 it's funny how these guys have / copy CIT scripts lol. Link to comment
Submitter Posted July 6, 2016 Author Share Posted July 6, 2016 Here is what you need Thanks alot, but u can delete the code? due to the stealers. Link to comment
Walid Posted July 6, 2016 Share Posted July 6, 2016 Here is what you need Thanks alot, but u can delete the code? due to the stealers. Lol you already using leaked resource. :fp: . Link to comment
Submitter Posted July 6, 2016 Author Share Posted July 6, 2016 Here is what you need Thanks alot, but u can delete the code? due to the stealers. Lol you already using leaked resource. :fp: . I am who made it lol Link to comment
Bean666 Posted July 6, 2016 Share Posted July 6, 2016 non would believe such a thing. you have exports of CIT scripts and same idea as CIT. you made a huge code and exports that you can't even solve small things? lol. Link to comment
Captain Cody Posted July 6, 2016 Share Posted July 6, 2016 exports.CISvip:removePlayerVIP(accountName,tonumber(amount)) exports.CISaccounts:GPM(player, cash, "converted "..amount.." VIP Changing the T to an S won't convince any practical scripter not encouraging this what so ever but if you at least going to try to post a leaked script, at-least make it convincing. Another thing is, If you know how to create the exports and what not, you'd be able to do something such as this on your own. Link to comment
Submitter Posted July 6, 2016 Author Share Posted July 6, 2016 guys! you help me and thanks alot! stop saying fucking 'leaked, CIT, CIS' JUST GO HELP ANOTHER PLAYERS, NOT FORCED TO HELP ME! 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