Raised This Month: $ Target: $400
 0% 

News Board


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 07-09-2004 , 16:00   News Board
Reply With Quote #1

I've decided I wanted to create a simple plugin that is basicly a "Jobs" section for a imaginary newspaper.

Now the commands:

say "/viewjobs" = View the Current Jobs
say "/addjobs Title Specification" = Add a job with its description
say "/deljobs Title" = Delete a job only you added.

Im not sure of the best way to do this but I was thinking, to view the jobs simply use a menu, that will list the title of all jobs, you press number next to the title to see a submenu. Here is for the beta version "1.Specification, 2.Recruiter, 3.Go Back".
Now when you press 1 it pops up a personal message saying something like "[JobSpec]: The Specification Here" and goes back to menu.

Now when adding a job, it should remember the persons userid and keep the job open until he leaves or deletes it. The only person who can remove it is the one with the corrosponding userid. If you got a better system which is more efficient please tell me.

I posted this because I would like to know the best way for a nub like me to go around this.
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 07-09-2004 , 17:08  
Reply With Quote #2

Using userid is no good solution, either use user index or authid.
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 07-09-2004 , 19:05  
Reply With Quote #3

Quote:
Originally Posted by EKS
Using userid is no good solution, either use user index or authid.
he prolly ment authid..
__________________
My Plugins

Got ??
AssKicR is offline
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 07-09-2004 , 19:34  
Reply With Quote #4

I started making it but I got beaten to it before I started so Im thinking of a new project

Code:
/********************************
*	News Board Plugin	*
*	Author: RPRaiden	*
*	Date: 09 July 2004	*
*	Version: 1.0 Beta	*
*			 	*
********************************/
#include <amxmodx>

public add_job{
}

public view_job{
}

public del_Job{
}

public handlesay(HLCommand, HLData, HLUserName, UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Speech[MAX_DATA_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Name[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];

	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData, Speech, MAX_DATA_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	convert_string(HLUserName, Name, MAX_NAME_LENGTH);

	if ( (strcasestr(Speech, "/addjob", User)!= -1) ) {
		snprintf(Text, MAX_TEXT_LENGTH, "[JOB] %s has added a job! Type /viewjobs to read!", User);
		say(Text);
		add_job(UserIndex);
	} else if ( (strcasestr(Speech, "/viewjob", User)!= -1) ) {
		view_job(UserIndex)
	} else if ( (strcasestr(Speech, "/deljob", User)!= -1) ) {
		del_job(UserIndex)
	} 
}


public plugin_init () {
	register_plugin("RP Job Board","1.0 Beta","RPRaiden")
	plugin_registercmd("say","handlesay",ACCESS_ALL);
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 07-09-2004 , 19:41  
Reply With Quote #5

that looks horribly like adminmod code
__________________
My Plugins

Got ??
AssKicR is offline
RPRaiden
Member
Join Date: Apr 2004
Location: UK
Old 07-09-2004 , 19:44  
Reply With Quote #6

I based it upon a plugin I thought was amx but was am. I dont know the amx code but I recently learned c++ so it makes sense to me, I didnt realise
__________________
RPRaiden is offline
Send a message via ICQ to RPRaiden Send a message via AIM to RPRaiden Send a message via MSN to RPRaiden Send a message via Yahoo to RPRaiden
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 14:50.


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