This site has been archived and made available for preservation purposes. No edits can be made.

OnPlayerRequestGame

This is an old revision of this page, as edited 09-13-2012, 11:14 PM by foxtacles (contribs). It may differ significantly from the current revision.
Gets called when a Player requests to play on this server (before OnSpawn and after OnClientAuthenticate). It is recommended to make sure that every Player gets a unique Base.

[top]Declaration

Code cpp:
VAULTSCRIPT VAULTSPACE Base OnPlayerRequestGame(VAULTSPACE ID) VAULTCPP(noexcept);
Code c:
forward OnPlayerRequestGame(ID);

[top]Parameters

ID - the ID of the Player

[top]Return value

You have to return a Base. This is the model which will represent the Player in-game. By returning zero, vaultmp will automatically choose a currently unused model.

[top]Usage example (C++)

Code cpp:
Base VAULTSCRIPT OnPlayerRequestGame(ID player)
{
    Base base = static_cast<Base>(0x00000000); // let vaultmp choose
    return base;
}