![]() |
Premium Players! - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Premium Players! (/showthread.php?tid=1406) |
Premium Players! - jsventor - 20-11-2007 Ok, basically, I'm going to post how to add a premium feature to your game, it won't be to advanced, but enough to make someone premium and someone not premium, no tiles or items, just to get you started! Heres how it works, if someones premium then in their ini file Code: Premium= 1 if not then its 0 you can modify it for alot o good GAME Features! RATED: 1/5 Very easy, copy and paste! Ok first open up the server, thats where we are starting ![]() 1. In ModTypes add these Public Consts Code: ' Premium Constants 2.Then in the player rec add this Code: Premium As Byte 3. In subClearChar add Code: Player(Index).Char(CharNum).Premium = 0 4. At the bottom of ModTypes add Code: Function GetPlayerPremium(ByVal Index As Long) As Long 5. Find "Stats request packet" replace with Code: ' :::::::::::::::::::::::::: 6. In subSavePlayer add Code: Call PutVar(FileName, "CHAR" & i, "Premium", STR(Player(Index).Char(i).Premium)) 7. in subLoadPlayer add Code: Player(Index).Char(i).Premium = Val(GetVar(FileName, "CHAR" & i, "Premium")) Server Side Complete! Time for the client(do the same for the Dev_Client!) 1. In ModTypes add these Public Consts Code: ' Premium Constants 2.Then in the player rec add this Code: Premium As Byte 3. At the bottom of Mod Types add Code: Function GetPlayerPremium(ByVal Index As Long) As Long And your done! You can use the functions "GetPlayerPremium" and "SetPlayerPremium" to make this tut more fun to use, make premium defined tiles, Premium defined weapons etc. Even add it for sadscript support! I hope you enjoyed my tut! Re: Premium Players! - Matt - 20-11-2007 Quote:' Premium Constants That's backwards. Also, you should save this to the account, so it affects all characters on the account. Not just one character. Or make it exchangeable between the characters. Re: Premium Players! - jsventor - 20-11-2007 Oh I really didnt notice that >.< lol thx for the notice I'll change it now Re: Premium Players! - Robin - 21-11-2007 People donate to mirage games, but adding a premium features is poor. Re: Premium Players! - Rezeyu - 21-11-2007 You have more scanlines than a 60's television. |