Hi, I want to give a player a specific unlockable weapon (eg. the sniper the huntsman).
I do that like this:
Code:
new Handle:giveNamedItem = INVALID_HANDLE;
new Handle:weaponEquip = INVALID_HANDLE;
public OnPluginStart()
{
StartPrepSDKCall(SDKCall_Player);
PrepSDKCall_SetFromConf(OffsCfg, SDKConf_Virtual, "WeaponEquip");
PrepSDKCall_AddParameter(SDKType_CBaseEntity, SDKPass_Pointer);
weaponEquip = EndPrepSDKCall();
StartPrepSDKCall(SDKCall_Player);
PrepSDKCall_SetFromConf(OffsCfg, SDKConf_Virtual, "GiveNamedItem");
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
PrepSDKCall_SetReturnInfo(SDKType_CBaseEntity, SDKPass_Plain);
giveNamedItem = EndPrepSDKCall();
}
public GiveWeapon(client, String:weapon[])
{
new weapon = SDKCall(giveNamedItem , client, weapon, 0);
SDKCall(weaponEquip, client, weapon);
}
The OffsCfg contains the correct offsets.
Now, if I call GiveWeapon(client, "tf_weapon_compound_bow"); to give the client the huntsman the client gets the huntsman and it's fully usable but the model is wrong, in first person it shows the engineers pistol... I don't know how it looks like in 3rd person view since I can't taunt with this weapon.
Somebody knows what I have to do to use the correct model and make it tauntable?