to get a /tplist of all players (who typed /tp), i suggest you to set a PVar for each player and loop through them..
Code:
CMD:tp(playerid,params[]){
new string[128];
new Name[MAX_PLAYER_NAME];
switch(GetPVarInt(playerid,"TeleportMe"))
{
case 0:
{
SetPVarInt(playerid,"TeleportMe",1);
GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"(%d)%s joined.",playerid,Name);
SendClientMessageToAll(0x33ccccff,string);
SendClientMessage(playerid,0x33cc33ff,"You are on the List now.");
}
case 1:
{
SendClientMessage(playerid,0xcc7f33ff,"You are already on the List.");
}
}
return 1;
}
CMD:tplist(playerid,params[]){
new string[128];
new Name[MAX_PLAYER_NAME];
new MaxPlayers=GetMaxPlayers();
for(new i=0;i<MaxPlayers;i++)
{
if(GetPVarInt(i,"TeleportMe")==1))
{
if(!IsPlayerAdmin(i))//i would leave that out. maybe even an rcon admin wants to get teleported to en event?
{
GetPlayerName(i,Name,sizeof(Name));
format(string,sizeof(string),"(%d)%s",i,Name);
SendClientMessage(playerid,0xcccc33ff,string);
}
SetPVarInt(i,"TeleportMe",0);
}
}
return 1;
}
not tested, not optimized, just a suggestion - anyways, a PVar wont blow up your .amx size, and it gets deleted (set to 0 when GetPVar-ing it) automatically at OnPlayerDisconnect(), it will return 0 then. so a not connected player cant get .. listed/teleported/exploded.... have fun debugging it