AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help whit script! (https://forums.alliedmods.net/showthread.php?t=57435)

exelz 07-04-2007 15:54

Need help whit script!
 
I am working on a plugin for my server where ppl can type:
/server - server info
/buyxp - info how to buy xp
/rules - server rules
/motd - to see motd

Questions:

1.!i need to know command that server will automaticaly say(every 3min):
"Type /server - server info"
"Type /buyxp - how to buy xp"
"Type /rules - server rules"
"Type /motd - see MOTD"

2.How can i make so when player types /buyxp then it types in chat:
"To buy Xp conntact whit Admin!"

+karma for helping me!

Exelz

flyeni6 07-04-2007 16:28

Re: Need help whit script!
 
here u go :)
PHP Code:

 
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
 
public plugin_init() 
{
      
register_plugin(PLUGINVERSIONAUTHOR)
      
register_clcmd("say /buyxp","cmdbuyxp")
}
 
public 
client_putinserver(id)
{
      
set_task(180.0"announce"id,_,_,"b")//180 seconds = 3min
}
public 
announce(id)
{
      
client_print(0,print_chat,"Type /server to view the server info")
      
client_print(0,print_chat,"Type /buyxp to learn how to buy xp")
      
client_print(0,print_chat,"Type /rules to view the rules")
      
client_print(0,print_chat,"Type /motd to view the Message of the Day")
}
 
public 
cmdbuyxp(id)
{
      
client_print(id,print_chat,"To buy Xp conntact whit Admin!")



Deviance 07-04-2007 16:30

Re: Need help whit script!
 
Quote:

Originally Posted by exelz (Post 498677)
1.!i need to know command that server will automaticaly say(every 3min):
"Type /server - server info"
"Type /buyxp - how to buy xp"
"Type /rules - server rules"
"Type /motd - see MOTD"

Code:

#include <amxmodx>

public plugin_init()
{
        register_plugin("", "", "")
        set_task(180.0, "show_ad", _, _, _, "b")
}

public show_ad()
{
        client_print(0, print_chat, "Type /server - server info")
        client_print(0, print_chat, "Type /buyxp - how to buy xp")
        client_print(0, print_chat, "Type /rules - server rules")
        client_print(0, print_chat, "Type /motd - see MOTD")
}

Quote:

Originally Posted by exelz (Post 498677)
2.How can i make so when player types /buyxp then it types in chat:
"To buy Xp conntact whit Admin!"

Code:

#include <amxmodx>

public plugin_init()
{
        register_plugin("", "", "")
        register_clcmd("say /buyxp", "cmd_info")
}

public cmd_info(id)
{
        client_print(id, print_chat, "To buy Xp conntact whit Admin!")
}


exelz 07-05-2007 03:17

Re: Need help whit script!
 
Ok ty very much flyeni6 and deviance!!! +karma for you!(flyeni6 and deviance!)

Rolnaaba 07-05-2007 14:47

Re: Need help whit script!
 
deviance yours makes it show every 3 seconds...

Deviance 07-05-2007 15:41

Re: Need help whit script!
 
Quote:

Originally Posted by Rolnaaba (Post 499112)
deviance yours makes it show every 3 seconds...

I was tired, updated.

Rolnaaba 07-05-2007 17:17

Re: Need help whit script!
 
ya, you better update it!!


ok sorry lol I couldnt help it...


All times are GMT -4. The time now is 21:31.

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