GetPlayerName from inputtext (listitem)
#10

You could do something like this:
PHP код:
// OnDialogResponse
if(response)
{
    
ClearName(inputtext);
    
    
// Now "inputtext" contains the name only.
}
ClearName(inputtext[])
{
    
// Removes everything until the 1st found space.
    
for(new 0len strlen(inputtext); lenx++)
    {
        if(
inputtext[x] == ' ')
        {
            
strdel(inputtext01);
            break;
        }
    }
    
// Removes everything after the 2nd found space.
    
for(new 0len strlen(inputtext); lenx++)
    {
        if(
inputtext[x] == ' ')
        {
            
strdel(inputtextxlen);
        }
    }

Watch out, if the name contains spaces or if there are more than two space characters the script above might not work!
Reply


Messages In This Thread
GetPlayerName from inputtext (listitem) - by rOps - 02.12.2017, 19:01
Re: GetPlayerName from inputtext (listitem) - by RageCraftLV - 02.12.2017, 19:08
Re: GetPlayerName from inputtext (listitem) - by rOps - 02.12.2017, 19:12
Re: GetPlayerName from inputtext (listitem) - by Sabur - 02.12.2017, 19:39
Re: GetPlayerName from inputtext (listitem) - by rOps - 02.12.2017, 19:41
Re: GetPlayerName from inputtext (listitem) - by Lucases - 02.12.2017, 22:01
Re: GetPlayerName from inputtext (listitem) - by FuNkYTheGreat - 03.12.2017, 03:30
Re: GetPlayerName from inputtext (listitem) - by MEW273 - 03.12.2017, 03:51
Re: GetPlayerName from inputtext (listitem) - by Abagail - 03.12.2017, 03:54
Re: GetPlayerName from inputtext (listitem) - by RIDE2DAY - 03.12.2017, 04:14

Forum Jump:


Users browsing this thread: 1 Guest(s)