public GlowWeapon(id) {
if (!pev_valid(FakeWeaponID[id])) { //If the fake weapon ID does not already exist for this player.
FakeWeaponID[id] = fm_create_entity("info_target") //Spawn a new entity to replace the original.
if (!pev_valid(FakeWeaponID[id])) { //If it failed, don't go any further.
return
} else { //If it worked, set its basic properties.
dllfunc(DLLFunc_Spawn, FakeWeaponID[id])
set_pev(FakeWeaponID[id], pev_classname, "FakeWeapon")
set_pev(FakeWeaponID[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(FakeWeaponID[id], pev_aiment, id)
}
}
new weaponstr[31]
pev(id, pev_weaponmodel2, weaponstr, 30) //Store the name of the current weapon. ( P_ )
set_pev(id, pev_weaponmodel2, "") //Remove the weapon from the players hands. ( P_ )
fm_entity_set_model(FakeWeaponID[id], weaponstr) //Apply the weapon stored above to our fake weapon
set_pev(FakeWeaponID[id], pev_renderfx, kRenderFxGlowShell) //Render Away!
set_pev(FakeWeaponID[id], pev_rendercolor, {0.0, 200.0, 0.0}) //R, G, B
set_pev(FakeWeaponID[id], pev_rendermode, kRenderNormal)
set_pev(FakeWeaponID[id], pev_renderamt, 50.0) //Ammount/ShellSize
}