personal profiles on a server?
I'm not making a mod, just a fun menu(which I have). But I want it set it up so that the user gets stuff back at the begining of a new round if he buys the "badge" version rather than loose it at the begining of a new round. I did this using custom CVARs, but this changes it for everyone...
how do I get it so that if player "a" buys the badge version only he starts out with the item next new round... not any other player unless they have also bought the badge.. Like in warcraft how they have seperate XPs somehow... |
It is usually best to use arrays in order to accomplish this. Then you would tell the plugin to give the person with the badge the item but nobody else.
Seeing that I have a poor attention span, i will explain it rather than code it. You will need an array that will store the players id (userid, steamid, etc...) (one of those). Then, you will need a for loop to check all of the indices and an if statement in the for loop to see if they have the badge. If they do, continue giving item, if they do not, go to the next index. |
Uh, actually how would you do that? Would you put the player's id in an array? Then give the item to the id? How would you make the plugin know that it wasn't overwriting another id?
[Edit] Oh I think I got it: Code:
|
| All times are GMT -4. The time now is 16:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.