Dynamic Dialog Items help
#10

Quote:
Originally Posted by Norn
Quote:
Originally Posted by Norn
Bump, i'm really stuck with this.

How could i detect which player character comes first/second/third etc, i can store the %s\n%s in a global variable. Wouldn't that be easier?
Update:

I created this,

pawn Code:
stock GetMenuDialogCharacterOrder(playerid, characterslotid)
{
  new arrCoords[11][64], string[128];
    if(characterslotid >= 1 && characterslotid <= 10)
    {
      format(string,sizeof(string),"%s", MasterAccount[playerid][mCharacterString]);
      split(string, arrCoords, '\n');
        if(characterslotid == 1) return arrCoords[1];
        else if(characterslotid == 2) return arrCoords[2];
        else if(characterslotid == 3) return arrCoords[3];
        else if(characterslotid == 4) return arrCoords[4];
        else if(characterslotid == 5) return arrCoords[5];
        else if(characterslotid == 6) return arrCoords[6];
        else if(characterslotid == 7) return arrCoords[7];
        else if(characterslotid == 8) return arrCoords[8];
        else if(characterslotid == 9) return arrCoords[9];
        else if(characterslotid == 10) return arrCoords[10];
    }
}
and it works, but arrCoords[0] is blank and the names don't start until arrCoords[1]. Why is that?
I'm sure it would be easier to:

pawn Code:
stock GetMenuDialogCharacterOrder(playerid, characterslotid)
{
  new arrCoords[11][64], string[128];
    if(characterslotid >= 1 && characterslotid <= 10)
    {
      format(string,sizeof(string),"%s", MasterAccount[playerid][mCharacterString]);
      split(string, arrCoords, '\n');
      return arrCoords[characterslotid];
    }
}
Reply


Messages In This Thread
Dynamic Dialog Items help - by Norn - 25.01.2010, 07:16
Re: Dynamic Dialog Items help - by [HiC]TheKiller - 25.01.2010, 07:57
Re: Dynamic Dialog Items help - by Norn - 25.01.2010, 08:10
Re: Dynamic Dialog Items help - by [HiC]TheKiller - 25.01.2010, 08:41
Re: Dynamic Dialog Items help - by Norn - 25.01.2010, 08:46
Re: Dynamic Dialog Items help - by [HiC]TheKiller - 25.01.2010, 08:49
Re: Dynamic Dialog Items help - by Norn - 25.01.2010, 08:54
Re: Dynamic Dialog Items help - by Norn - 25.01.2010, 16:55
Re: Dynamic Dialog Items help - by Norn - 25.01.2010, 21:31
Re: Dynamic Dialog Items help - by [HiC]TheKiller - 25.01.2010, 21:41
Re: Dynamic Dialog Items help - by Norn - 25.01.2010, 21:52

Forum Jump:


Users browsing this thread: 3 Guest(s)