Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CP-SCP Wrapper #43

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions addons/sourcemod/scripting/store.sp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
#include <tf2_stocks>
#include <tf2items>
#include <gifts>
#include <scp>
#include <thirdperson>
#include <saxtonhale>

#tryinclude <scp>
#if !defined _scp_included
#include <cp-scp-wrapper>
#endif

#endif

//////////////////////////////
Expand Down Expand Up @@ -3158,4 +3163,4 @@ public Store_OnPaymentReceived(FriendID, quanity, Handle:data)
break;
}
}
}
}
12 changes: 8 additions & 4 deletions addons/sourcemod/scripting/store/scpsupport.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

#include <store>
#include <zephstocks>
#include <scp>

#tryinclude <scp>
#if !defined _scp_included
#include <cp-scp-wrapper>
#endif
#endif

new String:g_szNameTags[STORE_MAX_ITEMS][MAXLENGTH_NAME];
Expand All @@ -21,9 +25,9 @@ public OnPluginStart()
public SCPSupport_OnPluginStart()
#endif
{
if(FindPluginByFile("simple-chatprocessor.smx")==INVALID_HANDLE)
if(LibraryExists("scp") || LibraryExits("cp-scp-wrapper))
{
LogError("Simple Chat Processor isn't installed or failed to load. SCP support will be disabled. (http://forums.alliedmods.net/showthread.php?t=198501)");
LogError("Simple Chat Processor/CP Wrapper isn't installed or failed to load. SCP support will be disabled. (http://forums.alliedmods.net/showthread.php?t=198501)");
return;
}

Expand Down Expand Up @@ -115,4 +119,4 @@ public Action:OnChatMessage(&client, Handle:recipients, String:name[], String:me
}

return Plugin_Changed;
}
}