function getPlayerID(%client){ for(%a = 0; %a < ClientGroup.getCount(); %a++) if(ClientGroup.getObject(%a) == %client) return %a;}
That didnt work...
How are you using it?
I make a server.cs file and put the code there...
function getPlayerID(%client){ for(%a = 0; %a < ClientGroup.getCount(); %a++) if(ClientGroup.getObject(%a) == %client) return %a;}package IDS { function gameConnection::autoAdminCheck(%this) { messageAll('',"\c7Player ID: "@ getPlayerID(%this) @" has joined the server!"); return parent::autoAdminCheck(%this); }};activatepackage(IDS);
You are hopeless.Code: [Select]function getPlayerID(%client){ for(%a = 0; %a < ClientGroup.getCount(); %a++) if(ClientGroup.getObject(%a) == %client) return %a;}package IDS { function gameConnection::autoAdminCheck(%this) { messageAll('',"\c7Player ID: "@ getPlayerID(%this) @" has joined the server!"); return parent::autoAdminCheck(%this); }};activatepackage(IDS);
:o does it actually save the id?