iseeyou94056 Posted March 13, 2011 Share Posted March 13, 2011 this only has a little bit in it so that you can get the basic idea and can add only the merits you want them to get First add this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. into the db then add this in the header You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. also add this to the header You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then make a file called awards.php and in it put You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then you are done just add the awards in that you want your members to get Quote Link to comment Share on other sites More sharing options...
Oo-Savage-oO Posted March 13, 2011 Share Posted March 13, 2011 You should add a seperate table for awards And one question Wouldnt it harm ur game to have all the award scripts running all the time everytime a user clicks Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted March 13, 2011 Author Share Posted March 13, 2011 im not really sure Quote Link to comment Share on other sites More sharing options...
Uridium Posted March 14, 2011 Share Posted March 14, 2011 Few things i can see wrong on your script so im going to try help you out a bit but im not going to recode it for you.. As Savage mentioned a user could visit the page more than once as your script is now there isnt a way to stop this from happening without upsetting users at level.. example if you told the script to let if($ir['level'] ==5) then created a STOP function so once they have viewed and gained their Merit it wouldnt allow them to get another merit for level 5 this would then make it so users after that who get to level 10 would'nt be able to gain a merit due to level 5 stopping them. Same applies for the rest of the script you need to make it so it knows which merit to give then you can stop that merit if its been rewarded then the script moves onto the level 10 merit.. Quote Link to comment Share on other sites More sharing options...
Lithium Posted March 14, 2011 Share Posted March 14, 2011 quite not... the script will only run if whatever award is 0 otherwise condition is false... so the multi awards to each merit would not apply there... Quote Link to comment Share on other sites More sharing options...
Diesl Posted March 14, 2011 Share Posted March 14, 2011 It's a good idea, but it would be better coded if it were designed for expansion. If I wanted to add another merit, I would have to create another column in the users table and add more if statements to the code. Not exactly ideal, especially if you have many many merits. Something to consider. Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted March 15, 2011 Author Share Posted March 15, 2011 sorry im a little slow lol i dont really understand Few things i can see wrong on your script so im going to try help you out a bit but im not going to recode it for you.. As Savage mentioned a user could visit the page more than once as your script is now there isnt a way to stop this from happening without upsetting users at level.. example if you told the script to let if($ir['level'] ==5) then created a STOP function so once they have viewed and gained their Merit it wouldnt allow them to get another merit for level 5 this would then make it so users after that who get to level 10 would'nt be able to gain a merit due to level 5 stopping them. Same applies for the rest of the script you need to make it so it knows which merit to give then you can stop that merit if its been rewarded then the script moves onto the level 10 merit.. Quote Link to comment Share on other sites More sharing options...
WarMad Posted November 25, 2013 Share Posted November 25, 2013 how would i do another database for it i have tried a couple things i cant get it to work properly Quote Link to comment Share on other sites More sharing options...
WarMad Posted November 26, 2013 Share Posted November 26, 2013 nvm got it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.