hello, sorry if I'm in the wrong area, is that I'm not American, I need help with the following command:
Code:
hWeapon[1] = TF2Items_CreateItem(OVERRIDE_ALL|FORCE_GENERATION);
if (hWeapon[1] != INVALID_HANDLE)
{
TF2Items_SetClassname(hWeapon[1], "tf_weapon_sapper");
TF2Items_SetItemIndex(hWeapon[1], 810);
TF2Items_SetLevel(hWeapon[1], GetRandomInt(1,100));
TF2Items_SetQuality(hWeapon[1], 5);
Format(weaponAttribs, sizeof(weaponAttribs), "433 ; 1.0");
new attribCount = ExplodeString(weaponAttribs, " ; ", weaponAttribsArray, 32, 32);
if (attribCount > 0)
{
TF2Items_SetNumAttributes(hWeapon[1], attribCount/2);
new i2 = 0;
for (new i = 0; i < attribCount; i+=2)
{
TF2Items_SetAttribute(hWeapon[1], i2, StringToInt(weaponAttribsArray[i]), StringToFloat(weaponAttribsArray[i+1]));
i2++;
}
}else{
TF2Items_SetNumAttributes(hWeapon[1], 0);
}
//TF2_RemoveWeaponSlot(client, 1);
}
weapon[1] = TF2Items_GiveNamedItem(client, hWeapon[1]);
EquipPlayerWeapon(client, weapon[1]);
this command will equip a "sapper," I would like to convert it, and usalo to wear a hat, Example:
Code:
hWeapon[1] = TF2Items_CreateItem(OVERRIDE_ALL|FORCE_GENERATION);
if (hWeapon[1] != INVALID_HANDLE)
{
TF2Items_SetClassname(hWeapon[1], "hat");
TF2Items_SetItemIndex(hWeapon[1], 918);//The Master Mind || HAT
TF2Items_SetLevel(hWeapon[1], GetRandomInt(1,100));
TF2Items_SetQuality(hWeapon[1], 5);
Format(weaponAttribs, sizeof(weaponAttribs), "433 ; 1.0");
new attribCount = ExplodeString(weaponAttribs, " ; ", weaponAttribsArray, 32, 32);
if (attribCount > 0)
{
TF2Items_SetNumAttributes(hWeapon[1], attribCount/2);
new i2 = 0;
for (new i = 0; i < attribCount; i+=2)
{
TF2Items_SetAttribute(hWeapon[1], i2, StringToInt(weaponAttribsArray[i]), StringToFloat(weaponAttribsArray[i+1]));
i2++;
}
}else{
TF2Items_SetNumAttributes(hWeapon[1], 0);
}
//TF2_RemoveWeaponSlot(client, 1);
}
weapon[1] = TF2Items_GiveNamedItem(client, hWeapon[1]);
EquipPlayerWeapon(client, weapon[1]);
help me please
I'm using
HTML Code:
translate.google.com.br