just make a little function:
public void SetName(int client, string name)
{
PS3.SetMemory(localnameoffset + (0x5808 * client), Encoding.ASCII.GetBytes(name + "\0"));
}
and then use it like this:
SetName(0, "Notorious");//set's client 0's name to "Notorious"