- LibraryExists() now works on extensions
- geoip and cstrike now work as libraries --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401579
This commit is contained in:
@@ -71,7 +71,7 @@ native CS_SwitchTeam(client, team);
|
||||
*/
|
||||
public Extension:__ext_cstrike =
|
||||
{
|
||||
name = "CStrike",
|
||||
name = "cstrike",
|
||||
file = "games/game.cstrike.ext",
|
||||
autoload = 0,
|
||||
#if defined REQUIRE_EXTENSIONS
|
||||
@@ -80,3 +80,11 @@ public Extension:__ext_cstrike =
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_EXTENSIONS
|
||||
public __ext_cstrike_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("CS_RespawnPlayer");
|
||||
MarkNativeAsOptional("CS_SwitchTeam");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -91,3 +91,12 @@ public Extension:__ext_geoip =
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_EXTENSIONS
|
||||
public __ext_geoip_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("GeoipCode2");
|
||||
MarkNativeAsOptional("GeoipCode3");
|
||||
MarkNativeAsOptional("GeoipCountry");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -446,9 +446,12 @@ native MarkNativeAsOptional(const String:name[]);
|
||||
native RegPluginLibrary(const String:name[]);
|
||||
|
||||
/**
|
||||
* Returns whether a library exists.
|
||||
* Returns whether a library exists. This function should be considered
|
||||
* expensive; it should only be called on plugin to determine availability
|
||||
* of resources. Use OnLibraryAdded()/OnLibraryRemoved() to detect changes
|
||||
* in optional resources.
|
||||
*
|
||||
* @param name Library name.
|
||||
* @param name Library name of a plugin or extension.
|
||||
* @return True if exists, false otherwise.
|
||||
*/
|
||||
native bool:LibraryExists(const String:name[]);
|
||||
|
||||
Reference in New Issue
Block a user