PDA

View Full Version : Set something like a bool to an entity


Alucard^
06-11-2010, 14:13
I want to set something like a bool to an entity (exactly a dropped entity, like a weapon).

For example... if a created a new weapon and the player drop that weapon... now is a weaponbox, how to set that weaponbox that is the new weapon that i created? so when other player pickup that weapon he get the NEW weapon and not the default weapon.

You understand? sry, my english is not perfect.

padilha007
06-11-2010, 14:39
check the entity id?

Bugsy
06-11-2010, 19:59
Sounds like you are creating a weapon for a player and when dropped it becomes a weaponbox entity. You want to make it so when another player picks it up (touches the weaponbox), he gets the same weapon that the original player dropped?

Try this//Set weapon ID to weaponbox entity
set_pev( iEntity , pev_iuser1 , WeaponID );

//When touched, retrieve weapon ID from entity
WeaponID = pev( iEntity , pev_iuser1 );

meTaLiCroSS
06-11-2010, 22:10
http://forums.alliedmods.net/showthread.php?t=115160

Bugsy
06-12-2010, 12:52
https://forums.alliedmods.net/search.php?searchid=5815133

Sorry - no matches. Please try some different terms.

:lol:

wrecked_
06-12-2010, 13:05
Woops :oops:

https://forums.alliedmods.net/showthread.php?t=118110 =]