Jump to content
MakeWebGames

Recommended Posts

Posted

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:

Posted

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.

Posted

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....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...