owner_2019 Opublikowano Kwiecień 30, 2016 o 20:47 Udostępnij Opublikowano Kwiecień 30, 2016 o 20:47 [TF2] Respawn System API Version: 0.1 Introduction: Oh no, an other respawn time plugin, wait it's not a new respawn time plugin. :) It's an API, that allows you to control the respawn time! And you don't have to print an ugly message like in other respawn plugins! You can override the client's hud directly! And I made a ton of natives to make your life easier.Description: Allows plugin developpers to control the game's respawn time. You can: Set the respawn time of a team. Set the respawn time of a client. Get the respawn time of a team. Get the respawn time of a client. Detect when the game changes the respawn time of a team. Detect when the game sets the respawn time on the client. Detect when the game updates the respawn time of a client. The inc (with forwards and natives): Spoiler Code: //=======[NATIVES]======= /** * Gets the respawn time of a team. * * @param iTeam Team number. * @return Return team's respawn time. */ native float TF2_GetTeamRespawnTime(int iTeam); /** * If the client is respawning then this returns the respawn time of the client. * * @param iClient Client index. * @return Return client's respawn time. */ native float TF2_GetClientRespawnTime(int iClient); /** * Sets the respawn time of the client. * !!WARNING!! Setting a new respawn time with this function, won't update the current respawn time of the client! If you want to update the respawn time use (TF2_UpdateClientRespawnTime) instead! * * @param iClient Client index. * @param flRespawnTime Respawn time. * @return Return true if the client's respawn time has been set. */ native bool TF2_SetClientRespawnTime(int iClient, float flRespawnTime); /** * If the client is respawning then this update their current respawn time. * * @param iClient Client index. * @param flUpdatedRespawnTime Updated respawn time (can be negative). * @return Return true if the client's respawn time has been updated. */ native bool TF2_UpdateClientRespawnTime(int iClient, float flRespawnTime); /** * Sets the respawn time of a team. * !!WARNING!! Setting a new respawn time with this function, won't update the current respawn time of respawning clients of a team! If you want to update the respawn time use (TF2_UpdateTeamRespawnTime) instead! * * @param iTeam Team number. * @param flNewRespawnTime New respawn time. * @return Return true if the team's respawn time has been set. */ native bool TF2_SetTeamRespawnTime(int iTeam,float flNewRespawnTime); /** * Updates the respawn time of all clients in a team (similar to TF2_UpdateClientRespawnTime). * * @param iTeam Team number. * @param flUpdatedRespawnTime Updated respawn time (can be negative). * @return Return true if the client's respawn time has been updated. */ native bool TF2_UpdateTeamRespawnTime(int iTeam, float flUpdatedRespawnTime); //=======[FORWARDS]======= /** * Called when the game sets the client's respawn time. * Return Plugin_Changed to override the respawn time. * Return Plugin_Continue to keep the same. * * @param iClient Client Index. * @param flRespawnTime The respawn time set. */ forward Action TF2_OnClientRespawnTimeSet(int iClient,float &flRespawnTime); /** * Called when the game updates the current respawn time for a team. * Return Plugin_Changed to override the new respawn time. * Return Plugin_Continue to keep the same. * * @param iTeam Team number. * @param flNewRespawnTime The new respawn time. */ forward Action TF2_OnTeamRespawnTimeChanged(int iTeam,float &flNewRespawnTime); /** * Called when the game updates the current respawn time of a team, and changes the respawn time of all respawning clients. * Return Plugin_Changed to override the new respawn time. * Return Plugin_Continue to keep the same. * * @param iClient Client Index. * @param flUpdatedRespawnTime The respawn time set. */ forward Action TF2_OnClientRespawnTimeUpdated(int iClient,float &flUpdatedRespawnTime); Installation: Download tf2_respawn_system_core.smx and put it into your plugins folder. Download tf2_respawn.inc and put into your include folder. (Optional) Download tf2_respawn_system_core.sp and put into your scripting folder. Bugs: None. List of plugins working with this API: None (A plugin, and a example plugin are comming). Git-Hub Link Attached Files Get Plugin or Get Source (tf2_respawn_system_core.sp - 11.3 KB) tf2_respawn_system_core.smx (8.4 KB) tf2_respawn.inc (3.5 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się