[26/7/07] Source Utils v1.6
SouceUtils:
This is my 1º plugin (c++), is small for now but i have some plans for the future. SourceUtils work in all Source games win32/linux. This is ONLY Utils. http://sn4k3.portaldigitalonline.com...ourceutils.jpg ############################################# ############################### ########################Source Utils Commands############################### ############################################# ############################### su_Mysql su_MySQL <ServerIP> <Port | 3306 = Default Port> <UserName> <Password | "" = No Password> <"DataBase | "" = No db Command"> <"Cmd"> [Var] eg. su_mysql localhost 3306 root mypass "" "SELECT CURTIME()" time NOTE: 'Var' is only for store a stat from one db using "SELECT" String su_MySQLCreate su_MySQLCreate <Connection Name> <Access Password> <ServerIP> <Port | 3306 = Default Port> <UserName> <Password | "" = No Password> eg. su_mysqlcreate myconn myconnpass localhost 3306 root "" NOTE: <Access Password> Is used for Edit|Delete|Use|Debug Yours Fast Connections su_MySQLDelete su_MySQLDelete <Connection Name> <Access Password> eg. su_mysqldelete myconn myconnpass = Will Delete Your Connection eg. su_mysqldelete myconn myfalseconnpass = "SU: Incorrect Access Password 'myfalseconnpass' For Connection 'myconn'!." eg. su_mysqldelete myfalseconn myfalseconnpass = "SU: Connection 'myfalseconn' No Exists!. Use 'su_MySQLCreate" su_MySQLEdit su_MySQLEdit <Connection Name> <Actual Access Password> <New Access Password> <ServerIP> <Port | 3306 = Default Port> <UserName> <Password | "" = No Password> Use 'NULL' To Stay The Old Param eg. su_mysqledit myconn myconnpass mynewconnpass NULL NULL NULL NULL eg. su_mysqledit myconn myconnpass NULL NULL NULL newuser userpass su_MySQLInfo su_MySQLInfo <Connection Name> <Access Password> [Var] eg. su_mysqlinfo myconn myconnpass eg. su_mysqlinfo myconn myconnpass su_temp_get Code:
************************************************* su_MySQLFast su_MySQLFast <Connection Name> <Access Password> <"DataBase | "" = No db Command"> <"Cmd"> [Var] eg. su_mysqlfast myconn myconnpass "" "DROP DATABASE IF EXISTS `su_test`;CREATE DATABASE `su_test`" su_AddDownload su_AddDownload <path/filename.***> eg. su_AddDownload sound/sn4k3/mymp3.mp3 su_GetExists su_GetExists <Action> <Name> <Var> <Action = (file | directory | userid | cvar | pause | mysqlfastconn | externalsrc | cmdtarget | mute | profile | mapent)> eg. su_GetExists file cfg/server.cfg su_temp_get = will return 1 eg. su_GetExists directory addons su_temp_get = probaly return 1 eg. su_GetExists userid 10 su_temp_get eg. su_GetExists cvar mycvar su_temp_get = return 0 if cvar not exists eg. su_GetExists pause something su_temp_get = return 0 if not paused eg. su_GetExists mysqlfastconn my_conn_name su_temp_get = return 0 if mysqlfastconn not exists/created eg. su_GetExists externalsrc my_externalsrc_alias_name su_temp_get = return 0 if the externalsrc not exists/created eg. su_GetExists cmdtarget -tickrate su_temp_get = return 0 if not exists that parm in cmdtarget eg. su_GetExists mute userid su_temp_get = return 0 if not muted eg. su_GetExists profile profile_name su_temp_get = return 0 if profile name not exists/created eg. su_GetExists mapent buy_zone su_temp_get = return 0 if not exits that entity in map su_Precache su_Precache <sound | model> <path/filename> [Var] eg. su_Precache model models/zombies/newzombie.mdl eg. su_Precache model materials/zombies/newzombie.vtf (not need) eg. su_Precache sound mp3/mymp3.mp3/wav su_temp_get NOTE: [Var] = Return With Precached index su_GetVersion su_GetVersion <Host> <Port (80)> <Var> eg. su_GetVersion mattie.info 80 su_temp_get = Will Return A Version Of ES eg. es_msg Eventscripts Version: server_var(su_temp_get) eg. return in chat == Eventscripts Version: 1.3.0.006 Good for know if plugin/script is outdate. NOTE: You Need Put One File In Host With Name 'version.txt' After Put Version In 1º Line eg. 1.0.5.0 After Save File And Send To FTP su_Rand su_Rand <Minimum> <Maximum> <Var> eg. su_Rand 1 100 su_temp_get = rand a number between 1 and 100 su_CVarForceSet su_CVarForceSet <Var> <Value> <Silence Set> <Silence Set> = Dont Advert Var Change In Chat eg. su_CVarForceSet sv_cheats 1 0 = will change sv_cheats to 1 and advert change in chat eg. su_CVarForceSet sv_cheats 1 1 = will change sv_cheats to 1 and no change advert in chat NOTE: Change only advert in chat if cvar is REPLICATED EndRound: su_EndRound eg. su_EndRound = Will force end a round su_GetTime su_GetTime <Time Format> <Cvar> <Time Format>: '%d' = day '%m' = month '%Y' = Year '%H' = Hour '%M' = Minute '%S' = Secounds '%Z' = GMT() eg. su_GetTime "%d/%m/%Y || %H-%M-S" su_temp_get = will return with "Day/Month/Year || Hours/Minutes/Secounds" su_replace su_replace <Var> <"Text"> <"New Text"> eg. su_temp_get "this is a test with replace" eg. su_replace "a test" "a new test" = will return with 'this is a new test with replace' su_ChangeLevel su_ChangeLevel <LevelName> eg. su_ChangeLevel de_dust2 su_profile su_profile <Action (create | remove | reset | get)> <Alias> [Var] eg. su_profile create my_profile_name = create a profile alias (auto start counting) eg. su_profile reset my_profile_name su_temp_get = will reset time but first get alias profile time eg. su_profile get my_profile_name su_temp_get = will get alias profile time and continue counting eg. su_profile remove my_profile_name = will remove alias profile su_Load su_Load <Action (externalsrc)> <Alias> <Folder> (externalsrc) Folder = '|root' To run ROOT Apps eg. su_load externalsrc wget_cmd wget su_systempw NOTE: Default <Folder> = addons/sourceutils/externalsrc '(su_externalsrc_folder) cvar' NOTE: You need have the System PW for Load ExternalSRC (addons/sourceutils/sourceutils_security.cfg) su_Load_Print su_Load_Print eg. su_load_print Code:
Source Utils Loaded Scripts: su_UnLoad su_UnLoad <Action (externalsrc)> <Alias> eg. su_unload externalsrc wget_cmd su_ExternalSrc su_ExternalSrc <Action (addlink | editlink | use | info)> <Alias> [Command] eg. su_ExternalSrc addlink wget_cmd wget.exe = will add wget.exe to alias name for use eg. su_ExternalSrc editlink wget_cmd wget.exe = will add/edit wget.exe to alias name for use eg. su_ExternalSrc use wget_cmd "www.mattie.info/cs" = Will download the http target link NOTE: Full info about this in: 'addons/sourceutils/externalsrc/Readme.txt' Dangerous su_Compile su_Compile <Path/To/Configure/Sh> eg. su_Compile addons/sourceutils/externalsrc/qstat This will compile ONLY Linux Srcs (MakeFile) And (configure) In compile finish will create a file saying finish trying the compile (not say compile un/success) su_Log su_Log <Text> eg. su_log "A log text exemple from source utils" NOTE: Only Print The text if Log mod Is ON (log on) su_Sound su_Sound <Action (getduration | stopall)> [Sound] [Var] eg. su_Sound getduration radio/go.wav su_temp_get = will get .wav file sound duration eg. su_Sound stopall = will Stop all Played sounds NOTE: <getduration> Only suport '.wav' Files !! su_SConsole su_SConsole get <Action (index | max | target | value | name)> <Parm Name> <Var> su_SConsole set <Action (create | remove)> <Parm Name> <Value> <Access-Password> [Var] eg. su_SConsole get index -tickrate su_temp_get = will return with parm index eg. su_SConsole get max 0 su_temp_get = will return with Max parm Count eg. su_SConsole get target 0 su_temp_get = will return with All parms in cmdtarget eg. su_SConsole get value +map su_temp_get = will return with parm value eg. de_dust2 eg. su_SConsole get name <index eg. '5'> su_temp_get = will Get parm index name Allowed Parms: (# ! $ | » >) 'su_avaliable_parms' cvar eg. su_SConsole set create >my_parm hello mypassword su_temp_get = if have a cvar will return with the new parm index eg. su_SConsole set remove >my_parm 0 mypassword su_SQlite su_SQlite <db> <Cmd> eg. su_SQlite my_db "MY CMD" su_GeoIP su_GeoIP <Type (ip | http)> <By> <Ip/Http> <Var> <By (0 = Country Code2 | 1 = Country Code3 | 2 = Country Name)> eg. su_GeoIP ip 0 "208.167.248.24:27015" su_temp_get "su_temp_get" = "US" eg. su_GeoIP ip 1 "208.167.248.24:27015" su_temp_get "su_temp_get" = "USA" eg. su_GeoIP ip 3 "208.167.248.24:27015" su_temp_get "su_temp_get" = "United States" eg. su_GeoIP http 0 "www.mattie.info" su_temp_get "su_temp_get" = "US" eg. su_GeoIP http 3 "www.sourcemod.net" su_temp_get "su_temp_get" = "United States" NOTE: <Type (ip) ONLY || Ports ":" Are Auto Removed NOTE: <type = http> use theard!! take a time to get result! su_getnetinfo su_getnetinfo <Action> <userid> <var> <Action (ip | ping | choke | loss | packet | contime | timeout)> eg. su_getnetinfo ip 10 su_temp_get eg. su_getnetinfo ping 10 su_temp_get eg. su_getnetinfo choke 10 su_temp_get eg. su_getnetinfo loss 10 su_temp_get eg. su_getnetinfo packet 10 su_temp_get eg. su_getnetinfo contime 10 su_temp_get eg. su_getnetinfo timeout 10 su_temp_get NOTE: <Action (timeout)> return 0 or 1 (0/1) su_mapfind su_mapfind <name (* = all)> eg. su_mapfind zm_ eg. su_mapfind de_ eg. su_mapfind * NOTE: This only print founded results! su_echo su_Echo <Text To Print> eg. su_echo Echo function writed in SourceUtils v1.6 NOTE: Not a Warpper From "echo" Command! su_for su_For <beginvalue> <endvalue> <command> eg. su_for 0 100 "su_echo sending 100 commands to console" su_File su_file get <filename> <action (line | size)> [linenumber] <var> su_file endwrite <filename> <text> su_file event <filename> <remove comments (0 = no | 1 = yes)> [var] su_file list <filetocreate.*> <search-path> [only file names (0 = fullpath to file)] [include others game folders (1 = yes)] [prefix-command] [remove .extension (1 = yes)] su_file remove <file> [Full-Access-Password] eg. su_file get mapcycle.txt line 10 su_temp_get = will get file line text! eg. su_file get mapcycle.txt size 10 su_temp_get = will get file line text Size! eg. su_file get mapcycle.txt size 0 su_temp_get = will get file size! eg. su_File endwrite mapcycle.txt de_newmap = will add that map to mapclycle eg. su_file event mapcycle.txt 1 su_temp_get = will debug all file lines, sizes, status eg. su_file list mapcycle.txt maps/*.bsp 1 0 0 1 = will write to file all founded files with .bsp eg. su_file list cfg/downloads.cfg sound/myscript/*.mp3 0 0 su_adddownload 0 = output (su_adddownload sound/myscript/sound.mp3) eg. exec downloads = will add downloads in last created file! eg. su_file remove myfile.txt su_filepw eg. su_file remove su_myfile.txt NOTE: [Full-Access-Password] Allow you remove any file!!! without this you only can remove files with su_ in name eg. su_myfile.cfg su_FileCreate su_FileCreate <Filename> eg. su_FileCreate mynewfile.txt = will create a file named mynewfile.txt in cstrike folder! eg. su_FileCreate cfg/mynewfile.txt = will create a file named mynewfile.txt in cstrike/cfg folder! NOTE: You cant Replace a file!!! su_dumpclassprops su_dumpclassprops <print to (0 = Console | 1 = File)> (File) OutPut: 'addons/sourceutils/dumps/su_dumpclassprops_mapname.txt' eg. su_dumpclassprops 0 = will print all to console eg. su_dumpclassprops 1 = will print all to file su_dumpclassprops su_dumpmapentitys <print to (0 = Console | 1 = File)> (File) OutPut: 'addons/sourceutils/dumps/su_dumpmapentitys_mapname.txt' eg. su_dumpmapentitys 0 = will print all to console eg. su_dumpmapentitys 1 = will print all to file su_dumpsclean su_dumpsclean eg. su_dumpsclean = will clean dumps folder ############################################# ############################### ##########################Source Utils Events############################### ############################################# ############################### Event File: addons/sourceutils/sourceutils.res Auto Loaded To EventScripts Code:
"sourceutilsevents" ############################################# ############################### ##########################Source Utils CVars################################ ############################################# ############################### su_temp_get = a temp cvar to get the returns. su_version = show current source utils version. su_os = show operative system type server is using (Windows | Linux) su_maxplayers = show maxplayers server have su_currentmap = show the current map su_gamemod = show current game mod su_lastcompile = show last compile date su_tickrate = show server tickrate su_externalsrc_folder = show externalsrc folder source utils is using su_avaliable_parms = show avaliable parms to use in text begin (su_sconsole set create) su_servergamedll = show gameserverdll source utils is using su_tools_folder = Show Source Utils Tools Path su_dedicatedserver = Is Dedicated Server? (0 = No/ 1 = Yes) su_nextmap = Nextmap su_backmap = BackMap su_freelib_version = Source Utils FreeLib Version su_freelib_license = Source Utils FreeLib License (GPL) ############################################# ############################### ###########################Source Utils Docs################################ ############################################# ############################### MySQL Client Syntax Sqlite3 Client Syntax ToDo: In Target: - Parser [.ini/.xml/.cfg] - FTP - http functions They can post edias :) Special Thanks: - chumly (Encorage-me to makeit [Objective MySQL]) - www.sourcemm.net (MetaMod Source Engine, Plugin Track) - www.sourcemod.com (Thanks To all help From comunity, examples, Linux Problems Compile, Addons Stats Track and for the Plugin Annouce) - www.sourceplugins.com (Thanks To all help From comunity and for the Plugin Annouce) - www.hl2coding.com (Thanks for posted examples [Where i started learn c++ :)]) - C0ld (thanks For crosstoll, Linux Compile tutorial |cygwin| And For MakeFile Template) - Mattie (For www.sourceplugins.com Web Site And EventScripts For the Source Utils Usage) Credits: - sn4k3 (Developer) - chumly MySQL "SELECT()" Rows Help, tester Quote:
Links: Download SourceUtils MetaMod: Source Version (V1.6) MetaMod:Source Home Download SourceUtils Standart Alone Version (V1.6) Standart Alone Version Home Download SourceUtils FreeLib Source Code (V1.1) NOTE: if you need install soruceutils in other game than counter-strike source you need modificate (addons/sourceutils.vdf) !!! eg. change 'cstrike' for 'dod' OR you can get you .vdf easy here: VDF Creator In Plugin choose: SourceUtils After choose you game server! |
Re: Source Utils v1.1
I don't normally do this, but please don't use giant font sizes for no reason.
|
Re: Source Utils v1.1
Quote:
sorry, i use same code to post in sourceplugins and i dont look ate this :| |
Re: Source Utils v1.2
New Version!!!
v1.2 [5/4/07] - add MySQL compatible binnary querys! - add MySQL Multi-Theard ( Now dont stop the server ) - add MySQL Suport "LOAD DATA INFILE" - add MySQL Suport Multi Statments Separated by A ";" - add MySQL Suport Multi Results - add MySQL Fast Connections - add MySQL Fast Create|Delete|Edit|Info Connections - fixed Not need SQL.dll for work! |
Re: Source Utils v1.2
Trying to use this in conjunction with eventscripts to insert bans into a db when they are made but Ive tried handwriting the commands in rcon even with and without fast mode and none of them seem to be working, is there a way to check if a connection has successfully been established to the database
|
Re: Source Utils v1.2
Quote:
|
Re: Source Utils v1.3
new version!
v1.3 [6/5/07] - added su_getexists mysqlfastconn - added su_getexists externalsrc - added su_getexists cmdtarget - added su_getexists mute - added su_getexists profile - added su_externalsrc (like system command) - added su_profile (get a precision profile) - added su_compile (allow compile (ONLY) linux makefiles) - added su_log (can print mensages to current log file) - added su_precache now suport get file index - added su_load (allow load source utils extras) - added su_unload (allow unload loaded scripts) - added su_load_print (allow print loaded scripts) - added su_sconsole get/set (allow get/set parms in server console cmd target) - added su_sound (sound utils like get duration) - added su_sqlite (allow make sqlite3 querys) (UNTESTED) - added a Plugin load mensage (successfull load) - added Source Utils Events! (addons/source_utils/source_utils.res) - added event su_mysql - added auto load for EventScripts Source Utils Events - added 'su_tickrate' cvar to see server tickrate - added 'su_externalsrc_folder' cvar to see ExternalSrc folder source utils is using - added 'su_avaliable_parms' cvar know what parms can use in begin 'su_sconsole set create' (# ! $ | » >) - added 'su_servergamedll' cvar to see what GameServerDll Source Utils is using - added cvars callback (disallow source utils cvars change) - added update metamod source library to v1.4 - fixed su_getexists userid can crash server if no player in server - fixed MySQL Fast Connections dont use selected db |
Re: Source Utils v1.3
|
Re: Source Utils v1.3
Quote:
im not using yassl or taocrypt. only mysql library if i remove my GPL lincense resolve? |
Re: Source Utils v1.3
What is your native language? I can see about getting someone to explain it to you in that.
Basically, yes.. if you were to remove mysql this would no longer be an issue. Or, if you find an alternate to the normal mysql library that is not under the GPL.. it's no longer an issue. |
All times are GMT -4. The time now is 18:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.