ID:165667
 
turf/hair/Short_brown
icon = 'tiles.dmi'
icon_state = "shortbrown"
density = 1
Click()
usr.overlays += 'shortbrown.dmi'
var/hairon = 'shortbrown.dmi'
usr.overlays -= usr.hair
usr.hair= hairon


how do i make it so only a male can use this hair a some other hairs only females can put on?
turf/hair/Short_brown
icon = 'tiles.dmi'
icon_state = "shortbrown"
density = 1
Click()
if(usr.female)
usr << "You cant do this!"
else
usr.overlays += 'shortbrown.dmi'
var/hairon = 'shortbrown.dmi'
usr.overlays -= usr.hair
usr.hair= hairon

Of course you would need to make a var for males.



In response to Revojake
Revojake wrote:
turf/hair/Short_brown
> icon = 'tiles.dmi'
> icon_state = "shortbrown"
> density = 1
> Click()
> if(usr.female)
> usr << "You cant do this!"
> else
> usr.overlays += 'shortbrown.dmi'
> var/hairon = 'shortbrown.dmi'
> usr.overlays -= usr.hair
> usr.hair= hairon

Of course you would need to make a var for males.




Personally, when faced with visual customization I believe you should only show what's available to their specific choices. So, if you're going to be displaying this at login, the simplest way to keep females from picking male features is to not display it to them.
In response to Teh Governator
id think you'd have to have that hidden, if that was stricktly for males.

like set
if(src.female)
set hidden=1
return


????

hopefully that will help you

-Volks.
In response to Teh Governator
nope it not on the loggin screen its in the game
In response to Teh Governator
Also, please use the built-in variable for the sex of the character known as gender.. that way, you can use the text macros, such as \hiself to show hiself/herself (like in the text "He killed himself."), which refers to the object's gender :)

- GhostAnime
In response to GhostAnime
turf/hair/Short_brown
icon = 'tiles.dmi'
icon_state = "shortbrown"
density = 1
Click()
if(usr.sex = "Male")
usr.overlays += 'shortbrown.dmi'
var/hairon = 'shortbrown.dmi'
usr.overlays -= usr.hair
usr.hair= hairon
else
usr<<"This is a male only hair."

Login()
var/charactername = input("Hello, Pick a name for your character, something you wish for other islanders to call you in the game.","Character Name?")
switch(input("Below pick one of the following backgrounds you wish for your character to be. It determines what skills you get in the game.","Character Background?") in list("male (white)","female (white)"))

if ("male (white)")
character = new /mob/You/malew()


if ("female (white)")
character = new /mob/You/femalew()


well i was wondering it i could do it by type ever time i try to make a var but i get errors.