AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help 2 load ini file... (https://forums.alliedmods.net/showthread.php?t=28768)

Extrem-5x 05-22-2006 09:33

Need help 2 load ini file...
 
Hi
I am new to amx plugin and to create em, so i have a newb question.

How do i do it, so when i have said /adminhelp, it will load a text file, so i can see it ingame?

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define ACCESS_LEVEL    ADMIN_VOTE #define PLUGIN "Help Menus" #define VERSION "Beta" #define AUTHOR "King Extrem" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("say /adminhelp","Admin",0,": Displays a list of admin commands")     register_cvar("adminmenu","1")     register_clcmd("say /userhelp","User",0,": Displays a list of user commands")     register_cvar("usermenu","1")     register_cvar("user_on_admin","1") } public Admin(id) {     if(get_cvar_num("adminmenu") == 1) {         if(get_cvar_num("user_on_admin","1") {             client_print(id,print_chat,"Du har ingen angang til denne menu, proov /helpmenu.")         }else if(get_user_flags(id) & ACCESS_LEVEL) {             client_print(id,print_chat,"The menu should load here,")         }     }     else{             client_print(id,print_chat,"Denne menu er ikke tilgaengelig,")     } } public User(id) {     if(get_cvar_num("usermenu") == 1) {             client_print(id,print_chat,"Du må vente til denne plugin er færdig,")     }else{             client_print(id,print_chat,"Denne menu er ikke tilgaengelig,")     } }

Hawk552 05-22-2006 09:39

What?


All times are GMT -4. The time now is 16:27.

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