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

block/change map precaching


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 10-21-2006 , 08:05   block/change map precaching
Reply With Quote #1

Upgraded my server from windows to linux, and now a few of my maps are crashing because the mapper used wrong casing.
Example:
Real file is sprites/flame2.spr
Map tries to precache Sprites/flame2.spr
(Not sure if dirs are case sensitive on linux.. but the file isn't being found and crashes hlds)

Also need help with this -> http://ampaste.net/4372

Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "Block/Change Precache" #define VERSION "0.1" #define AUTHOR "FatalisDK" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR) } public plugin_precache() {     register_forward(FM_PrecacheModel, "fwdPrecacheModel", 0); } public fwdPrecacheModel(szModel[]) {     // 3 ways I tried         /* 1     if( equal(szModel, "Sprites/flame2.spr", 0) )     {         return FMRES_SUPERCEDE;     }*/         /* 2     copy(szModel, 18, "sprites/flame2.spr")     */         /* 3     if( equal(szModel, "Sprites/flame2.spr", 0) )     {         return FMRES_HANDLED;     }*/ }
__________________

Last edited by FatalisDK; 10-21-2006 at 09:28.
FatalisDK is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 10-21-2006 , 11:44   Re: block/change map precaching
Reply With Quote #2

I suggest you Ripent instead of making an AMXX Plugin for a stupidly built Map.
;)
Attached Files
File Type: zip ripent.zip (35.6 KB, 97 views)
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-21-2006 , 12:59   Re: block/change map precaching
Reply With Quote #3

Code:
    if( equal(szModel, "Sprites/flame2.spr", 0) )     {         return FMRES_SUPERCEDE;     }

That probably didn't work because you set the third param to zero (read funcwiki for more info). Oh btw, names are case sensitive on linux (pretty sure).

--->
Code:
equal(szModel, "sprites/flame2.spr");
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-21-2006 , 13:03   Re: block/change map precaching
Reply With Quote #4

Simplest solution....rename the file and/or folders. ie sprites folder already exist but its trying to precache from Sprites....so make a new folder called Sprites.

If the same file is used by other maps, copy and paste it then make one with the case sensitive name and one with the original name.

Much more easier than making a plugin or using ripent just for some dork's typos.

About your ampaste code, take a look at ghw's juggernaut plugin.

His plugin correctly sets the hud for the players health...his plugin also gives 1000 hp to the juggernaut so you might get some ideas from there too.

Last edited by organizedKaoS; 10-21-2006 at 13:13.
organizedKaoS is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-21-2006 , 13:37   Re: block/change map precaching
Reply With Quote #5

Quote:
Originally Posted by organizedKaoS View Post
Simplest solution....rename the file and/or folders. ie sprites folder already exist but its trying to precache from Sprites....so make a new folder called Sprites.
...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 10-21-2006 , 13:48   Re: block/change map precaching
Reply With Quote #6

zenith: the default value for param 3 is 0.
native equal(const a[],const b[],c=0);

organizedKaoS:
get_user_health returns the true health, I'm trying to convert that to what the hud heath shows (the juggernaut plugin doesnt do anything what i want)
__________________

Last edited by FatalisDK; 10-21-2006 at 13:54.
FatalisDK is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-21-2006 , 15:04   Re: block/change map precaching
Reply With Quote #7

Quote:
Originally Posted by FatalisDK View Post
organizedKaoS:
get_user_health returns the true health, I'm trying to convert that to what the hud heath shows (the juggernaut plugin doesnt do anything what i want)
I see...I havent gotten around to playing with the health hud so sorry cant help you out there. But as far as I know and have seen, the hud cant display more than 255 hp/ap.
organizedKaoS is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 10-21-2006 , 15:07   Re: block/change map precaching
Reply With Quote #8

Yep.. and I'm trying to convert actual HP (more than 255) to the HP the hud shows (1 byte?.. 0-255..). I don't think anyone understands what I'm trying to do .
__________________
FatalisDK is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-21-2006 , 15:18   Re: block/change map precaching
Reply With Quote #9

Quote:
Originally Posted by FatalisDK View Post
Yep.. and I'm trying to convert actual HP (more than 255) to the HP the hud shows (1 byte?.. 0-255..). I don't think anyone understands what I'm trying to do .
Well...you could try making an alternate hud just above the default health hud.

So when the player is above 255 health, decrease from the alternate hud first until players health is at/below/equal to 255. If you go this route, you might also have to update the default hud as well as I believe it may still try to display the health change.

After that, remove the alternate hud and the health hud should suffice thereafter.

Just a suggestion.

Good luck.
organizedKaoS is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-22-2006 , 06:49   Re: block/change map precaching
Reply With Quote #10

My bad.

Last edited by [ --<-@ ] Black Rose; 10-22-2006 at 09:02.
[ --<-@ ] Black Rose 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:06.


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