general Problem with Sourcemod
Hi,
ive a simple Problem on my first!! plugin.... The Goal is to get a plugin that gets the sv_tags cvar and compare it to a given Server config cvar-tag; for example: "sm_tct_0" = "hallo" and loads the specifig config for that sm_tct_0 cvar f. e. ServerConfig0.cfg. here is my first Version(you can ignore the new strings on start, theyre for later using) The first versin of the Plugin will be built up to 20 configs which you can load 20 configs @ 20 tags u give. sry for my english im german and not proud for my school grades in english. Code:
/* for Tests ive the "PrintToServer("halloa1");", "PrintToServer("halloa2");" and "PrintToServer("halloa3");" The first Problem is that the plugin is not working....^^ The second is thats the "PrintToServer(sTag);" "PrintToServer(sTag2);" are not working. but what im allready not get is how; if i make Code:
g_cvarTag0 = CreateConVar("sm_tct_0", "hallo", "get Alias for: Tag0Alias"); Code:
new String:sTag2[255]; Code:
GetConVarString(g_cvarTag0, sTag2[255], 255); Code:
PrintToServer(sTag2); and Code:
PrintToServer(sTag); soooo, why it prints allo and not hallo? Thats my first Problem. pls help me to learn Pawn:D maybe i can help someone else if he has Problems... my test Server is running Contagion with sourcemod. Greetings, Dany666 |
Re: general Problem with Sourcemod
Quote:
PHP Code:
|
Re: general Problem with Sourcemod
okay, now i changed it to
Code:
GetConVarString(g_cvarTag0, sTag2, sizeof(sTag2)); But there is still the Problem with Printing the vs_tags in the console: Code:
new Handle:cvTag = FindConVar("sv_tags"); //sv_tags -> cvTag |
Re: general Problem with Sourcemod
Any errors in the console?
|
Re: general Problem with Sourcemod
1 Attachment(s)
nope, just an empty line:
This Part is also working i think Code:
if (StrContains(sTag, sTag2, true)) |
Re: general Problem with Sourcemod
Don't use OnPluginStart to check cvars. You can't guarantee that they're set until OnConfigsExecuted is called (which is called after every map change).
|
Re: general Problem with Sourcemod
I Edited it again with "public OnConfigsExecuted()" but now nothing is working, no single print in the Console or any feedback :/ so what im doing wrong? :cry:
Heres my new Code: PHP Code:
|
Re: general Problem with Sourcemod
hey guys ive a update,
It seems like the "OnConfigsExecuted" is not working in Contagion...This would also explain why some plugins dont work with this game. Ive tried it now with a Timer: PHP Code:
But now the Problem is: The Server is Hibernating at Startup and so the timer will start running only if a Player is joining the Server. My question is: Is there a similar call to "OnConfigsExecuted" or any way to delay the Hibernating Status of the Server? |
All times are GMT -4. The time now is 16:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.