Raised This Month: $ Target: $400
 0% 

Help me please with some basic stuff


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 05-24-2005 , 02:53   Help me please with some basic stuff
Reply With Quote #1

iv been learning to cod in c# and c++ for about the last 14 weeks and have decided to try and write a amxx plugin.

my problem is i dont know what im really doing, even tho i read those tutorials.

im trying to make some dumb program to display cvars such as the rcon_password one but for some reason i cant figure out how to get it to work

heres what iv got so far.
Code:
#include <amxmodx> #include <amxmisc> new plugin[]="Rcon Commander" new author[]="Anthrax" new version[]="1.00" public plugin_init() {     register_plugin(plugin,author,version)     register_concmd("amx_rconpw","cmd_rcon_password",ADMIN_RCON," Returns the value of R-pw")     } public cmd_rcon_password(id,level,cid) {     new password[20]     if ( ! cmd_access( id, level, cid, 0 ) )     {         console_print(id, "Access Denied")         return PLUGIN_HANDLED     }     get_cvar_string("rcon_password",password,20)     console_print(id,"Rcon pw is: ", password )         return PLUGIN_HANDLED }

it's just basicly a rip of the one that comes with amxx but i dont want it to change any values, just display the value of whats been hardcoded
your help is much welcomed
Anthraxnz is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 05-24-2005 , 02:57  
Reply With Quote #2

Why would u want to display that...? Rcon password dammit.
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 05-24-2005 , 02:58  
Reply With Quote #3

doesnt have to be rcon password, could be mp_freezetime or something else.
i posted in the help forum about removing the ability to use amx_cvar rcon_password to retreive the pw so i guess it just stuck with my mind :S.

got to learn how basic functions working in side the language, so thats why im not too interested in changing cvars atm ;)
Anthraxnz is offline
Front Line
Senior Member
Join Date: Jan 2005
Old 05-24-2005 , 03:12  
Reply With Quote #4

yea go to the functions...this is where i had started...
Also asking ppl lik vex for help! could be a key.
But dunt ask him to do the whole thing atleast put effort into saying this is 51% or + yours...
__________________
My plugins...

Are all Here...Click Me
Front Line is offline
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 05-24-2005 , 03:43  
Reply With Quote #5

i was thinking along the lines of reading the value of rcon_password and copying the value into another variable "password" and then printing "password" into the console. just dont know how to do it some tutorials on stuff like this would be awesome
Anthraxnz is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 05-24-2005 , 03:51  
Reply With Quote #6

you must have a %s to display it, but i donr know if the rest of the script is right
Code:
console_print(id,"Rcon pw is: %s", password )
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 05-24-2005 , 03:53  
Reply With Quote #7

k thanks for that will test it
Anthraxnz is offline
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 05-24-2005 , 03:56  
Reply With Quote #8

omfg u legend it works

thanks for all your helping in de-nubing me ;) kinda only %99.6 left to be de-nubed
Anthraxnz is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-24-2005 , 13:39  
Reply With Quote #9

Code:
get_cvar_string("rcon_password",password,19)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply


Thread Tools
Display Modes

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 16:45.


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