plis no hate
This commit is contained in:
parent
efc4342b7a
commit
ee4d50882f
@ -8,7 +8,7 @@ builder.SetBuildFolder('package')
|
|||||||
# Add any folders you need to this list
|
# Add any folders you need to this list
|
||||||
folder_list = [
|
folder_list = [
|
||||||
'addons/sourcemod/extensions',
|
'addons/sourcemod/extensions',
|
||||||
#'addons/sourcemod/scripting/include',
|
'addons/sourcemod/scripting/include',
|
||||||
#'addons/sourcemod/gamedata',
|
#'addons/sourcemod/gamedata',
|
||||||
#'addons/sourcemod/configs',
|
#'addons/sourcemod/configs',
|
||||||
]
|
]
|
||||||
@ -29,9 +29,9 @@ def CopyFiles(src, dest, files):
|
|||||||
builder.AddCopy(source_path, dest_entry)
|
builder.AddCopy(source_path, dest_entry)
|
||||||
|
|
||||||
# Include files
|
# Include files
|
||||||
#CopyFiles('include', 'addons/sourcemod/scripting/include',
|
CopyFiles('include', 'addons/sourcemod/scripting/include',
|
||||||
# [ 'sample.inc', ]
|
[ 'A2SFixes.inc', ]
|
||||||
#)
|
)
|
||||||
|
|
||||||
# GameData files
|
# GameData files
|
||||||
#CopyFiles('gamedata', 'addons/sourcemod/gamedata',
|
#CopyFiles('gamedata', 'addons/sourcemod/gamedata',
|
||||||
|
@ -62,6 +62,8 @@ char *OldBuf;
|
|||||||
char g_PlayerReply[1024];
|
char g_PlayerReply[1024];
|
||||||
bf_write g_PlayerReplyPacket(g_PlayerReply, 1024);
|
bf_write g_PlayerReplyPacket(g_PlayerReply, 1024);
|
||||||
|
|
||||||
|
int g_FakePlayers = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*/
|
*/
|
||||||
@ -121,6 +123,9 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (iPlayers + g_FakePlayers < 64)
|
||||||
|
iPlayers += g_FakePlayers;
|
||||||
|
|
||||||
// Correct playercount
|
// Correct playercount
|
||||||
memset(NewBuf, iPlayers, 1);
|
memset(NewBuf, iPlayers, 1);
|
||||||
|
|
||||||
@ -174,6 +179,29 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
|
|||||||
return DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen);
|
return DETOUR_STATIC_CALL(Detour_SendTo)(s, buf, len, flags, to, tolen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief
|
||||||
|
*/
|
||||||
|
cell_t FakePlayers(IPluginContext *pContext, const cell_t *params)
|
||||||
|
{
|
||||||
|
g_FakePlayers = params[1];
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief
|
||||||
|
*/
|
||||||
|
const sp_nativeinfo_t MyNatives[] =
|
||||||
|
{
|
||||||
|
{"FakePlayers", FakePlayers},
|
||||||
|
{NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
void A2SFixes::SDK_OnAllLoaded()
|
||||||
|
{
|
||||||
|
sharesys->AddNatives(myself, MyNatives);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is called after the initial loading sequence has been processed.
|
* @brief This is called after the initial loading sequence has been processed.
|
||||||
*
|
*
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
* @brief This is called once all known extensions have been loaded.
|
* @brief This is called once all known extensions have been loaded.
|
||||||
* Note: It is is a good idea to add natives here, if any are provided.
|
* Note: It is is a good idea to add natives here, if any are provided.
|
||||||
*/
|
*/
|
||||||
//virtual void SDK_OnAllLoaded();
|
virtual void SDK_OnAllLoaded();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Called when the pause state is changed.
|
* @brief Called when the pause state is changed.
|
||||||
|
30
include/A2SFixes.inc
Normal file
30
include/A2SFixes.inc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#if defined _A2SFixes_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _A2SFixes_included
|
||||||
|
|
||||||
|
native bool FakePlayers(int amount);
|
||||||
|
|
||||||
|
|
||||||
|
public Extension __ext_RevEmuAPI =
|
||||||
|
{
|
||||||
|
name = "A2SFixes",
|
||||||
|
file = "A2SFixes.ext",
|
||||||
|
#if defined AUTOLOAD_EXTENSIONS
|
||||||
|
autoload = 1,
|
||||||
|
#else
|
||||||
|
autoload = 0,
|
||||||
|
#endif
|
||||||
|
#if defined REQUIRE_EXTENSIONS
|
||||||
|
required = 1,
|
||||||
|
#else
|
||||||
|
required = 0,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !defined REQUIRE_EXTENSIONS
|
||||||
|
public __ext_A2SFixes_SetNTVOptional()
|
||||||
|
{
|
||||||
|
MarkNativeAsOptional("FakePlayers");
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user