Raised This Month: $32 Target: $400
 8% 

very simple precache mod


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   Brad (55)
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 04-09-2006 , 08:27   very simple precache mod
Reply With Quote #1

Hi there,

This is my first plugin, so please shoot.

I have been surging for a small easy to use precache plugin.
All the ones i found are nice, but big and complex.
So i decided to write one myself.

It depends on a data file: amxmodx/configs/precache.ini.
Filled with simple lines like:
gfc/picture.gif
sound/blabla.wav

For every file to transfer, 1 line.
Comments in the file must be predesesed by ;

regards
Attached Files
File Type: sma Get Plugin or Get Source (precache.sma - 16361 views - 745 Bytes)

Last edited by xPaw; 07-16-2011 at 09:13. Reason: No need to attach plugin in post.
hjvl is offline
Dark Killer
Senior Member
Join Date: May 2005
Location: Kowloon, Hong Kong
Old 04-09-2006 , 08:48  
Reply With Quote #2

I like this plugin, +karma!
When a plugin dosen't precache the things it needs, then I will use this.

EDIT Please fix first, 26 errors!
__________________
Dark Killer is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 04-09-2006 , 09:51  
Reply With Quote #3

The online compiler does not give errors?

What are the errors you get?


O i see, when you use "get pluging"
If you copy the text and past it into the online compiler it works.

I will check the file.
hjvl is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 04-09-2006 , 10:00  
Reply With Quote #4

ok solved it..
saved the file with notepad instead of wordpad.

I use this to upload the picture of the motd.
So i don't need to use a www server
hjvl is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-09-2006 , 11:14  
Reply With Quote #5

Shouldn't you be precaching models and sounds differently?
Brad is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 04-09-2006 , 11:47  
Reply With Quote #6

Quote:
Originally Posted by Brad
Shouldn't you be precaching models and sounds differently?

What i have found is when you use precache_generic you have to use music/bla.wav instead of bla.wav (precache_sound)
I didn't find any other reason.
Tested it with sounds and that works.

Further i saw that when used with unknown extensions, the client refuses that file
hjvl is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 04-09-2006 , 11:52  
Reply With Quote #7

you should put your code that you have in the first post in tags
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-09-2006 , 12:39  
Reply With Quote #8

I'd like to suggest that you log an error to the AMXX log file if you can't find the precache.ini file. I'd also like to suggest that you allow comments in the precache.ini file (allowing "//" or ";" to designate comments).
Brad is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 04-09-2006 , 13:16  
Reply With Quote #9

This plugin has been done, and is incorporated in, several other plugins.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 04-09-2006 , 13:17  
Reply With Quote #10

Can you link to them?
Brad 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 03:44.


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