# ReplaceHeroWith
handle ReplaceHeroWith(iPlayerID, pszHeroClass, nGold, nXP)
# Class
✔️ Server: CDOTA_PlayerResource
❌ Client: undefined
# Function Description
(playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
# Parameters
| Type | Name | Description |
|---|---|---|
| int | iPlayerID | No Description Set |
| string | pszHeroClass | No Description Set |
| int | nGold | No Description Set |
| int | nXP | No Description Set |