Creating a list?
#1

Say I had a dialog, and I wanted it to have different lines of text, like so:

Код:
Line 1
Line 2
Line 3
How would I make so when a new line is added, the top line disappears like:
Код:
Line 2
Line 3
Line 4
?

I'm trying to create a dialog that shows people's last 3 PMs they received, so it'll be like:
Код:
PM from Jim - blahblahblah
PM from Jim - blsfsfkjsfkasjdf
PM from Bob - blhblhalhalb
Then, they'd get a new PM, so the dialog would change to:
Код:
PM from Jim - blsfsfkjsfkasjdf
PM from Bob - blhblhalhalb
PM from Sarah - blahblahblah
so everything moves up a line and the top line gets removed to make way for the next PM...
It's hard to explain.
Reply
#2

sorting and removing first pm
pawn Код:
for(new i=1; i != MAX_PMS; i++)
    PM_string[playerid][i-1] = PM_string[playerid][i];
sets new pm
pawn Код:
PM_string[playerid][MAX_PMS - 1] = NewPM_Text;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)