SA-MP Forums Archive
Call List - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Call List (/showthread.php?tid=259049)



Call List - Admigo - 02.06.2011

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


Re: Call List - Backwardsman97 - 02.06.2011

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;



Re: Call List - Admigo - 02.06.2011

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


Re: Call List - Backwardsman97 - 02.06.2011

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.