(RevCMS) Shop Addon?

Whip

- FiveM Server Developer -
Nov 6, 2013
408
46
Hey Guys,
I'm currently coding something for a friend and i've become a tad stalled he wants a system where you would buy points from the website which is simple enough that's just paypal buttons but he wants to be able to buy the redeem rare on the site and auto send it to there inventoy and also deduct points how would u do that. And possibly making that stock level go down automatically?

Imgur -
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Look at how the badge shops work then just replace it with the furni.
Shouldn't be that hard I do not think :-l
Wow. Copying code great web developer (y)

On a side note ,copying and pasting code obviously means if you're getting paid for it, you shouldn't be doing it.

Break down what needs to happen, and then do it.

So you need to make a page, where there is a form, when the button gets pressed you need to check a couple things.
1) Are they signed in ? (Yes -> Continue)
2) Do they have enough points ? (Yes -> Continue)

Next you need to get the points OUT of their wallet, all their points are stored in the users table so
UPDATE users SET vip_points = vip_points - (number) WHERE user_id = (get their user ID and do it here)

Bam, now they have lost the points, next you need to give them the furniture. All the furniture is stored in the ITEMS table so you use the command "INSERT" to put a new insert in there, and make sure you set the room_id column = 0 so it goes in their inventory :)

Next you will want to make sure it works before releasing, so buy one yourself and it should work fine. You could always do things like create packages, limit how many people can buy, limit how many are for sale, or other creative things too!
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
This makes no sense. Why re-invent the wheel and a script already exists and can be easily modified to do what you want.
Ok yet when someone asks a question do you think if you got a job as a developer you would get paid to copy other peoples code? He asked for help, to me that means someone wants to know how to do it, not just copy and paste and not understand shit
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
Ok yet when someone asks a question do you think if you got a job as a developer you would get paid to copy other peoples code? He asked for help, to me that means someone wants to know how to do it, not just copy and paste and not understand shit

If the code works and is what he wanted why should it matter? If the code has been released it's there for anyone to use/edit. Besides He's not even after a developer, he's asking for help on this matter.

I created something like this, I will upload it soon when I find it
 

Swaggots

Member
Sep 22, 2013
98
18
Ok yet when someone asks a question do you think if you got a job as a developer you would get paid to copy other peoples code? He asked for help, to me that means someone wants to know how to do it, not just copy and paste and not understand shit

Seeing how he'd have to customize the code for it to work as a store, he'd have to understand the code he copied. This doesn't make him any less of a developer than he already is.
 

Users who are viewing this thread

Top