Made a admin command for refreshing class data on one or more players.

Updated infect module to use new reload function.
Fixed typo in command description.
Known issue: Models isn't always restored on zr_human. If "default" is used, there's practically no model change. Possible solution: Store path in a buffer when the player join a team and select a model. Then read from that buffer when "default" is used.
This commit is contained in:
richard
2009-06-18 03:33:09 +02:00
parent 9cac025358
commit 4d48cd65de
4 changed files with 99 additions and 5 deletions

View File

@ -18,8 +18,7 @@
*/
/**
* To be called when a client connect to the server.
* (OnClientPutInServer)
* Called when a client connects to the server (OnClientPutInServer).
*/
ClassClientInit(client)
{
@ -45,6 +44,9 @@ ClassOnModulesLoaded()
ClassClientSetDefaultIndexes();
}
/**
* Called a client disconnects.
*/
ClassOnClientDisconnect(client)
{
// Disable class attributes with timers.
@ -127,6 +129,12 @@ ClassOnClientSpawn(client)
ClassOverlayOnClientSpawn(client);
}
/**
* Client died. Stops timers and reset certain attributes. Call this event to
* clean up class related stuff.
*
* @param client The client index.
*/
ClassOnClientDeath(client)
{
// Disable class attributes with timers.
@ -139,6 +147,11 @@ ClassOnClientDeath(client)
ClassOverlayOnClientDeath(client);
}
/**
* Client got infected. Reloads class attributes.
*
* @param client The client index.
*/
ClassOnClientInfected(client, bool:motherzombie = false)
{
new classindex = ClassGetActiveIndex(client);