Quote:
Originally Posted by meng
but since i cannot change the appearance of the weapon, i cant rightfully call it the golden gun.
|
I did something sort of like this for TF2 (boredom, not a released plugin, doesn't work anymore anyway since givenameditem offsets changed), which created and equipped a golden smg. After I created the entity via the givenameditem sdk call
Code:
new entity = SDKCall(hGiveNamedItem, client, "tf_weapon_smg", 0, 0);
SDKCall(hWeaponEquip, client, entity);
I (after setting other properties) simply did this:
Code:
SetEntityRenderMode(entity, RENDER_TRANSCOLOR);
SetEntityRenderColor(entity, 255, 215, 0, 255);
Will that work for your deagle entity spawned in this line:
Code:
new entity = CreateEntityByName("weapon_deagle");
DispatchSpawn(entity);
I don't own CS:S, so I could be way off, and the color might just change back when it gets equipped. If not, it might be possible to hook the item_pickup event:
Code:
"item_pickup"
{
"userid" "short"
"item" "string" // either a weapon such as 'tmp' or 'hegrenade', or an item such as 'nvgs'
}
After having recorded the entity's reference number in a variable, and then recheck the owner entity of the evil deagle is the userid (convert to client, I'm sure) from item_pickup and then apply the color in that way?
I have absolutely no idea if any of this would work, again, as I do not own counterstrike source, I'm only offering suggestions. I wouldn't be surprised if there was some cardinal mistake I made in thinking any of that would work, and I don't want you to think I know for sure what I'm talking about.
__________________