Thread: Player Gender?
View Single Post
  #12  
Old 12-01-2007, 02:51 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Stefan View Post
I think you can do sendtext("lister","getprofile",player.account) and then get the data in function onReceiveText()
Cheers, that did the trick.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
sendtext("lister""getprofile"player.account);
}

function 
onReceiveText(texttypetextoptionstextlines)
{
  if (
textoptions == "profile") {
    
// textlines[3].tokenize("=")[1]
    // -------------------
    // 'unknown' returns '-'
    // 'Male' returns 'male'
    // 'Female' returns 'female'
    
player.gender = (textlines[3].tokenize("=")[1] != "-" textlines[3].tokenize("=")[1] : "male");  // custom player. variable
  
}

EDIT: Hmm, that's interesting. Seems like ismale/isfemale now displays what you've selected in your profile? Did this get changed lately?
EDIT x2: Also, it appears as though when you select "unknown", ismale/isfemale returns what gender you previously had selected?
__________________
Follow my work on social media post-Graal:Updated august 2025.

Last edited by xXziroXx; 12-01-2007 at 03:05 PM..
Reply With Quote