Daron Posted April 16, 2011 Posted April 16, 2011 (edited) hey im working on rangers_den.php file for me & a friends game. i showed him the code & he wanted me to add a extra function so that the higher your ranger level, the more animals you hunt. can someone helo me with that? heres the code. Don't post paid mods. Also i have a problem with when you hunt 0 animals you still gain some exp. how would i prevent that also. Edited April 16, 2011 by Dominion Don't post paid mods. Quote
Kieran-R Posted April 16, 2011 Posted April 16, 2011 Im not going to give you an exact code, cos I cba looking through it all, but you would do something like this for the first thing you want: $animals_hunted = $ir['rangerlevel'] * rand(10,20); echo "You have hunted $animals_hunted animals."; for the second part, if ($animals_hunted == 0) { $exp_gain = 0; } else { $exp_gain = 250; } Try something like that. :) Quote
Dominion Posted April 16, 2011 Posted April 16, 2011 Don't post paid mods. I took it out of your post. Quote
Daron Posted April 16, 2011 Author Posted April 16, 2011 ah okay & thanx & sorry about that it wont happen again. Quote
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.