legrolls Posted July 3, 2009 Posted July 3, 2009 Well, in my game, you can be a human (another name for male) or an alien (another name for female). I want it so if you are a human (male), you can only participate in some quests, and if you are an alien (female), you can participate in other quests. How would I make something human exclusive? Quote
Karlos Posted July 3, 2009 Posted July 3, 2009 Re: If you are a certain gender you can do different things than another? if ($ir['gender'] == 'Male') { // Meh... } else if ($ir['gender'] == 'Female') { // Mehh? xD } Quote
legrolls Posted July 3, 2009 Author Posted July 3, 2009 Re: If you are a certain gender you can do different things than another? This did not work, here's what I got: <? include "globals.php"; if ($ir['gender'] == 'Human') { // Meh... } else if ($ir['gender'] == 'Alien') { // Mehh? xD } ?> Please note that instead of Male and Female, it is Human and Alien Quote
AlabamaHit Posted July 3, 2009 Posted July 3, 2009 Re: If you are a certain gender you can do different things than another? well f.. imagine that. gender is Male and Female as karlos has stated on there. People (I know i'll get bashed for this) If you want Help you have to have common sense. I mean if you don't then you are definitely trying to do the wrong stuff. this is not flipping burgers here. (Don't play the I'm learning this and that. I learned to, and from reading manuals not asking for help for the simplest crap. Can't learn with reading again, this shows you are not smart enough for this.) Sorry, just sick of people asking the dumbest things. i know every needs help but when it's the same people over and over and over, on the smallest simplest, and they get pointed in right direct. and still can't do it. That shows one of 2 things, they are to stupid. or they just want someone to do it for them. Legrolls, this is not pointed only at you. It's pointed to all people doing this. Quote
gurpreet Posted July 3, 2009 Posted July 3, 2009 Re: If you are a certain gender you can do different things than another? This did not work, here's what I got: <? include "globals.php"; if ($ir['gender'] == 'Human') { // Meh... } else if ($ir['gender'] == 'Alien') { // Mehh? xD } ?> Please note that instead of Male and Female, it is Human and Alien Maybe you change the //Meh to something else -.- +1 Alabama. Quote
CrazyT Posted July 3, 2009 Posted July 3, 2009 Re: If you are a certain gender you can do different things than another? <?php switch($ir['gender']) { case 'Human': echo 'I\'m Human'; break; case 'Alien': echo 'I\'m Alien'; break; default: echo 'Invalid!'; break; } Or <?php echo (($ir['gender'] == 'Human') ? 'Human' : 'Alien'); Quote
Miniman Posted July 4, 2009 Posted July 4, 2009 Re: If you are a certain gender you can do different things than another? well f.. imagine that. gender is Male and Female as karlos has stated on there. People (I know i'll get bashed for this) If you want Help you have to have common sense. I mean if you don't then you are definitely trying to do the wrong stuff. this is not flipping burgers here. (Don't play the I'm learning this and that. I learned to, and from reading manuals not asking for help for the simplest crap. Can't learn with reading again, this shows you are not smart enough for this.) Sorry, just sick of people asking the dumbest things. i know every needs help but when it's the same people over and over and over, on the smallest simplest, and they get pointed in right direct. and still can't do it. That shows one of 2 things, they are to stupid. or they just want someone to do it for them. Legrolls, this is not pointed only at you. It's pointed to all people doing this. I took your advice, now can you help me please? I read a manual and now I get stuck here, What do I do after? <?php What do I do now? How do I make it so I can buy stuff? Quote
legrolls Posted July 4, 2009 Author Posted July 4, 2009 Re: If you are a certain gender you can do different things than another? CrazyT, thank you so much. +1 Alabama Hit, I know what you mean. Seriously, I'm just trying to make my game original. Thanks for the previous help, though. 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.