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-28-2011, 07:00 PM by . 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|vaultmp::Base]].

== Declaration ==
<code cpp>
VAULTSCRIPT vaultmp::Base OnPlayerRequestGame(vaultmp::ID);
forward OnPlayerRequestGame(ID);
</code>
== Parameters ==

'''[[ID|vaultmp::ID]]''' - the ID of the [[Player]]

== Return value ==

You have to return a [[Base|vaultmp::Base]]. This is the model which will represent the Player in-game.

== Usage example (C++) ==

<code cpp>
vaultmp::Base VAULTSCRIPT OnPlayerRequestGame(ID player)
{
Base base = 0x00000000;
base = 0x00030D82; // Carter from Fallout 3
return base;
}
</code>