Raised This Month: $ Target: $400
 0% 

Will this little thing work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CoolKiller
Member
Join Date: Jun 2005
Location: Denmark
Old 06-07-2005 , 12:23   Will this little thing work?
Reply With Quote #1

Will this work?
(aint home, so cant test this on my server. Just want to see if i have made anything right)
Code:
// Hey ya'll out there.. Readin tha plugin are ya?
// This is my first plugin.. Problable VERY simple, but well
// wanted to give "small" programming a try..!
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
	Register_plugin("Showdate", "1.0", "ColKiller")
	register_clcmd("say /date", "tha_date", "admin_all", "Shows date")
	register_clcmd("say_team /date", "tha_date", "admin_all", "Shows date")
	register_clcmd("date", "tha_date", "admin_all", "Shows date")
	register_clcmd("say date", "tha_date", "admin_all", "Shows date")
	register_clcmd("say_team date", "tha_date", "admin_all", "Shows date")
}
Public tha_date
{
	set_hudmessage (red=200, green=100, blue=0, float:x=-1.0, float:y=o.35, effects=0, float:fxtime=6.0)
	show_hudmessage (0,date)
return PLUGIN_HANDLED
}
This is my first time, so please correct my mistakes, and i would like to know what i could change, or any improvements.. (my first script; its not supposed to be super complicated )
__________________
I TOLD you I sucked at this!!

http://www.amxmodx.org/forums/viewtopic.php?t=14504
Cool
CoolKiller is offline
Send a message via MSN to CoolKiller
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 06-07-2005 , 13:27  
Reply With Quote #2

Pretty broken (ignoring comments)

Code:
Register_plugin("Showdate", "1.0", "ColKiller")
1) register_plugin <-- It's lowercase
2) You've made a typo in your name

Code:
Public tha_date
1) public <-- it's lowercase again
2) You forgot ()

Code:
set_hudmessage (red=200, green=100, blue=0, float:x=-1.0, float:y=o.35, effects=0, float:fxtime=6.0)
Hrm, don't remember the syntax for this way of specifying arguments, but if there were tags, it is Float and not float.

Code:
show_hudmessage (0,date)
<-- What is date?

Code:
return PLUGIN_HANDLED
You forgot the indentation ;)
__________________
hello, i am pm
PM is offline
Silverice146
Member
Join Date: Mar 2005
Location: In a box
Old 06-07-2005 , 15:06  
Reply With Quote #3

so wut hes saying is no it will not work

besides all the broken stufffs you need to specify what date is

otherwise it will do nothing, it wont even show the hudmessage i think since theres nothing to show.
__________________
Silverice146 is offline
Send a message via AIM to Silverice146
CoolKiller
Member
Join Date: Jun 2005
Location: Denmark
Old 06-07-2005 , 15:08   Hah :D
Reply With Quote #4

Maaan.. Well, my signature tells this better than me ^^
__________________
I TOLD you I sucked at this!!

http://www.amxmodx.org/forums/viewtopic.php?t=14504
Cool
CoolKiller is offline
Send a message via MSN to CoolKiller
CoolKiller
Member
Join Date: Jun 2005
Location: Denmark
Old 06-07-2005 , 15:12   HAHAHA :D
Reply With Quote #5

Quote:
Originally Posted by PM
Pretty broken
How is it supposed to look, if its going to work ?
the date thing, how does "thetime" then work, how can IT fetch the date?
__________________
I TOLD you I sucked at this!!

http://www.amxmodx.org/forums/viewtopic.php?t=14504
Cool
CoolKiller is offline
Send a message via MSN to CoolKiller
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 06-07-2005 , 16:19  
Reply With Quote #6

Why don't you actually take the time to loko at the .sma for the plugin to find out how it does? =\
__________________
f1del1ty.oXi is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-07-2005 , 16:32  
Reply With Quote #7

You should just do somethin like this..

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Showdate", "1.0", "CoolKiller")     register_clcmd("say","hook_say")     register_clcmd("say_team","hook_say")     // Save the extra typing by hooking the 2 say commands } public hook_say(id) {     new message[164]     read_args(message,163)     // Read the 'say' command arguments     // If the message args equal either /date or date ..     if(equali(message,"/date") || equali(message,"date")) {         // Do whatever here..         // return PLUGIN_HANDLED - (here) - Will not display the text that was typed     }     return PLUGIN_CONTINUE }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 00:26.


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