NameToID
From the Scripting Manual
function NameToID(Name: string): integer; Parameter Info: Name (String): Player Name which will be used to return the Player ID. Description: This function will return the Player ID of Player (Name).
Examples
Command('/kick '+inttostr(NameToID('Major')));