Skip to content

Commit

Permalink
Update HLDS-Shield beta.sma
Browse files Browse the repository at this point in the history
  • Loading branch information
SkillartzHD committed Jan 24, 2019
1 parent 4bff8f2 commit 7b23d49
Showing 1 changed file with 53 additions and 47 deletions.
100 changes: 53 additions & 47 deletions HLDS-Shield beta.sma
Expand Up @@ -24,19 +24,22 @@ public plugin_init(){
}
public plugin_precache(){
is_server_compatibility()
RegisterCvars()
Hooks_init()
Load_Settings()
}
public Hooks_init(){
if(is_linux_server()){
RegisterOkapiLinux()
}
else{
RegisterOkapiWindows()
if(ServerVersion == 0){
if(is_linux_server()){
RegisterOkapiLinux()
}
else{
RegisterOkapiWindows()
}
set_task(1.0,"RegisterOrpheu")
}
set_task(1.0,"RegisterOrpheu")
register_forward(FM_ClientConnect,"pfnClientConnect")
register_forward(FM_ClientUserInfoChanged,"pfnClientUserInfoChanged")
Expand Down Expand Up @@ -156,46 +159,48 @@ public SV_ParseConsistencyResponse_fix(){
}
public RegisterOrpheu(){
if(!file_exists(orpheufile5)){
server_print("%s Injected successfully %s",PrefixProtection,orpheufile5)
Create_Signature("SV_ForceFullClientsUpdate")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(!file_exists(orpheufile4)){
server_print("%s Injected successfully %s",PrefixProtection,orpheufile4)
Create_Signature("SV_Drop_f")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(!file_exists(orpheufile2)){
log_to_file(settings,"%s Injected successfully %s",PrefixProtection,orpheufile2)
Create_Signature("MSG_ReadShort")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(!file_exists(orpheufile3)){
log_to_file(settings,"%s Injected successfully %s",PrefixProtection,orpheufile3)
Create_Signature("MSG_ReadLong")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(file_exists(orpheufile1)){
executestringhook = OrpheuRegisterHook(OrpheuGetFunction("Cmd_ExecuteString"),"Cmd_ExecuteString_Fix")
memory2++
}
else{
log_to_file(settings,"%s Injected successfully %s",PrefixProtection,orpheufile1)
Create_Signature("Cmd_ExecuteString")
set_task(1.0,"debug_orpheu")
if(ServerVersion == 0){
if(!file_exists(orpheufile5)){
server_print("%s Injected successfully %s",PrefixProtection,orpheufile5)
Create_Signature("SV_ForceFullClientsUpdate")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(!file_exists(orpheufile4)){
server_print("%s Injected successfully %s",PrefixProtection,orpheufile4)
Create_Signature("SV_Drop_f")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(!file_exists(orpheufile2)){
log_to_file(settings,"%s Injected successfully %s",PrefixProtection,orpheufile2)
Create_Signature("MSG_ReadShort")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(!file_exists(orpheufile3)){
log_to_file(settings,"%s Injected successfully %s",PrefixProtection,orpheufile3)
Create_Signature("MSG_ReadLong")
set_task(1.0,"debug_orpheu")
}
else{
memory2++
}
if(file_exists(orpheufile1)){
executestringhook = OrpheuRegisterHook(OrpheuGetFunction("Cmd_ExecuteString"),"Cmd_ExecuteString_Fix")
memory2++
}
else{
log_to_file(settings,"%s Injected successfully %s",PrefixProtection,orpheufile1)
Create_Signature("Cmd_ExecuteString")
set_task(1.0,"debug_orpheu")
}
}
if(is_linux_server()){
log_to_file(settings,"^n%s I loaded plugin with %d functions hooked in hlds [linux]^n",PrefixProtection,memory2)
Expand All @@ -204,6 +209,7 @@ public RegisterOrpheu(){
log_to_file(settings,"^n%s I loaded plugin with %d functions hooked in hlds [windows]^n",PrefixProtection,memory2)
}
new AMXXVersion[32],RCONName[32]
get_amxx_verstring(AMXXVersion,charsmax(AMXXVersion))
Expand Down

0 comments on commit 7b23d49

Please sign in to comment.