Raised This Month: $ Target: $400
 0% 

[deleted]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sneakpeek
Member
Join Date: Dec 2005
Location: Who cares really?
Old 01-25-2006 , 08:23   [deleted]
Reply With Quote #1

[deleted]

Last edited by Sneakpeek; 01-25-2014 at 02:51.
Sneakpeek is offline
Sneakpeek
Member
Join Date: Dec 2005
Location: Who cares really?
Old 01-26-2006 , 04:34  
Reply With Quote #2

Would this be the right way to do it?

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Map Suggestion", "1.0" "Sneakpeek")     register_clcmd("suggest", "Suggestion") } public Suggestion(id) {     new Arg1[32];     read_argv(1, Arg1, 31)     new SteamID[32], Name[32], VaultData[64]     get_user_name(id, Name, 31)     get_user_authid(id, SteamID, 31)     format(VaultData, 63, "[%s - %s] %s", Name, SteamID, Arg1)     log_to_file("addons/amxmodx/configs/Map Suggestions.ini", VaultData) }
Sneakpeek is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-26-2006 , 07:10  
Reply With Quote #3

Did you want it so they could type something in chat to start it?

Or in console...

like:

SweatyBanana: suggest de_dust2

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Map Suggestion", "1.0" "Sneakpeek")     register_clcmd("say suggest", "Suggestion")     register_clcmd("amx_suggest", "Suggestion") } public Suggestion(id) {     new Arg1[32];     read_argv(1, Arg1, 31)     new SteamID[32], Name[32], VaultData[64]     get_user_name(id, Name, 31)     get_user_authid(id, SteamID, 31)     format(VaultData, 63, "[%s - %s] %s", Name, SteamID, Arg1)     log_to_file("addons/amxmodx/configs/Map Suggestions.ini", VaultData) }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Sneakpeek
Member
Join Date: Dec 2005
Location: Who cares really?
Old 01-26-2006 , 09:41  
Reply With Quote #4

First I asked for someone to make the plugin for me.
But since nobody replied, I thought I could try myself.
So I made that out of some wild quessing.
So thats the right way to do it?
Will that work?

And for your question, in both console and chat.
Sneakpeek is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 01-26-2006 , 10:11  
Reply With Quote #5

For chat you need to use the:

say message command

and for console i would sugges the amx_function...

Its in my other post with the above code.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Sneakpeek
Member
Join Date: Dec 2005
Location: Who cares really?
Old 01-26-2006 , 11:13  
Reply With Quote #6

No no no.
Sorry if my english misunderstood you.

I dont even know if that code is working.
I know how to use it, Im not that stupid.
I made that code out of some quessing and wonders if thats the right way to do it.
Not how to use it!
Because I dont know if it even works at all.
Sneakpeek is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-26-2006 , 12:41  
Reply With Quote #7

Quote:
Originally Posted by SweatyBanana
Code:
//     register_clcmd("say suggest", "Suggestion") // ...     read_argv(1, Arg1, 31)
This wouldn't work correctly because Arg1 would be always "suggest".
Notice that argument shifted in that case.

While original code would work. But i suggest to add return PLUGIN_HANDLED at the end to prevent "Unknown command" message from appearing.
VEN is offline
Reply



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 22:46.


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