Call List
#1

Heey all,

I have a call command for a medic. But i want that the medic with a command can see a list of calls.
But i dont know how to make it.
Pls help.

Admigo
Reply
#2

You can create an array to store the calls in. One for their name, and one for the time of call. As they call, just move every index up one and set the most recent one to the first one. Kinda confusing sounding, but it's simple.

pawn Код:
//At the top of your script
new CallerTime[10];
new CallerName[10][MAX_PLAYER_NAME];

//When a new player calls
for(new i; i<9; i++)
{
    CallerTime[i+1] = CallerTime[i];
    CallerName[i+1] = CallerName[i];
}
CallerTime[0] = calltime;//Obviously you adjust these two to the player's name and the time of call
CallerName[0] = pname;
Reply
#3

Can you explain better because i dont know this codes:P
Reply
#4

Well it would depend on how your script is. That's where you come in. There's not really a general way other than that. You just have to fill it in.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)