Skin once owned can't be bought buy someone else
#1

as the title says, i am going to make a skin buying system using y_ini and zcmd. Probably, if the skin is already bought, then if other player tries to buy that skin, he must not be able to buy it. How can i make a restriction in this case? Thank you in advance.
Reply
#2

By saving some data, isn't it obvious? I think you already know that since you put "Scripting for money, I can script anything except MySQL" or something like that on your signature one time.

But yeah, create a file for each skin and put 0 in it if the skin isn't bought and 1 if it is.
Reply
#3

Yes buddy, but i was confuse with 1 thing, Like if i buy skin id 299, and save it in player's account. Now if someone try to buy that same skin, he must be restricted. And as you said i must save each skin in 1 file, if i do so, in buying skin cmd, i must write 20-25lines for each skin. So, there there no possible way for loop?
Reply
#4

You can save all the skins that can be bought with its owned state by it in a file, and read the file, save the values in an array and use the array for all your needs.
Reply
#5

Just run a loop for all the skins; create a file with that loop taken skins = 1 non taken = 0 check if it's taken on PlayerRequestClass return 0;..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)