Raised This Month: $51 Target: $400
 12% 

Killer Memes MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-14-2023 , 08:35   Killer Memes MOTD
Reply With Quote #1

Killer Memes MOTD
- v0.0.1, released at : 14/08/2023





Information
  • Display a MOTD when someone kills you
  • The GIF you see is the GIF your killer selected
  • Support sounds
  • GIF link must not have more than 255 characters
  • GIFs are saved by nVault
  • say /memes to open Memes Menu

Click here to watch a trial Video of this plugin


Credits
ufame - HTML code


memes.ini example
Code:
//"Name on Menu & MOTD Title" https://link_of_image.com/yourgif.gif sound/blah/blah.mp3 OR NOSOUND
"Wow" https://media.tenor.com/OdgYlp7oUX0AAAAC/woah-whoa.gif NOSOUND
"Hasbulla" https://media.tenor.com/OLH-sBYRUDYAAAAC/hasbulla-gaming.gif NOSOUND
"Holding Smile" https://i.makeagif.com/media/3-31-2017/825v2j.gif NOSOUND
"Kid Crying" https://i.makeagif.com/media/8-14-2023/cBrZxC.gif sound/memes/kid_crying.mp3
"Nice" https://i.makeagif.com/media/8-14-2023/_bu77A.gif sound/memes/nice.mp3
"OHHHHH" https://i.makeagif.com/media/8-14-2023/MV9xQw.gif sound/memes/ohhhhhh.mp3
"Flute John Cena" https://i.makeagif.com/media/8-14-2023/4FJMYL.gif sound/memes/flute_john_cena.mp3
Attached Files
File Type: zip server_files.zip (535.0 KB, 88 views)
File Type: zip memes.zip (19.72 MB, 100 views)
File Type: sma Get Plugin or Get Source (killer_meme.sma - 156 views - 4.0 KB)
__________________

Last edited by Jhob94; 08-18-2023 at 08:57. Reason: thread edits
Jhob94 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-14-2023 , 08:50   Re: Killer Memes
Reply With Quote #2

NOTES
Inside the zip file you have the GIF files. I am not sure for how long the GIFs will be online on those websites so you can add it to your own website.

If some link goes offline, please let me know so i can get a new link.

Also feel free to make your own memes and post them here!
__________________

Last edited by Jhob94; 08-14-2023 at 08:50.
Jhob94 is offline
Old 08-15-2023, 21:41
fysiks
This message has been deleted by fysiks. Reason: nvm
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 08-16-2023 , 20:02   Re: Killer Memes MOTD
Reply With Quote #3

how about having two options always are pinned at top
one for selecting my preferred and the other random
__________________
bigdaddy424 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-17-2023 , 04:20   Re: Killer Memes MOTD
Reply With Quote #4

That’s a good suggestion. Will do it tomorrow.
__________________
Jhob94 is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 08-17-2023 , 09:15   Re: Killer Memes MOTD
Reply With Quote #5

pretty

Code:
set_task(CMD_MSG_DELAY, "Task__Message", TASK_ID, _, _, "b")
PHP Code:
set_task(CMD_MSG_DELAY"Task__Message"TASK_ID, .flags="b"
&
Code:
while(!feof(fop))
PHP Code:
while(fgets(fopszDatascharsmax(szDatas)) 
__________________
mlibre is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-17-2023 , 09:55   Re: Killer Memes MOTD
Reply With Quote #6

Quote:
Originally Posted by mlibre View Post
pretty

Code:
set_task(CMD_MSG_DELAY, "Task__Message", TASK_ID, _, _, "b")
PHP Code:
set_task(CMD_MSG_DELAY"Task__Message"TASK_ID, .flags="b"
&
Code:
while(!feof(fop))
PHP Code:
while(fgets(fopszDatascharsmax(szDatas)) 
On set_task it is fine as it is. That’s not more efficient, maybe more readable, depending on who’s reading. That’s just a style, if you like it sure, but it’s pointless.

On file this is the proper way, feop is faster and cheaper. It compensates the null result you’ll get from fgets. Unless you have a really big file feop is the right choice. Anyway this is not a big deal, won’t have any impact.
__________________
Jhob94 is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 08-17-2023 , 10:30   Re: Killer Memes MOTD
Reply With Quote #7

clear, the set_task is more readable, it's optional. now in feof it was corrected in amxmodx since it was used incorrectly, I think it applies to everything.
__________________
mlibre is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-17-2023 , 16:45   Re: Killer Memes MOTD
Reply With Quote #8

You were right, on my old rusty memory it was built different. Just checked and it's unnecessary to use feof. Yet using it causes no harm, it will just double check if the file has ended.
I will correct it on the next version.

Code:
static cell AMX_NATIVE_CALL amx_fgets(AMX *amx, cell *params)
{
	FileObject* fp = reinterpret_cast<FileObject*>(params[1]);

	if (!fp)
	{
		return 0;
	}

	static char buffer[4096];
	buffer[0] = '\0';

	fp->ReadLine(buffer, sizeof(buffer) - 1);

	return set_amxstring_utf8(amx, params[2], buffer, strlen(buffer), params[3]);
}

static cell AMX_NATIVE_CALL amx_feof(AMX *amx, cell *params)
{
	FileObject* fp = reinterpret_cast<FileObject*>(params[1]);

	if (fp)
	{
		return fp->EndOfFile();
	}

	return 1;
}
__________________

Last edited by Jhob94; 08-18-2023 at 04:50.
Jhob94 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-18-2023 , 05:28   Re: Killer Memes MOTD
Reply With Quote #9

New version 0.0.2
- Added Random GIF option as first choice
- Added a new GIF to the files

__________________
Jhob94 is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 08-18-2023 , 11:07   Re: Killer Memes MOTD
Reply With Quote #10

nice why not use the constant already defined would replace SERVERMAXPLAYERS
__________________
mlibre 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 07:07.


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