this my code:
PHP Code:
TF2Items_GiveSaxxy(client)
{
new String:ClientClass[18];
switch(TF2_GetPlayerClass(client))
{
case TFClass_Scout: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_bat");
case TFClass_Soldier: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_shovel");
case TFClass_Pyro: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_fireaxe");
case TFClass_DemoMan: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_bottle");
case TFClass_Heavy: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_fists");
case TFClass_Engineer: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_wrench");
case TFClass_Medic: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_bonesaw");
case TFClass_Sniper: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_club");
case TFClass_Spy: strcopy(ClientClass, sizeof(ClientClass), "tf_weapon_knife");
}
new Handle:weapon = TF2Items_CreateItem(OVERRIDE_ALL|FORCE_GENERATION);
TF2Items_SetClassname(weapon, ClientClass);
TF2Items_SetItemIndex(weapon, 423);
TF2Items_SetLevel(weapon, 100);
TF2Items_SetQuality(weapon, 3);
TF2Items_SetNumAttributes(weapon, 1);
TF2Items_SetAttribute(weapon, 1, 150, 1.0);
new entity = TF2Items_GiveNamedItem(client, weapon);
if(weapon != INVALID_HANDLE)
CloseHandle(weapon);
EquipPlayerWeapon(client, entity);
}