AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with c4 model (https://forums.alliedmods.net/showthread.php?t=208802)

Skull3D 02-17-2013 14:06

Problem with c4 model
 
Hi, I have a problem with this log:

Code:

FATAL ERROR (shutting down): SV_ModelIndex: model 0 not precached
//home//s747/hlds_run: 403: gdb: not found

The problem occurs when I lift c4 because it has to turn into a other model

Code:
Code:

public EventCurWeapon ( id ) {
    new wid = read_data ( 2 );

    if ( wid == CSW_C4 && gHasMedkit [ id ] ){
        set_pev(id, pev_viewmodel, "models/ofBM/v_medkit.mdl" );
        set_pev(id, pev_weaponmodel2, "models/ofBM/p_medkit.mdl");
    }
}

and:


Code:

public client_PreThink ( id ) {
    new wid = read_data ( 2 );

    if ( pev ( id, pev_button ) & IN_ATTACK  && wid == CSW_C4 && gHasMedkit [ id ] ) {
        if( pev ( id, pev_oldbuttons ) & IN_ATTACK ){ 
            gHasMedkit [ id ] = false;
            fm_set_user_maxspeed ( id, 1.0 );
            new Float: fOrigin [ 3 ];
            pev ( id, pev_origin, fOrigin );
            engfunc ( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0);
            write_byte ( TE_SPRITE);
            engfunc ( EngFunc_WriteCoord, fOrigin [ 0 ] + random_float ( -5.0, 5.0 ) );
            engfunc ( EngFunc_WriteCoord, fOrigin [ 1 ] + random_float ( -5.0, 5.0 ) );
            engfunc ( EngFunc_WriteCoord, fOrigin [ 2 ] + random_float ( -10.0, 10.0 ) );
            write_short ( g_healspr );
            write_byte ( 7 );
            write_byte ( 200 );
            message_end ( );
           
            set_task ( 2.0, "heal", id );
           
            emit_sound ( id, CHAN_ITEM, "medkit/healing.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM );
        }
    }
}


YamiKaitou 02-17-2013 20:12

Re: Problem with c4 model
 
Did you precache them?

Skull3D 02-18-2013 04:33

Re: Problem with c4 model
 
Code:

precache_model ( "models/ofBM/v_medkit.mdl" );
precache_model ( "models/ofBM/p_medkit.mdl" );
precache_model ( "models/ofBM/w_medkit.mdl" );


Skull3D 02-28-2013 12:39

Re: Problem with c4 model
 
Refresh!

ConnorMcLeod 02-28-2013 13:51

Re: Problem with c4 model
 
I had the solution for you, but you need to read rules.

Skull3D 03-01-2013 08:54

Re: Problem with c4 model
 
General Rules read and I did not see that one can renew every 14 days.

Unkolix 03-01-2013 10:29

Re: Problem with c4 model
 
Quote:

Originally Posted by Skull3D (Post 1904386)
General Rules read and I did not see that one can renew every 14 days.

Look at the reason why your messages were removed...

Skull3D 03-01-2013 11:58

Re: Problem with c4 model
 
Look at the message up.
I wrote that i Have not seen this in the regulations.

Unkolix 03-01-2013 12:09

Re: Problem with c4 model
 
Quote:

Originally Posted by Skull3D (Post 1904491)
Look at the message up.
I wrote that i Have not seen this in the regulations.

You have been warned 2 times "wait 14 days before you bump" but you still don't obey it...

ConnorMcLeod 03-01-2013 12:37

Re: Problem with c4 model
 
pev_viewmodel

->

pev_viewmodel2


All times are GMT -4. The time now is 21:37.

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