AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Change w_ model of the weapon. (https://forums.alliedmods.net/showthread.php?t=82162)

xbatista 12-18-2008 08:47

Change w_ model of the weapon.
 
I using default w_m4a1 how to replace it to: models/xxx/w_m4a1.mdl?
The v_ model and p_ is easy to set :/
PHP Code:

        new weaponid read_data(2)       
 if (
weaponid == CSW_M4A1)
        {
set_pev(idpev_viewmodel2"models/xxx/v_m4a1.mdl")
set_pev(idpev_weaponmodel2"models/xxx/p_m4a1.mdl")
        } 

How to replace w_?

SOORRRRYYYYYYYYYYYYYY MOVE to SCRIPTING HELP !!!!!!!!!!!!!!! !

xPaw 12-18-2008 09:31

Re: Change w_ model of the weapon.
 
are you dumb? Oo
http://forums.alliedmods.net/showthread.php?t=40822

xbatista 12-18-2008 12:02

Re: Change w_ model of the weapon.
 
But how to set if weaponid == CSW_M4A1?
PHP Code:

    if(equal(className"weaponbox") || equal(className"armoury_entity") || equal(className"grenade"))
    {
        
engfunc(EngFunc_SetModelentityWORLD_MODEL)
        return 
FMRES_SUPERCEDE
    


Without this:
PHP Code:

    // checks if its the model we want to change
    
if(!equali(modelOLDWORLD_MODEL)) 
        return 
FMRES_IGNORED 

I whant to set about 20 models.
The very simple way like:
PHP Code:

        if (weaponid == CSW_M4A1)
        {
set_pev(idpev_viewmodel2"models/xxx/v_m4a1.mdl"


xPaw 12-18-2008 12:05

Re: Change w_ model of the weapon.
 
you should check it

xbatista 12-18-2008 12:08

Re: Change w_ model of the weapon.
 
new OLDWORLD_AK47[] = "models/w_ak47.mdl"
new OLDWORLD_M4A1[] = "models/w_m4a1.mdl"





PHP Code:

    if(!equali(modelOLDWORLD_M4A1) && !equali(modelOLDWORLD_AK47)) 

?
And then write this?
PHP Code:

    if(equal(className"weaponbox") || equal(className"armoury_entity") || equal(className"grenade")) 
    { 
        
engfunc(EngFunc_SetModelentityWORLD_M4A1
        
engfunc(EngFunc_SetModelentityWORLD_AK47
        return 
FMRES_SUPERCEDE 
    




All times are GMT -4. The time now is 09:19.

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