AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need cvar (https://forums.alliedmods.net/showthread.php?t=206)

SaintK 03-12-2004 10:29

Need cvar
 
Hey all,
first of all, great u started the new project! AMX is good, but it can be better! Tnx again!

Second, i need sumthin :)

Ill explane,

i want admins to be able to do amx_scan (part of)playername

When u do that on the client should happen:

say /scan

Currently i have this fixed by:
amx_exec *playerID* "say /scan"

But its alot of typing, so can any of u create this cvar what i can put in the plugin?

Thanks in advanced!

Saint K.

knekter 03-16-2004 22:02

Get ya started
 
Try this to start out:

Code:
public plugin_init() {     register_plugin("Scan","0.1","SaintK")     register_concmd("amx_scan","admin_scan",ADMIN_KICK,"<name>" } public admin_predator(id,level,cid) {     if(!cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     new name[32]     read_argv(1,name,32)     new player = cmd_target(id,name,3)     get_user_info(name)     // BLAH BLAH // }

knekter 03-17-2004 17:37

Did this help?
 
If you need any mroe help Ill be glad to help you out.

Freecode 03-17-2004 17:46

Code:
register_concmd("amx_scan","admin_scan",ADMIN_KICK,"<name>"

BigBaller 03-17-2004 21:57

Re: Get ya started
 
Quote:

Originally Posted by knekter
Try this to start out:

Code:
public plugin_init() {     register_plugin("Scan","0.1","SaintK")     register_concmd("amx_scan","admin_scan",ADMIN_KICK,"<name>" } public admin_predator(id,level,cid) {     if(!cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     new name[32]     read_argv(1,name,32)     new player = cmd_target(id,name,3)     get_user_info(name)     // BLAH BLAH // }

haha

anyone notice admin_predator

should be admin_scan

That and I think freecode is trying to point out that line is missing a )

knekter 03-18-2004 18:14

LOL
 
Code:
public plugin_init() {     register_plugin("Scan","0.1","SaintK")     register_concmd("amx_scan","admin_scan",ADMIN_KICK,"<name>") } public admin_scan(id,level,cid) {     if(!cmd_access(id,level,cid,3))     {         return PLUGIN_HANDLED     }     new name[32]     read_argv(1,name,32)     new player = cmd_target(id,name,3)     get_user_info(name)     // BLAH BLAH // }

theres the mistakes fixed, sry about that :oops: [/small]

knekter 03-21-2004 20:30

lol
 
its nice to know if I helped you at all, you didnt even reply if it worked or not, plz reply if you can. Im still a learner myself, and I enjoy helping others.

SaintK 03-22-2004 01:17

yeah sorry, i am happy with the help tho, but i was kinda busy last week with work and stuff!

I am fighting with the script ;) So i probbarly need more help, but next weekend i can work on it again!

Sorry again for late reaction!


All times are GMT -4. The time now is 20:13.

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