AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Dont see the ball model when i throw (https://forums.alliedmods.net/showthread.php?t=272556)

Fuck For Fun 10-02-2015 17:35

[HELP] Dont see the ball model when i throw
 
It never happened to me must have i touched something.

I throw the ball I do not see W_ - Defining the model
I see only the hegrenade

Code:

new const g_szDodgeballWorldModel[] = "models/Days/w_dodgeball.mdl";
new const g_szSnowballWorld[ ] = "models/Days/w_snowball.mdl";

Code:

register_forward( FM_SetModel, "FwdSetModel_Pre"); // i dont know if have to set 0 after "FwdSetModel_Pre", 0
Code:

precache_model( g_szDodgeballWorldModel );
precache_model( g_szSnowballWorld );

Code:

public FwdSetModel_Pre( id, iEnt, szModel[] )
{
    if ( g_iCurrentDay == DODGEBALL_DAY )
    {   
        if(equali(szModel,"models/w_hegrenade.mdl"))
        {
            entity_set_model( iEnt, g_szDodgeballWorldModel ); // better to use engfunc or entity_set_model
            return FMRES_SUPERCEDE
        }
        return FMRES_IGNORED
    }
   
    else if ( g_iCurrentDay == SNOWBALL_DAY )
    {   
        if(equali(szModel,"models/w_hegrenade.mdl"))
        {
            engfunc(EngFunc_SetModel, iEnt, g_szSnowballWorld ); // better to use engfunc or entity_set_model
            return FMRES_SUPERCEDE
        }
        return FMRES_IGNORED
    }
   
    return 0;
}


Shiina.Mashiro 10-02-2015 22:56

Re: [HELP] Dont see the ball model when i throw
 
use post forward(1), I don't think you should use pre


All times are GMT -4. The time now is 22:10.

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