AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make toogle? (https://forums.alliedmods.net/showthread.php?t=82433)

ianglowz 12-23-2008 08:48

How to make toogle?
 
I need help to make toogle.Example when client say "/ping" it will show the message.What the code for that?

Spunky 12-23-2008 09:16

Re: How to make toogle?
 
Uh, well, that's not really a toggle. That's a command. Try reading the documentation for some scripting tutorials.

ianglowz 12-23-2008 09:19

Re: How to make toogle?
 
Can you give the link?It very hard to search.

Spunky 12-23-2008 09:36

Re: How to make toogle?
 
http://www.amxmodx.org

[IMG]http://img185.**************/img185/4916/helpsecnd0.png[/IMG]

ianglowz 12-23-2008 09:45

Re: How to make toogle?
 
It may take for an hour to search it.Hard to found.Nvm,trying search.

Spunky 12-23-2008 09:56

Re: How to make toogle?
 
[IMG]http://img355.**************/img355/5690/scriptsecit5.png[/IMG]

It's simple navigation...

ianglowz 12-24-2008 05:32

Re: How to make toogle?
 
I had click than i search for this command.Nothing saying about this.

Spunky 12-24-2008 08:10

Re: How to make toogle?
 
...You're not supposed to search for the command. I was giving you resources so you can learn to do it yourself.

ianglowz 12-25-2008 05:03

Re: How to make toogle?
 
Ooo..sorry about that..I'm still learning now.But anyone know about this coding please help.:)

CodeMaster 12-25-2008 06:20

Re: How to make toogle?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Ping Info"
#define VERSION "1.0"
#define AUTHOR "CodeMaster"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_
    register_clcmd
("ping_cl","cmd_get_ping",ADMIN_USER,"")
}

public 
cmd_get_ping(id,level,cid) {
    new 
ping
    
new loss
    get_user_ping
(id,ping,loss)
    
client_print(id,print_chat,"Ping: %d",ping)
    
    return 
PLUGIN_HANDLED


This should work.
Spunky means that you can't FIND done code snippets you need, but he points to where you should search for info on how to do it.
It's always better if you know HOW-TO do things.

Again, try this, and if it won't work, say it and I'll fix it.

Cheers ;)

Nidza


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

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