Raised This Month: $ Target: $400
 0% 

Precache and Warnings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
leonard19941
Veteran Member
Join Date: Jun 2011
Old 11-29-2011 , 11:51   Precache and Warnings
Reply With Quote #1

Hello, I have put the shark mod and the furien mod changes that so that when you're TT and put the knife to have it different, in the shark mod copil me well and without errors, but by putting it on the server when TT and I'm I put the knife is close the server with the error below image, in the furien mod as copilot with 1 errors and when I put it to test it on the server fails me or anything but it just does not change the sword of the TT, please help.
Attached Thumbnails
Click image for larger version

Name:	Dibujo (600 x 250).jpg
Views:	173
Size:	32.5 KB
ID:	96033  

Last edited by leonard19941; 01-27-2012 at 16:49.
leonard19941 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-29-2011 , 12:02   Re: Precache and Warnings
Reply With Quote #2

precache_model(garras)

and set viewmodel2 garras
__________________

Last edited by tuty; 11-29-2011 at 12:03.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
leonard19941
Veteran Member
Join Date: Jun 2011
Old 11-29-2011 , 12:07   Re: Precache and Warnings
Reply With Quote #3

The pev_viewmodel2 already placed at the bottom.
leonard19941 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-29-2011 , 13:35   Re: Precache and Warnings
Reply With Quote #4

no i mean, you have a garras as a string as global garras[ ] = "models/garras.mdl";


you should use that variable in all your places when you use " "
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
leonard19941
Veteran Member
Join Date: Jun 2011
Old 11-29-2011 , 14:05   Re: Precache and Warnings
Reply With Quote #5

PHP Code:
new garras[] = "models/garras.mdl" 
PHP Code:
public plugin_init()
    
register_event("CurWeapon""CurWeapon""be","1=1"
PHP Code:
public plugin_precache()
    
precache_model("models/garras.mdl"
PHP Code:
public CurWeapon(id){
    new 
weaponID read_data(2
    if(
weaponID != CSW_KNIFE)
        return 
PLUGIN_CONTINUE
    
if(cs_get_user_team(id) == CS_TEAM_T && is_user_alive(id)){
        
set_pev(idpev_viewmodel2"models/garras.mdl")
    }
    return 
PLUGIN_CONTINUE 

Thanks, it works but I get 1 warning.
Attached Thumbnails
Click image for larger version

Name:	Dibujo (600 x 250).jpg
Views:	142
Size:	19.2 KB
ID:	96043  

Last edited by leonard19941; 01-27-2012 at 16:49.
leonard19941 is offline
B3N4K
Senior Member
Join Date: Jun 2008
Location: Czech Republic
Old 11-29-2011 , 15:47   Re: Precache and Warnings
Reply With Quote #6

You declare garras but you never use it.
PHP Code:
new garras[] = "models/garras.mdl" 
PHP Code:
precache_model(garras
PHP Code:
set_pev(idpev_viewmodel2garras
Also are you sure you want to check if CfgFile exists? And if it does it wont precache?
I havent read the whole code but i guess that should be more likely like this:
PHP Code:
public plugin_precache()
{
    if( !
ReadCfgFile() )
    {
        
log_amx("Configuration file doesn't exist !!")
    }
    
precache_model("models/garras.mdl")

Config files are supposed to exist and it is also supposed to precache that model ;)

Last edited by B3N4K; 11-29-2011 at 15:56.
B3N4K is offline
leonard19941
Veteran Member
Join Date: Jun 2011
Old 11-30-2011 , 09:15   Re: Precache and Warnings
Reply With Quote #7

Thanks, it works but I get 1 warning in shark mod and in furien mod.

Last edited by leonard19941; 01-27-2012 at 16:50.
leonard19941 is offline
B3N4K
Senior Member
Join Date: Jun 2008
Location: Czech Republic
Old 11-30-2011 , 10:03   Re: Precache and Warnings
Reply With Quote #8

Then post your warning. (warning message that contains what is wrong and number of line where this warning appears)
B3N4K is offline
leonard19941
Veteran Member
Join Date: Jun 2011
Old 11-30-2011 , 11:05   Re: Precache and Warnings
Reply With Quote #9

warnings do not give you the information, you just put a warning or they give you, in my case I get a warning in the shark mod and 1 warning in the furien mod
leonard19941 is offline
B3N4K
Senior Member
Join Date: Jun 2008
Location: Czech Republic
Old 11-30-2011 , 15:32   Re: Precache and Warnings
Reply With Quote #10

Warning during compilation proccess gives brief info what is wrong and line where this particular error appears. If you can't provide warning message i can't help you and i guess anybody else won't help you too.

In attachment you can find screenshot how warning messages looks like. Post screenshot of your warning message and i will try to help you with that ;)
Attached Thumbnails
Click image for larger version

Name:	warnings.jpg
Views:	133
Size:	46.2 KB
ID:	96083  

Last edited by B3N4K; 11-30-2011 at 15:37.
B3N4K 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 08:26.


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