Raised This Month: $ Target: $400
 0% 

[Equip Hat, No Weapon]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randons Gamers
Junior Member
Join Date: Feb 2014
Old 07-25-2014 , 16:06   [Equip Hat, No Weapon]
Reply With Quote #1

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
Randons Gamers is offline
 



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 21:59.


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