|  | 
| 
			 
			#1  
			
			
			
			
			
		 | ||||
| 
 | ||||
|  Giving pets a Gender 
			
			This is my first 'mod', and a small one at it. I hope you like it. This mod is so your pets can have gender. I'd love to have a breeding system, but there's no way I'm going to be able to make that. First what we're going to do is we're going to open 'myadopts.php'. Find this part: Code: $aid=@mysql_result($result,$i,"aid"); //The adoptable's ID $currentlevel=@mysql_result($result,$i,"currentlevel"); $type=@mysql_result($result,$i,"type"); $name=@mysql_result($result,$i,"name"); $totalclicks=@mysql_result($result,$i,"totalclicks"); Code: $aid=@mysql_result($result,$i,"aid"); //The adoptable's ID $currentlevel=@mysql_result($result,$i,"currentlevel"); $type=@mysql_result($result,$i,"type"); $name=@mysql_result($result,$i,"name"); $gender=@mysql_result($result,$i,"gender"); $totalclicks=@mysql_result($result,$i,"totalclicks"); Code: $article_title = $name."'s Statistics:"; $article_content = "<img src='".$image."'><br><br> <b>Total Clicks: ".$totalclicks."<br> Current Level: ".$currentlevel."<br> Next Level: ".$nloutput."<br></b>"; Code: $article_title = $name."'s Statistics:"; $article_content = "<img src='".$image."'><br><br> <b>Total Clicks: ".$totalclicks."<br> Gender: ".$gender."<br> Current Level: ".$currentlevel."<br> Next Level: ".$nloutput."<br></b>"; Under this: Code: if($name == ""){
$name = $type;
}Code: //The gender mod
$tempgender = rand(0, 1);
if($tempgender == "0") {
$gender = "Female";
unset($tempgender);
}
else {
$gender = "Male";
unset($tempgender);
}Code: mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no')");Code: mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender')");You should be done. Try adopting a creature, and then viewing it's stats. You'll see which gender it is! Please tell me what I messed up here. :) I know this has been done before, I just wanted to try it myself. ~Arianna[hr] Also, I don't know how to put it in for already existing pets. Any help there? | 
| 
 | 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Mys v1.3.4 Know Gender of New Pets Before Naming | Kyttias | Mys v1.3.x Mods | 4 | 08-04-2018 01:13 AM | 
| Mys v1.3.x Giftbox Mod (Randomly appearing, currency giving~) | Kyttias | Mys v1.3.x Mods | 14 | 06-23-2017 07:08 AM | 
| Show Gender while Naming Pet & Name Promo Code Pets | Kyttias | Questions and Supports | 5 | 07-11-2014 02:12 PM | 
| Gender | superdude44 | Questions and Supports | 5 | 07-11-2013 01:17 AM | 
| Gender? [answered] | Arianna | Questions and Supports | 4 | 11-19-2009 06:33 AM | 
| What's New? | What's Hot? | What's Popular? |