Quote:
Originally Posted by Stefan
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(texttype, textoptions, textlines)
{
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?