How To Use: Open your client console then type "wcs_adminxp" in the client console then press enter to open the menu. After that press which ever button you want (xp/lvl give) and then in the new window enter what ever value you want into the input box then press ok.
NOTE: requires EventScripts v2.0beta247 and WCS v0.77!!!
Command: wcs_adminxp
//run in client console.
wcs/WCSaddons/adminxp/es_adminxp.txt
Code
GeSHi (eventscripts):block load
{
es_xset wcs_tinput 0
es_xset wcs_input 0
es_xset wcs_uid 0
es_xset wcs_steamid 0
es_xset wcs_tmp 0
es_xexists ex clientcommand wcs_adminxp
if (server_var(ex) = 0) then es_xregclientcmd wcs_adminxp wcs/WCSaddons/adminxp/wcs_adminxp_menu "esc menu for giving xp/lvl to yourself"
es_xexists ex saycommand wcs_adminxp
if (server_var(ex) = 0) then es_xregsaycmd wcs_adminxp wcs/WCSaddons/adminxp/wcs_adminxp_menu "esc menu for giving xp/lvl to yourself"
es_xexists ex clientcommand wcs_adminxp_input
if (server_var(ex) = 0) then es_xregclientcmd wcs_adminxp_input wcs/WCSaddons/adminxp/inputbox "esc input for giving xp/lvl to yourself"
}
block wcs_adminxp_menu
{
es_xset wcs_uid 0
es_xset wcs_steamid 0
es_xgetcmduserid wcs_uid
es_exists ex userid server_var(wcs_uid)
if (server_var(ex) = 1) then es_getplayersteamid wcs_steamid server_var(wcs_uid)
es_exists ex key WCSadmin server_var(wcs_steamid)
if (server_var(ex) = 1) then es_escmenu 10 server_var(wcs_uid) "WCS: adminxp menu" "click a button to open the xp or lvl giving menu" "-> Give Xp" "-> Give Level(s)"
}
event es_client_command
{
if (event_var(command) == menuselect) do
{
es_xset wcs_steamid 0
es_exists ex userid event_var(userid)
if (server_var(ex) = 1) then es_getplayersteamid wcs_steamid event_var(userid)
es_exists ex key WCSadmin server_var(wcs_steamid)
if (server_var(ex) = 1) do
{
if (event_var(commandstring) == 1) then es_escinputbox 10 event_var(userid) "Give_Xp" "Entrer the amount of xp to give yourself:" "wcs_adminxp_input adminxp_xp"
if (event_var(commandstring) == 2) then es_escinputbox 10 event_var(userid) "Give_Lvl" "Entrer the amount of lvl(s) to give yourself:" "wcs_adminxp_input adminxp_lvl"
}
}
}
block inputbox
{
es_xgetcmduserid wcs_uid
es_xgetargv wcs_tinput 1
es_xgetargv wcs_input 2
if (server_var(wcs_tinput) = "adminxp_xp") then wcs_givexp server_var(wcs_uid) server_var(wcs_input) "" 1
if (server_var(wcs_tinput) = "adminxp_lvl") then wcs_givelevel server_var(wcs_uid) server_var(wcs_input) "" 1
}
wcs/WCSaddons/es_WCSaddons_db.txt
Code
GeSHi (eventscripts):"adminxp"
{
"author" "Phat_Wizard"
"description" "esc menu to give self a lot of xp/lvl very easy and fast!!!"
"version" "v0.1a"
"enabled" "1"
}
You must create the appropriate folder and file for the main code and then add in the add-ons data base stuff so that it will load then you should be done.
Now for some screen shots:

Shot at 2008-01-13

Shot at 2008-01-13
Please if you have any comments or bugs or anything to report please post here. Also if you are just using this add-on I would like to know just to see if people actually use it.
UPDATES:
<Jan 30, 2008> : Fixed bug that made it possible for everyone to open the menu. {still a minor bug if user is a wcs admin}
<Jan 19, 2008> : Added *.zip of v0.1
<Jan 19, 2008> : Added *.rar of v0.1
<Jan 19, 2008> : Added say command "wcs_adminxp"
[attachment deleted by admin - older than 200 days!]






Canada
Logged
United States


Denmark
