This is just one example of something you could do. It makes use of the OnPlayerChat event. If a player types " !SetMyDescription: "(without the quotes) in the chat bar and then keeps typing whatever they want their description to be, when they hit enter their new description will be set and they will recieve a feedback message that their new descrip has been set.
#include "x3_inc_string"
/////////////////////////////////////////////////////////////////////////
void main()
{
string sMessage = GetPCChatMessage();
object oSpeaker = GetPCChatSpeaker();
string sCheck = GetStringLeft(sMessage, 18);
if (sCheck == "!SetMyDescription:")
{
string sParse = StringParse(sMessage, ":");
string sDescription = StringRemoveParsed(sMessage, sParse, ":");
SetDescription(oSpeaker, sDescription);
DelayCommand(0.1, SendMessageToPC(oSpeaker, "Your BIO has been updated."));
}
}
Again this is just an example. You could change up the chat check to something more simple if needed. Keep in mind that the chat channel is limited to a certain amount of characters before it wont let you type anymore. So if someone wanted a really long bio then you would need to add more commands/chat checks to keep adding more onto the current description.
Good Luck.
Modifié par GhostOfGod, 13 septembre 2010 - 01:55 .