Thanks sonysonedit, I got the idea
@Sylwester.. Yeah, I know.. But instead of getting someone else work, I thought I could get down a custom player 'list'
PHP Code:
// ----------------------------------------------------------------------------
// ------------------------Add details to playerlist---------------------------
public add_players(id) {
new ip[16];
new playerName[32]
// Get the name and ip
get_user_name(id, playerName, 31);
get_user_ip(id, ip, 15, 1/*no port*/);
new tempip[5][5]; // Hold the client ip temp for test
// Check if user is local.. e.g local ip gets changed to external
ExplodeString(tempip, 5, 4, ip, '.') ; // Split it up
if ((equal(tempip[0], "127")) || (equal(tempip[0], "192")) || (equal(tempip[0], "10")) || (equal(tempip[0], "172"))) {
format(ip,sizeof(ip),"%s",hostip);
}
// Add these to our array using id as key
if (players[id - 1][0][0]){
players[id - 1][0] = playerName
players[id - 1][1] = playerName
players[id - 1][2] = ip
}
}
I'm pretty sure I won't need the 'if (players[id - 1][0][0])' check as two player cannot get same id?
Thanks,
__________________