c0nka Posted February 15, 2008 Posted February 15, 2008 how would i make a certain player access a certain page e.g like if a player level 100 can by a car but if u are level 99 or under u cant.. or if u are in a different city e.g whos in the cave zone cant by a pet but whos in th medevil zone can... thanks in advanced c0nka :mrgreen: Quote
Godhand Posted February 15, 2008 Posted February 15, 2008 Re: could anyone help $location and $level the rest I'm going to let you code. I'm pointing you in the right direction to start thinking. I'll start it off if($location=blah) { some code here} else die("not in the right location to do that"); and the other if($level=blah) { some code here} else die("you are not a high enough level"); to make it both at once: if($location=blah) { if($level=blah) {some code here} } else (die("You don't have the required to do that"); Now if you want something based on equal or higher level/ area. if($location>=blah) { if($level>=blah) {some code here} } else die("you need to be a higher level or are not in a good enough area"); The difference between the die("texthere"); and print("texthere"); is that die actually makes the rest of the page not work whereas print will not do that. Quote
c0nka Posted February 15, 2008 Author Posted February 15, 2008 Re: could anyone help cheers bud :-D Quote
Godhand Posted February 15, 2008 Posted February 15, 2008 Re: could anyone help note there may be a spelling error but I think it gets the general format across. :lol:. it might be $ir instead of just $ if you get an error output.... Quote
c0nka Posted February 15, 2008 Author Posted February 15, 2008 Re: could anyone help ok mate thanks anyway :D much appreciated Quote
Godhand Posted February 15, 2008 Posted February 15, 2008 Re: could anyone help no problem just one question whyd you make 2 different posts for it? 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.