![]() |
Gender Questions [Solved]
![]() Edit: Figured this one out: 2: If the first one is more challenging to do, How can I disable adoptables from becoming males on adopt? I have a site where all the adoptables are female (its an adoptable site based on the game series Touhou, which have almost all female characters) and I want to make it so Female is the only gender they can get when you adopt them/use a promo code to get them. Edit: Figured this one out also. 3: How can I enable same sex breeding? |
I have taken a look at the doadopt.php code and the breeding.php code, and figured out how to change it so that you select 2 females, and also only females will be adopted, but when I tested the breeding I was banned. How do I make it so my users and I don't get banned? (I put the code back to the original ('f', 'm') array on doadopt.php and fixed the breeding.php page for now.
Edit: I figured out the banning thing, now I just need to figure out how to check to see if dropdown2 = dropdown1 Edit2: I figured out how to get everything working :) I made the check be: Code:
elseif ($female->aid == $male->aid) { //Yes I know it says male, I don't want to end up screwing up the whole code changing all the "males" to "female2" |
umm I was wondering how you modified your code tbh. If you are adding new item functions, its a good practice to add new functionalities in its corresponding function file rather than edit the main script files such as inventory.php.
|
Quote:
The modified code for breeding.php: Code:
<?php I will probaby modify the ban that talks about modifying the code to try breeding adoptables that aren't yours, and modify it into not banning but having a message "Big brother is now watching you for trying to breed adoptables that aren't yours" |
Quote:
PHP Code:
where is the fault??? |
Quote:
Unless of course you figure it out first :) Edit: I have been messing with the code a bit and I can't seem to get it to work :( Sorry |
okay, I fixed it :usedusedused:
this is the code for useful gender-swap PHP Code:
I've the primary image for male and alternates for female. much fun - I will have fun too - or better : my user |
Quote:
basically male and female versions of my adoptables, and certain adoptables that have normal alt images I can just add a check in that code so that if used on certain characters it doesn't allow you to gender swap xD. (for characters that must be female, and/or characters that have alternate forms, like one of my adoptables will have an alt form of a chimera. ) Anyways, thanks for the code! I probably never would have been able to write that xD (well I probably would if I knew more PHP xD) |
I tried your code, draugluin and I got this: "Fatal error: Cannot redeclare items_alts1() (previously declared in /home/albisi9/public_html/functions/functions_items.php:179) in /home/albisi9/public_html/functions/functions_items.php on line 206"
I don't think it will allow you to call the new function "alts2" because when I change it to something different, it goes back to normal. :| |
Well there is a duplicate function called items_alts1 in your script file, so apparently it aint gonna work. You'd have to comment out that function, replace it, or change the name to items_alt2.
|
I just overwrote the original items_alts1 because I thought that the gender swapping images is a good idea. Of course when I find an artist to do the adoptables artwork for my site, they are going to murder me :colonu:
|
ohhhhh that's what I forget to say, I overwrote it... sorry.
I don't need a funtion, which only show alternate images, without a reason. but I'm happy, if you like it... now I go and "fight" against my other problems.... :Q: |
All times are GMT -5. The time now is 03:00 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.