CHAMAVELI Posted September 3, 2008 Share Posted September 3, 2008 Hey guys im making my own mod (not from scratch) by modifying the Mccodes V2 attack system and make it available in jail. I needed help with two things, the user will have to have a certain item to attack in jail, and I need to know the code to check if the user has the item. The second thing I need help with is that the user will need to make this item in jail, it takes 100 energy and will take 10 minutes. Should I make this file to make the item set something in the database to 10 and every minute the cron will remove one? If it works like this how would i make the cron credit the user with the item after the 10 minutes is over, something like if the make-item-time coloumn = 1 then it would set 1 to 0 and credit the user with the item? I'm not sure if it makes sence but I need someone to help me because im new to PHP but this sounds like an easy mod. Thanks. Quote Link to comment Share on other sites More sharing options...
POG1 Posted September 3, 2008 Share Posted September 3, 2008 Re: Modification Help so you want someone to do it for you? Quote Link to comment Share on other sites More sharing options...
Danny Posted September 3, 2008 Share Posted September 3, 2008 Re: Modification Help so you want someone to do it for you? :D i think he does, should he of posted in Modifaction Request's Quote Link to comment Share on other sites More sharing options...
CHAMAVELI Posted September 3, 2008 Author Share Posted September 3, 2008 Re: Modification Help Well I want to try do it myself with help, because If I keep getting people to do it for me I won't learn. Quote Link to comment Share on other sites More sharing options...
radio_active Posted September 5, 2008 Share Posted September 5, 2008 Re: Modification Help Why would you use a cron to do this? Should I make this file to make the item set something in the database to 10 and every minute the cron will remove one? If it works like this how would i make the cron credit the user with the item after the 10 minutes is over, something like if the make-item-time coloumn = 1 then it would set 1 to 0 and credit the user with the item? Would be much better to use a unix*timestamp so when they start making it counts down and just a $db->query to remove the energy! If your wanting to do this yourself, you might want to start off with making those pathetic *Slap* or *Poke* mods and then slowly improve. The query needed to select an item from inventory is a horrible but of code! I suggest instead of using that query, adding the code to make the item taking the energy and time to make, then when its completed, just have a little event that will then allow attacking whilst they are in Jail and when they go out of jail, the item isnt their anymore, hard to explain! Quote Link to comment Share on other sites More sharing options...
CHAMAVELI Posted September 5, 2008 Author Share Posted September 5, 2008 Re: Modification Help OK that seems like a better idea. Could someone maybe give me some example code? 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.