Function: AddWaypoint(player, name, type)
Description: Adds or replaces an entry in the connected player's connection-local waypoint list. Records a category and generated ID; this binding takes no coordinates. Call SendWaypoints to transmit the list.
Parameters:
player: connected player spawn. name: nonempty waypoint name. Optional integer type defaults to 2 when omitted or zero; the client method narrows it to a byte.
Returns: None. Invalid input or missing connection has no effect.
Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.