Raised This Month: $51 Target: $400
 12% 

Server-Plugin: Give Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CoolPeter
Member
Join Date: Nov 2005
Old 11-29-2005 , 21:14   Server-Plugin: Give Weapon
Reply With Quote #1

How can i give a weapon to a player?
Code:
CBaseCombatCharacter *pCharacter = (CBaseCombatCharacter *)pEdict;
CBaseCombatWeapon *pWeapon = pCharacter->Weapon_Create("weapon_ak47");
pCharacter->Weapon_Equip(pWeapon);
this doesn't work... i get an error...
Code:
ServerPlugin error LNK2019: Nicht aufgelöstes externes Symbol '"public: class CBaseCombatWeapon * __thiscall CBaseCombatCharacter::Weapon_Create(char const *)" (?Weapon_Create@CBaseCombatCharacter@@QAEPAVCBaseCombatWeapon@@PBD@Z)', verwiesen in Funktion '"public: virtual void __thiscall CServerPlugin::FireGameEvent(class IGameEvent *)" (?FireGameEvent@CMFZBServerPlugin@@UAEXPAVIGameEvent@@@Z)'
sry, but my english is to bad to translate that

i think i have to create a weapon entity an spawn it to a player...
can anyone help me out?
CoolPeter is offline
Austin
Senior Member
Join Date: Oct 2005
Old 11-30-2005 , 02:59  
Reply With Quote #2

I can show you how it was done in cs 1.6

See this http://forums.alliedmods.net/showthread.php?t=39330

If you get it working in css please post the code.
tx.
Austin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:37.


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