Raised This Month: $51 Target: $400
 12% 

Updater


Post New Thread Reply   
 
Thread Tools Display Modes
Nefarius
Member
Join Date: Sep 2010
Old 04-21-2014 , 06:46   Re: Updater
Reply With Quote #431

Quote:
Originally Posted by GAVVVR View Post
Hello. I would like to use an updater in my plugin, but i would also like the plugin could be loaded if there is no Updater on current server. To add Updater support, i use the example code from the 1st post of thos topic. When i try to load my plugin w/o loaded updater i get the message:

I wonder if there is any way to start my compiled .smx with updater support if there is no updater on the server?
There is. Don't forget the
Code:
#undef REQUIRE_PLUGIN
#include <updater>
in your header and also add
Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
	// Updater
	MarkNativeAsOptional("Updater_AddPlugin");
	MarkNativeAsOptional("ReloadPlugin");
	
	return APLRes_Success;
}
to your plugin and it should do fine.
__________________
Let the future tell the truth and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I really worked, is mine.
- Nikola Tesla
Nefarius is offline
henri9813
Junior Member
Join Date: Dec 2013
Old 04-21-2014 , 06:50   Re: Updater
Reply With Quote #432

Yes, but i wanna the plugin in this directory...
henri9813 is offline
Nefarius
Member
Join Date: Sep 2010
Old 04-21-2014 , 06:51   Re: Updater
Reply With Quote #433

So why doesn't it already exist then? Shouldn't it be created at the initial installation of your plugin? Like in the shipped ZIP or smth.? AFAIK there is no routine in Updater to create "missing" directories.
__________________
Let the future tell the truth and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I really worked, is mine.
- Nikola Tesla
Nefarius is offline
henri9813
Junior Member
Join Date: Dec 2013
Old 04-21-2014 , 08:58   Re: Updater
Reply With Quote #434

I will try, thanks
henri9813 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-21-2014 , 10:34   Re: Updater
Reply With Quote #435

Quote:
Originally Posted by Nefarius View Post
and also add
Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
	// Updater
	MarkNativeAsOptional("Updater_AddPlugin");
	MarkNativeAsOptional("ReloadPlugin");
	
	return APLRes_Success;
}
to your plugin
Completely unnecessary. Updater.inc already marks all THREE natives as optional. (Updater_AddPlugin(), Updater_RemovePlugin(), and Updater_ForceUpdate())

Also, ReloadPlugin isn't a native. The code that it executes is included right there in the INC. It's worth noting that if ReloadPlugin() isn't ever used in the plugin, it will not be compiled into the plugin at all, as it is prefixed with "stock"
__________________

Last edited by ddhoward; 04-21-2014 at 12:33.
ddhoward is offline
Nefarius
Member
Join Date: Sep 2010
Old 04-21-2014 , 10:38   Re: Updater
Reply With Quote #436

I see, thanks for clearing this up!
__________________
Let the future tell the truth and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I really worked, is mine.
- Nikola Tesla

Last edited by Nefarius; 04-21-2014 at 10:39.
Nefarius is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-21-2014 , 12:20   Re: Updater
Reply With Quote #437

Quote:
Originally Posted by Nefarius View Post
You have a forward slash in your plugin name Module/Accueil.smx so Updater threats it like a directory and tries to put it into addons/sourcemod/plugins/Module which doesn't exist so it fails to create the local file. Swap the / with an _ for example and it should work.
SM will load plugins from subdirectories in addons/sourcemod/plugins (except for disabled). Notice where it says:

Quote:
Update available for "Module d'accueil" (Module/Accueil.smx). Current: 0.0.0 - Latest: 0.0.1
One can safely assume that the Module directory exists and that Accueil.smx is running from it.

henri9813: Check to make sure plugins/Module is writable.
__________________
Dr. McKay is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-21-2014 , 13:31   Re: Updater
Reply With Quote #438

Quote:
Originally Posted by Dr. McKay View Post
SM will load plugins from subdirectories in addons/sourcemod/plugins (except for disabled).
Except for disabled or optional you mean. I ran into that while checking the SourceMod source code last week. It's also in the 1.6 version, in case you're wondering.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-21-2014 at 14:14.
Powerlord is offline
Karower
Junior Member
Join Date: Aug 2012
Old 04-24-2014 , 07:59   Re: Updater
Reply With Quote #439

Hello,

does this not work properly with CS:GO on a linux server?

Output of sm_updater_status:
PHP Code:
[Updater] -- Status Begin --
Plugins being monitored for updates:
  [
0]  updater.smx
  
[1]  smac_rcon.smx
  
[2]  smac_aimbot.smx
  
[3]  smac_eyetest.smx
  
[4]  smac_cvars.smx
  
[5]  smac_commands.smx
  
[6]  smac_client.smx
  
[7]  smac_autotrigger.smx
  
[8]  smac.smx
  
[9]  smac_speedhack.smx
Last update check was 0.0 minutes ago

Output of sm_updater_check
PHP Code:
[UpdaterUpdates can only be checked once per hour60.0 minutes remaining
The given times never change. It is stuck at 0.0 / 60.0.

Metamod:
PHP Code:
Metamod:Source version 1.10.0
Build ID
860:a58a1912f602
Loaded 
As: Valve Server Plugin
Compiled on
Aug 25 2013
Plugin 
interface version15:14
SourceHook version
5:5
http
://www.metamodsource.net/ 
Sourcemod:
PHP Code:
 SourceMod Version Information:
    
SourceMod Version1.5.4-dev+4036
    SourcePawn Engine
SourcePawn 1.1jit-x86 (build 1.5.4-dev+4036)
    
SourcePawn APIv1 4v2 4
    Compiled on
Apr 23 2014 19:34:37
    Build ID
4036:c214d578353a
    http
://www.sourcemod.net/ 
Sourcemod Extensions:
PHP Code:
[SMDisplaying 16 extensions:
[
01Automatic Updater (1.5.4-dev+4036): Updates SourceMod gamedata files
[02Webternet (1.5.4-dev+4036): Extension for interacting with URLs
[03CS Tools (1.5.4-dev+4036): CS extended functionality
[04BinTools (1.5.4-dev+4036): Low-level C/C++ Calling API
[05SDK Tools (1.5.4-dev+4036): Source SDK Tools
[06] <FAILEDfile "smrcon.ext.so": ... cannot open shared object fileNo such file or directory
[07Top Menus (1.5.4-dev+4036): Creates sorted nested menus
[08Client Preferences (1.5.4-dev+4036): Saves client preference settings
[09SQLite (1.5.4-dev+4036): SQLite Driver
[10SDK Hooks (1.5.4-dev+4036): Source SDK Hooks
[11GeoIP (1.5.4-dev+4036): Geographical IP information
[12] <FAILEDfile "steamtools.ext.so": ... cannot open shared object fileNo such file or directory
[13cURL Extension (1.3.0.0): cURL Extension
[14Socket (3.0.1): Socket extension for SourceMod
[15] <FAILEDfile "connect.ext.so" ... cannot open shared object fileNo such file or directory
[16MySQL-DBI (1.5.4-dev+4036): MySQL driver implementation for DBI 
Sourcemod Plugins:
PHP Code:
[SMListing 34 plugins:
  
01 "SMAC Rcon Locker" (0.8.4.0by SMAC Development Team
  02 
"Basic Votes" (1.5.4-dev+4036by AlliedModders LLC
  03 
"Client Preferences" (1.5.4-dev+4036by AlliedModders LLC
  04 
"MapChooser" (1.5.4-dev+4036by AlliedModders LLC
  05 
"SMAC Aimbot Detector" (0.8.4.0by SMAC Development Team
  06 
"SMAC Eye Angle Test" (0.8.4.0by SMAC Development Team
  07 
"Team Bets" (2.6by GrimReaper Original by ferret
  08 
"Admin Menu" (1.5.4-dev+4036by AlliedModders LLC
  09 
"Rock The Vote" (1.5.4-dev+4036by AlliedModders LLC
  10 
"SuperLogs: CSS" (1.2.4by psychonic
  11 
"SMAC ConVar Checker" (0.8.4.1by SMAC Development Team
  12 
"SMAC Command Monitor" (0.8.4.0by SMAC Development Team
  13 
"Basic Comm Control" (1.5.4-dev+4036by AlliedModders LLC
  14 
"Advanced admin commands" (0.18by 3sigma TnTSCS
  15 
"Fun Votes" (1.5.4-dev+4036by AlliedModders LLC
  16 
"Updater" (1.2.0by GoD-Tony
  17 
"SMAC Client Protection" (0.8.4.0by SMAC Development Team
  18 
"Basic Commands" (1.5.4-dev+4036by AlliedModders LLC
  19 
"Basic Chat" (1.5.4-dev+4036by AlliedModders LLC
  20 
"Weapon Restrict" (3.1.3by Dr!fter
  21 
"Nextmap" (1.5.4-dev+4036by AlliedModders LLC
  22 
"SMAC AutoTrigger Detector" (0.8.4.0by SMAC Development Team
  23 
"Reserved Slots" (1.5.4-dev+4036by AlliedModders LLC
  24 
"Admin Help" (1.5.4-dev+4036by AlliedModders LLC
  25 
"Map Nominations" (1.5.4-dev+4036by AlliedModders LLC
  26 
"Player Commands" (1.5.4-dev+4036by AlliedModders LLC
  27 
"Admin File Reader" (1.5.4-dev+4036by AlliedModders LLC
  28 
"Fun Commands" (1.5.4-dev+4036by AlliedModders LLC
  29 
"SourceMod Anti-Cheat" (0.8.5.1by SMAC Development Team
  30 
"SourceBans" (1.4.10by SourceBans Development Team
  31 
"Anti-Flood" (1.5.4-dev+4036by AlliedModders LLC
  32 
"Sound Commands" (1.5.4-dev+4036by AlliedModders LLC
  33 
"SMAC Anti-Speedhack" (0.8.4.0by SMAC Development Team
  34 
"Basic Info Triggers" (1.5.4-dev+4036by AlliedModders LLC 
I installed the socket extension since curl didnt work. The updater works fine with curl on CS:S.

With kind regards,
Karower
Karower is offline
2NASTY4U
Senior Member
Join Date: Mar 2014
Old 05-04-2014 , 06:55   Re: Updater
Reply With Quote #440

Same problem like Karower. Any fix?
2NASTY4U is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode