game_player_equip
Does anybody knows how to create and use game_player_equip with a plugin?
I mean, I guess I know how it works but I've tried to create and add some weapons as kvd but doesn't work. As far as I know, this entity give items to players when they spawn. |
Re: game_player_equip
example :
entity = create_entity( "game_player_equip" ); DispatchKeyValue( entity, "weapon_knife" , "1" ); DispatchKeyValue( entity, "weapon_glock18", "1" ); DispatchKeyValue( entity, "ammo_9mm" , "3" ); DispatchKeyValue( entity, "targetname" , "equipment" ); DispatchSpawn( entity ); Then you need to trigger it either using another entity (any entities which can called a target ) either I guess with Ham_Use or something. This entity doesn't give weapons at spawn. It needs another entity to trigger it ( game_playerspawn used multi_manager ) Something like : https://forums.alliedmods.net/showpo...27&postcount=2 ; but it will called each times on resethud too ; so it may not a good idea. |
Re: game_player_equip
Right, but what about this:
http://developer.valvesoftware.com/w...e_player_equip Quote:
|
Re: game_player_equip
Yes it works, you don't need any other trigger ent.
But weapons will be given also when players send command "fullupdate". |
Re: game_player_equip
oh I was not aware, so yes it should work so, though never tried.
|
Re: game_player_equip
I'm idiot, I was aware. Last time I have decompiled PlayerSpawn() for Connor and it's quite the same as the HLSDK one and we can see well it search for game_player_equip automatically :
Code:
|
Re: game_player_equip
Last question.
Should this entity be created at precache or can be created during game? |
Re: game_player_equip
If it searches like that on player's spawn we can guess it can be creatde in game without problem.
|
Re: game_player_equip
Quote:
If there is already an existing game_player_equip entity. Is it possible to know which all keyvalues it has, i.e., which all weapons it gives ? |
| All times are GMT -4. The time now is 08:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.