Advertisement
Guest User

Untitled

a guest
Jan 13th, 2013
1,239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 48.57 KB | None | 0 0
  1. /*==============================================================================
  2.                 SetPlayerAttachedObject script by Richie©
  3.                  Based on the Attachments script by h02
  4. ==============================================================================*/
  5. #include <a_samp>
  6. #include <zcmd>
  7. #include <a_mysql>
  8. //============================ Database info ===================================
  9. #define SQL_HOST                "127.0.0.1"
  10. #define SQL_USER                "root"
  11. #define SQL_PASS                ""
  12. #define SQL_DB                  "database"
  13. //==============================================================================
  14. #define DIALOG_ATTACH_INDEX             2200 // DialogID
  15. #define DIALOG_ATTACH_INDEX_SELECTION   DIALOG_ATTACH_INDEX+1
  16. #define DIALOG_ATTACH_EDITREPLACE       DIALOG_ATTACH_INDEX+2
  17. #define DIALOG_ATTACH_MODEL_SELECTION   DIALOG_ATTACH_INDEX+3
  18. #define DIALOG_ATTACH_BONE_SELECTION    DIALOG_ATTACH_INDEX+4
  19. #define SETHOLDDIALOG                   DIALOG_ATTACH_INDEX+5
  20. #define HOLDMENU3E                      DIALOG_ATTACH_INDEX+6
  21. #define HOLDADDDIALOG                   DIALOG_ATTACH_INDEX+7
  22.  
  23.  
  24. enum _spao
  25. {
  26.     pUserName[24],
  27.     pmodel[10],
  28.     pbone[10],
  29.     Float:pfX[10],
  30.     Float:pfY[10],
  31.     Float:pfZ[10],
  32.     Float:prX[10],
  33.     Float:prY[10],
  34.     Float:prZ[10],
  35.     Float:psX[10],
  36.     Float:psY[10],
  37.     Float:psZ[10],
  38.     pUsingSlot[10]
  39. }
  40.  
  41. new PlayerAttatchedObjects[MAX_PLAYERS][_spao];
  42. new gConnectionhandle;
  43.  
  44. enum AttachmentEnum
  45. {
  46.     attachmodel,
  47.     attachname[24]
  48. }
  49.  
  50. new AttachmentObjects[][AttachmentEnum] = {
  51. {18632, "FishingRod"},
  52. {18633, "GTASAWrench1"},
  53. {18634, "GTASACrowbar1"},
  54. {18635, "GTASAHammer1"},
  55. {18636, "PoliceCap1"},
  56. {18637, "PoliceShield1"},
  57. {18638, "HardHat1"},
  58. {18639, "BlackHat1"},
  59. {18640, "Hair1"},
  60. {18975, "Hair2"},
  61. {19136, "Hair4"},
  62. {19274, "Hair5"},
  63. {18641, "Flashlight1"},
  64. {18642, "Taser1"},
  65. {18643, "LaserPointer Red"},
  66. {19080, "LaserPointer Blue"},
  67. {19081, "LaserPointer Pink"},
  68. {19082, "LaserPointer Orange"},
  69. {19083, "LaserPointer Green"},
  70. {19084, "LaserPointer Yellow"},
  71. {18644, "Screwdriver1"},
  72. {18645, "MotorcycleHelmet1"},
  73. {18865, "MobilePhone1"},
  74. {18866, "MobilePhone2"},
  75. {18867, "MobilePhone3"},
  76. {18868, "MobilePhone4"},
  77. {18869, "MobilePhone5"},
  78. {18870, "MobilePhone6"},
  79. {18871, "MobilePhone7"},
  80. {18872, "MobilePhone8"},
  81. {18873, "MobilePhone9"},
  82. {18874, "MobilePhone10"},
  83. {18875, "Pager1"},
  84. {18890, "Rake1"},
  85. {18891, "Bandana1"},
  86. {18892, "Bandana2"},
  87. {18893, "Bandana3"},
  88. {18894, "Bandana4"},
  89. {18895, "Bandana5"},
  90. {18896, "Bandana6"},
  91. {18897, "Bandana7"},
  92. {18898, "Bandana8"},
  93. {18899, "Bandana9"},
  94. {18900, "Bandana10"},
  95. {18901, "Bandana11"},
  96. {18902, "Bandana12"},
  97. {18903, "Bandana13"},
  98. {18904, "Bandana14"},
  99. {18905, "Bandana15"},
  100. {18906, "Bandana16"},
  101. {18907, "Bandana17"},
  102. {18908, "Bandana18"},
  103. {18909, "Bandana19"},
  104. {18910, "Bandana20"},
  105. {18911, "Mask1"},
  106. {18912, "Mask2"},
  107. {18913, "Mask3"},
  108. {18914, "Mask4"},
  109. {18915, "Mask5"},
  110. {18916, "Mask6"},
  111. {18917, "Mask7"},
  112. {18918, "Mask8"},
  113. {18919, "Mask9"},
  114. {18920, "Mask10"},
  115. {18921, "Beret1"},
  116. {18922, "Beret2"},
  117. {18923, "Beret3"},
  118. {18924, "Beret4"},
  119. {18925, "Beret5"},
  120. {18926, "Hat1"},
  121. {18927, "Hat2"},
  122. {18928, "Hat3"},
  123. {18929, "Hat4"},
  124. {18930, "Hat5"},
  125. {18931, "Hat6"},
  126. {18932, "Hat7"},
  127. {18933, "Hat8"},
  128. {18934, "Hat9"},
  129. {18935, "Hat10"},
  130. {18936, "Helmet1"},
  131. {18937, "Helmet2"},
  132. {18938, "Helmet3"},
  133. {18939, "CapBack1"},
  134. {18940, "CapBack2"},
  135. {18941, "CapBack3"},
  136. {18942, "CapBack4"},
  137. {18943, "CapBack5"},
  138. {18944, "HatBoater1"},
  139. {18945, "HatBoater2"},
  140. {18946, "HatBoater3"},
  141. {18947, "HatBowler1"},
  142. {18948, "HatBowler2"},
  143. {18949, "HatBowler3"},
  144. {18950, "HatBowler4"},
  145. {18951, "HatBowler5"},
  146. {18952, "BoxingHelmet1"},
  147. {18953, "CapKnit1"},
  148. {18954, "CapKnit2"},
  149. {18955, "CapOverEye1"},
  150. {18956, "CapOverEye2"},
  151. {18957, "CapOverEye3"},
  152. {18958, "CapOverEye4"},
  153. {18959, "CapOverEye5"},
  154. {18960, "CapRimUp1"},
  155. {18961, "CapTrucker1"},
  156. {18962, "CowboyHat2"},
  157. {18963, "CJElvisHead"},
  158. {18964, "SkullyCap1"},
  159. {18965, "SkullyCap2"},
  160. {18966, "SkullyCap3"},
  161. {18967, "HatMan1"},
  162. {18968, "HatMan2"},
  163. {18969, "HatMan3"},
  164. {18970, "HatTiger1"},
  165. {18971, "HatCool1"},
  166. {18972, "HatCool2"},
  167. {18973, "HatCool3"},
  168. {18974, "MaskZorro1"},
  169. {18976, "MotorcycleHelmet2"},
  170. {18977, "MotorcycleHelmet3"},
  171. {18978, "MotorcycleHelmet4"},
  172. {18979, "MotorcycleHelmet5"},
  173. {19006, "GlassesType1"},
  174. {19007, "GlassesType2"},
  175. {19008, "GlassesType3"},
  176. {19009, "GlassesType4"},
  177. {19010, "GlassesType5"},
  178. {19011, "GlassesType6"},
  179. {19012, "GlassesType7"},
  180. {19013, "GlassesType8"},
  181. {19014, "GlassesType9"},
  182. {19015, "GlassesType10"},
  183. {19016, "GlassesType11"},
  184. {19017, "GlassesType12"},
  185. {19018, "GlassesType13"},
  186. {19019, "GlassesType14"},
  187. {19020, "GlassesType15"},
  188. {19021, "GlassesType16"},
  189. {19022, "GlassesType17"},
  190. {19023, "GlassesType18"},
  191. {19024, "GlassesType19"},
  192. {19025, "GlassesType20"},
  193. {19026, "GlassesType21"},
  194. {19027, "GlassesType22"},
  195. {19028, "GlassesType23"},
  196. {19029, "GlassesType24"},
  197. {19030, "GlassesType25"},
  198. {19031, "GlassesType26"},
  199. {19032, "GlassesType27"},
  200. {19033, "GlassesType28"},
  201. {19034, "GlassesType29"},
  202. {19035, "GlassesType30"},
  203. {19036, "HockeyMask1"},
  204. {19037, "HockeyMask2"},
  205. {19038, "HockeyMask3"},
  206. {19039, "WatchType1"},
  207. {19040, "WatchType2"},
  208. {19041, "WatchType3"},
  209. {19042, "WatchType4"},
  210. {19043, "WatchType5"},
  211. {19044, "WatchType6"},
  212. {19045, "WatchType7"},
  213. {19046, "WatchType8"},
  214. {19047, "WatchType9"},
  215. {19048, "WatchType10"},
  216. {19049, "WatchType11"},
  217. {19050, "WatchType12"},
  218. {19051, "WatchType13"},
  219. {19052, "WatchType14"},
  220. {19053, "WatchType15"},
  221. {19085, "EyePatch1"},
  222. {19086, "ChainsawDildo1"},
  223. {19090, "PomPomBlue"},
  224. {19091, "PomPomRed"},
  225. {19092, "PomPomGreen"},
  226. {19093, "HardHat2"},
  227. {19094, "BurgerShotHat1"},
  228. {19095, "CowboyHat1"},
  229. {19096, "CowboyHat3"},
  230. {19097, "CowboyHat4"},
  231. {19098, "CowboyHat5"},
  232. {19099, "PoliceCap2"},
  233. {19100, "PoliceCap3"},
  234. {19101, "ArmyHelmet1"},
  235. {19102, "ArmyHelmet2"},
  236. {19103, "ArmyHelmet3"},
  237. {19104, "ArmyHelmet4"},
  238. {19105, "ArmyHelmet5"},
  239. {19106, "ArmyHelmet6"},
  240. {19107, "ArmyHelmet7"},
  241. {19108, "ArmyHelmet8"},
  242. {19109, "ArmyHelmet9"},
  243. {19110, "ArmyHelmet10"},
  244. {19111, "ArmyHelmet11"},
  245. {19112, "ArmyHelmet12"},
  246. {19113, "SillyHelmet1"},
  247. {19114, "SillyHelmet2"},
  248. {19115, "SillyHelmet3"},
  249. {19116, "PlainHelmet1"},
  250. {19117, "PlainHelmet2"},
  251. {19118, "PlainHelmet3"},
  252. {19119, "PlainHelmet4"},
  253. {19120, "PlainHelmet5"},
  254. {19137, "CluckinBellHat1"},
  255. {19138, "PoliceGlasses1"},
  256. {19139, "PoliceGlasses2"},
  257. {19140, "PoliceGlasses3"},
  258. {19141, "SWATHelmet1"},
  259. {19142, "SWATArmour1"},
  260. {19160, "HardHat3"},
  261. {19161, "PoliceHat1"},
  262. {19162, "PoliceHat2"},
  263. {19163, "GimpMask1"},
  264. {19317, "bassguitar01"},
  265. {19318, "flyingv01"},
  266. {19319, "warlock01"},
  267. {19330, "fire_hat01"},
  268. {19331, "fire_hat02"},
  269. {19346, "hotdog01"},
  270. {19347, "badge01"},
  271. {19348, "cane01"},
  272. {19349, "monocle01"},
  273. {19350, "moustache01"},
  274. {19351, "moustache02"},
  275. {19352, "tophat01"},
  276. {19487, "tophat02"},
  277. {19472, "gasmask01"},
  278. {19421, "headphones01"},
  279. {19422, "headphones02"},
  280. {19423, "headphones03"},
  281. {19424, "headphones04"}
  282. };
  283.  
  284. new AttachmentBones[][24] = {
  285. {"Spine"},
  286. {"Head"},
  287. {"Left upper arm"},
  288. {"Right upper arm"},
  289. {"Left hand"},
  290. {"Right hand"},
  291. {"Left thigh"},
  292. {"Right thigh"},
  293. {"Left foot"},
  294. {"Right foot"},
  295. {"Right calf"},
  296. {"Left calf"},
  297. {"Left forearm"},
  298. {"Right forearm"},
  299. {"Left clavicle"},
  300. {"Right clavicle"},
  301. {"Neck"},
  302. {"Jaw"}
  303. };
  304.  
  305. public OnFilterScriptInit()
  306. {
  307.     mysql_debug(0);
  308.     gConnectionhandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
  309.    
  310.     print("\n========================================");
  311.     print("   Attached Objects Script by Richie©");
  312.     print("========================================\n");
  313.    
  314.     new query[450];
  315.    
  316.     format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `PlayerObjects` (`Name` varchar(24) NOT NULL, `Slot` int(11) NOT NULL, `model` int(11) NOT NULL, \
  317.     `bone` int(11) NOT NULL, `fX` float NOT NULL, `fY` float NOT NULL, `fZ` float NOT NULL, `rX` float NOT NULL, `rY` float NOT NULL, `rZ` float NOT NULL, \
  318.     `sX` float NOT NULL, `sY` float NOT NULL, `sZ` float NOT NULL, `Enabled` int(11) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1");
  319.    
  320.     mysql_function_query(gConnectionhandle, query, false, "NoReturnThreads", "");
  321.     return 1;
  322. }
  323.  
  324. public OnPlayerConnect(playerid)
  325. {
  326.     ResetHoldObjects(playerid);
  327.     SetTimerEx( "InitializePlayerObjects", 500, 0, "i", playerid );
  328.     return 1;
  329. }
  330.  
  331. public OnPlayerSpawn(playerid)
  332. {
  333.     SetPlayerObjects(playerid);
  334.     return 1;
  335. }
  336.  
  337. public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
  338.                                    Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
  339.                                    Float:fRotX, Float:fRotY, Float:fRotZ,
  340.                                    Float:fScaleX, Float:fScaleY, Float:fScaleZ )
  341. {
  342.     SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Editing of object done.");
  343.     SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
  344.  
  345.     PlayerAttatchedObjects[playerid][pmodel][index] = modelid;
  346.     PlayerAttatchedObjects[playerid][pbone][index] = boneid;
  347.     PlayerAttatchedObjects[playerid][pfX][index] = fOffsetX;
  348.     PlayerAttatchedObjects[playerid][pfY][index] = fOffsetY;
  349.     PlayerAttatchedObjects[playerid][pfZ][index] = fOffsetZ;
  350.     PlayerAttatchedObjects[playerid][prX][index] = fRotX;
  351.     PlayerAttatchedObjects[playerid][prY][index] = fRotY;
  352.     PlayerAttatchedObjects[playerid][prZ][index] = fRotZ;
  353.     PlayerAttatchedObjects[playerid][psX][index] = fScaleX;
  354.     PlayerAttatchedObjects[playerid][psY][index] = fScaleY;
  355.     PlayerAttatchedObjects[playerid][psZ][index] = fScaleZ;
  356.     PlayerAttatchedObjects[playerid][pUsingSlot][index] = 1;
  357.  
  358.     SavePObjects(playerid, index);
  359.     return 1;
  360. }
  361.  
  362. public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
  363. {
  364.     if(type == SELECT_OBJECT_PLAYER_OBJECT)
  365.     {
  366.         EditPlayerObject(playerid, objectid);
  367.     }
  368.     return 1;
  369. }
  370.  
  371. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) //New Dialog response
  372. {
  373.     switch(dialogid)
  374.     {
  375.         case DIALOG_ATTACH_INDEX_SELECTION:
  376.         {
  377.             if(response)
  378.             {
  379.                 if(IsPlayerAttachedObjectSlotUsed(playerid, listitem))
  380.                 {
  381.                     ShowPlayerDialog(playerid, DIALOG_ATTACH_EDITREPLACE, DIALOG_STYLE_MSGBOX, "{FF0000}Attachment Modification", "Do you wish to edit the attachment in that slot, or delete it?", "Edit", "Delete");
  382.                 }
  383.                 else
  384.                 {
  385.                     new bigstring[4050];
  386.                     for(new x;x<sizeof(AttachmentObjects);x++)
  387.                     {
  388.                         format(bigstring, sizeof(bigstring), "%s%s\n", bigstring, AttachmentObjects[x][attachname]);
  389.                     }
  390.                     ShowPlayerDialog(playerid, DIALOG_ATTACH_MODEL_SELECTION, DIALOG_STYLE_LIST, \
  391.                     "{FF0000}Attachment Modification - Model Selection", bigstring, "Select", "Cancel");
  392.                 }
  393.                 SetPVarInt(playerid, "AttachmentIndexSel", listitem);
  394.             }
  395.             else ShowPlayerDialog(playerid, HOLDMENU3E, DIALOG_STYLE_LIST, "{F42626}Set or Edit", "Wear/Take off one of your items \nAdd/Replace items \nEdit items", "Select", "Cancel");
  396.         }
  397.         case DIALOG_ATTACH_EDITREPLACE:
  398.         {
  399.             if(response) EditAttachedObject(playerid, GetPVarInt(playerid, "AttachmentIndexSel"));
  400.             else
  401.             {
  402.                 RemovePlayerAttachedObject(playerid, GetPVarInt(playerid, "AttachmentIndexSel"));
  403.                 PlayerAttatchedObjects[playerid][pmodel][GetPVarInt(playerid, "AttachmentIndexSel")] = 0;
  404.                 SavePObjects(playerid, GetPVarInt(playerid, "AttachmentIndexSel"));
  405.             }
  406.             DeletePVar(playerid, "AttachmentIndexSel");
  407.         }
  408.         case DIALOG_ATTACH_MODEL_SELECTION:
  409.         {
  410.             if(response)
  411.             {
  412.                 SetPVarInt(playerid, "AttachmentModelSel", AttachmentObjects[listitem][attachmodel]);
  413.                 new holdstring[260];
  414.                 for(new x;x<sizeof(AttachmentBones);x++)
  415.                 {
  416.                     format(holdstring, sizeof(holdstring), "%s%s\n", holdstring, AttachmentBones[x]);
  417.                 }
  418.                 ShowPlayerDialog(playerid, DIALOG_ATTACH_BONE_SELECTION, DIALOG_STYLE_LIST, "{FF0000}Attachment Modification - Bone Selection", holdstring, "Select", "Cancel");
  419.             }
  420.             else DeletePVar(playerid, "AttachmentIndexSel");
  421.         }
  422.         case DIALOG_ATTACH_BONE_SELECTION:
  423.         {
  424.             if(response)
  425.             {
  426.                 SetPlayerAttachedObject(playerid, GetPVarInt(playerid, "AttachmentIndexSel"), GetPVarInt(playerid, "AttachmentModelSel"), listitem+1);
  427.                 EditAttachedObject(playerid, GetPVarInt(playerid, "AttachmentIndexSel"));
  428.                 SendClientMessage(playerid, 0xFFFFFFFF, "Hint: Use {FFFF00}~k~~PED_SPRINT~{FFFFFF} to look around.");
  429.             }
  430.             DeletePVar(playerid, "AttachmentIndexSel");
  431.             DeletePVar(playerid, "AttachmentModelSel");
  432.         }
  433.         case HOLDADDDIALOG:
  434.         {
  435.             new stringb[4050];
  436.             if(!response) return ShowPlayerDialog(playerid, HOLDMENU3E, DIALOG_STYLE_LIST, "{F42626}Set or Edit", "Wear/Take off one of your items \nAdd/Replace items \nEdit items", "Select", "Cancel");
  437.             for(new x;x<sizeof(AttachmentObjects);x++)
  438.             {
  439.                 format(stringb, sizeof(stringb), "%s%s\n", stringb, AttachmentObjects[x][attachname]);
  440.             }
  441.             ShowPlayerDialog(playerid, DIALOG_ATTACH_MODEL_SELECTION, DIALOG_STYLE_LIST, \
  442.             "{FF0000}Attachment Modification - Model Selection", stringb, "Select", "Cancel");
  443.             SetPVarInt(playerid, "AttachmentIndexSel", listitem);
  444.         }
  445.         case HOLDMENU3E:
  446.         {
  447.             if(!response) return 1;
  448.             switch(listitem)
  449.             {
  450.                 case 0: // Choose the ones they set
  451.                 {
  452.                     new holdstring[800];
  453.                     for(new x;x<MAX_PLAYER_ATTACHED_OBJECTS;x++)
  454.                     {
  455.                         new model = PlayerAttatchedObjects[playerid][pmodel][x];
  456.                         if(PlayerAttatchedObjects[playerid][pmodel][x] > 18000)
  457.                         {
  458.                             if(IsPlayerAttachedObjectSlotUsed(playerid, x)) format(holdstring, sizeof(holdstring), "%sSlot: %d Item: %s {43D017}(Used){FFFFFF}\n", holdstring, x, GetAttachedModelName(model));
  459.                             else format(holdstring, sizeof(holdstring), "%sSlot: %d Item: %s\n", holdstring, x, GetAttachedModelName(model));
  460.                         }
  461.                         else format(holdstring, sizeof(holdstring), "%sSlot: %d Item: None\n", holdstring, x);
  462.                     }
  463.                     ShowPlayerDialog(playerid, SETHOLDDIALOG, DIALOG_STYLE_LIST, \
  464.                     "{FF0000}Set Attachment - Slot Selection", holdstring, "Select", "Back");
  465.                 }
  466.                 case 1: // Add new object
  467.                 {
  468.                     new holdstring[800];
  469.                     for(new x;x<MAX_PLAYER_ATTACHED_OBJECTS;x++)
  470.                     {
  471.                         new model = PlayerAttatchedObjects[playerid][pmodel][x];
  472.                         if(PlayerAttatchedObjects[playerid][pmodel][x] > 18000) format(holdstring, sizeof(holdstring), "%sSlot: %d Item: %s\n", holdstring, x, GetAttachedModelName(model));
  473.                         else format(holdstring, sizeof(holdstring), "%sSlot: %d Item: None\n", holdstring, x);
  474.                     }
  475.                     ShowPlayerDialog(playerid, HOLDADDDIALOG, DIALOG_STYLE_LIST, \
  476.                     "{FF0000}Add/Replace Attachment - Slot Selection", holdstring, "Select", "Back");
  477.                 }
  478.                 case 2: // Edit their objects
  479.                 {
  480.                     new holdstring[300];
  481.                     for(new x;x<MAX_PLAYER_ATTACHED_OBJECTS;x++)
  482.                     {
  483.                         if(IsPlayerAttachedObjectSlotUsed(playerid, x))
  484.                         {
  485.                             new model = PlayerAttatchedObjects[playerid][pmodel][x];
  486.                             format(holdstring, sizeof(holdstring), "%sSlot: %d Item: %s (Used)\n", holdstring, x, GetAttachedModelName(model));
  487.                         }
  488.                         else
  489.                         {
  490.                             if(PlayerAttatchedObjects[playerid][pmodel][x] > 18000)
  491.                             {
  492.                                 new model = PlayerAttatchedObjects[playerid][pmodel][x];
  493.                                 format(holdstring, sizeof(holdstring), "%sSlot: %d Item: %s\n", holdstring, x, GetAttachedModelName(model));
  494.                             }
  495.                             else format(holdstring, sizeof(holdstring), "%sSlot: %d Item: None\n", holdstring, x);
  496.                         }
  497.                     }
  498.                     ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST, \
  499.                     "{FF0000}Attachment Modification - Slot Selection", holdstring, "Select", "Back");
  500.                 }
  501.             }
  502.         }
  503.         case SETHOLDDIALOG:
  504.         {
  505.             if(!response) return ShowPlayerDialog(playerid, HOLDMENU3E, DIALOG_STYLE_LIST, "{F42626}Set or Edit", "Wear/Take off one of your items \nAdd/Replace items \nEdit items", "Select", "Cancel");
  506.             switch(listitem)
  507.             {
  508.                 case 0:
  509.                 {
  510.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][0] == 0)
  511.                     {
  512.                         SetPlayerAttachedObject(playerid, 0, PlayerAttatchedObjects[playerid][pmodel][0], PlayerAttatchedObjects[playerid][pbone][0], PlayerAttatchedObjects[playerid][pfX][0], PlayerAttatchedObjects[playerid][pfY][0], PlayerAttatchedObjects[playerid][pfZ][0],
  513.                         PlayerAttatchedObjects[playerid][prX][0], PlayerAttatchedObjects[playerid][prY][0], PlayerAttatchedObjects[playerid][prZ][0], PlayerAttatchedObjects[playerid][psX][0], PlayerAttatchedObjects[playerid][psY][0], PlayerAttatchedObjects[playerid][psZ][0]);
  514.                         PlayerAttatchedObjects[playerid][pUsingSlot][0] = 1;
  515.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  516.                     }
  517.                     else
  518.                     {
  519.                         RemovePlayerAttachedObject(playerid, 0);
  520.                         PlayerAttatchedObjects[playerid][pUsingSlot][0] = 0;
  521.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  522.                     }
  523.                     SavePObjects(playerid, 0);
  524.                 }
  525.                 case 1:
  526.                 {
  527.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][1] == 0)
  528.                     {
  529.                         SetPlayerAttachedObject(playerid, 1, PlayerAttatchedObjects[playerid][pmodel][1], PlayerAttatchedObjects[playerid][pbone][1], PlayerAttatchedObjects[playerid][pfX][1], PlayerAttatchedObjects[playerid][pfY][1], PlayerAttatchedObjects[playerid][pfZ][1],
  530.                         PlayerAttatchedObjects[playerid][prX][1], PlayerAttatchedObjects[playerid][prY][1], PlayerAttatchedObjects[playerid][prZ][1], PlayerAttatchedObjects[playerid][psX][1], PlayerAttatchedObjects[playerid][psY][1], PlayerAttatchedObjects[playerid][psZ][1]);
  531.                         PlayerAttatchedObjects[playerid][pUsingSlot][1] = 1;
  532.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  533.                     }
  534.                     else
  535.                     {
  536.                         RemovePlayerAttachedObject(playerid, 1);
  537.                         PlayerAttatchedObjects[playerid][pUsingSlot][1] = 0;
  538.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  539.                     }
  540.                     SavePObjects(playerid, 1);
  541.                 }
  542.                 case 2:
  543.                 {
  544.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][2] == 0)
  545.                     {
  546.                         SetPlayerAttachedObject(playerid, 2, PlayerAttatchedObjects[playerid][pmodel][2], PlayerAttatchedObjects[playerid][pbone][2], PlayerAttatchedObjects[playerid][pfX][2], PlayerAttatchedObjects[playerid][pfY][2], PlayerAttatchedObjects[playerid][pfZ][2],
  547.                         PlayerAttatchedObjects[playerid][prX][2], PlayerAttatchedObjects[playerid][prY][2], PlayerAttatchedObjects[playerid][prZ][2], PlayerAttatchedObjects[playerid][psX][2], PlayerAttatchedObjects[playerid][psY][2], PlayerAttatchedObjects[playerid][psZ][2]);
  548.                         PlayerAttatchedObjects[playerid][pUsingSlot][2] = 1;
  549.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  550.                     }
  551.                     else
  552.                     {
  553.                         RemovePlayerAttachedObject(playerid, 2);
  554.                         PlayerAttatchedObjects[playerid][pUsingSlot][2] = 0;
  555.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  556.                     }
  557.                     SavePObjects(playerid, 2);
  558.                 }
  559.                 case 3:
  560.                 {
  561.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][3] == 0)
  562.                     {
  563.                         SetPlayerAttachedObject(playerid, 3, PlayerAttatchedObjects[playerid][pmodel][3], PlayerAttatchedObjects[playerid][pbone][3], PlayerAttatchedObjects[playerid][pfX][3], PlayerAttatchedObjects[playerid][pfY][3], PlayerAttatchedObjects[playerid][pfZ][3],
  564.                         PlayerAttatchedObjects[playerid][prX][3], PlayerAttatchedObjects[playerid][prY][3], PlayerAttatchedObjects[playerid][prZ][3], PlayerAttatchedObjects[playerid][psX][3], PlayerAttatchedObjects[playerid][psY][3], PlayerAttatchedObjects[playerid][psZ][3]);
  565.                         PlayerAttatchedObjects[playerid][pUsingSlot][3] = 1;
  566.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  567.                     }
  568.                     else
  569.                     {
  570.                         RemovePlayerAttachedObject(playerid, 3);
  571.                         PlayerAttatchedObjects[playerid][pUsingSlot][3] = 0;
  572.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  573.                     }
  574.                     SavePObjects(playerid, 3);
  575.                 }
  576.                 case 4:
  577.                 {
  578.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][4] == 0)
  579.                     {
  580.                         SetPlayerAttachedObject(playerid, 4, PlayerAttatchedObjects[playerid][pmodel][4], PlayerAttatchedObjects[playerid][pbone][4], PlayerAttatchedObjects[playerid][pfX][4], PlayerAttatchedObjects[playerid][pfY][4], PlayerAttatchedObjects[playerid][pfZ][4],
  581.                         PlayerAttatchedObjects[playerid][prX][4], PlayerAttatchedObjects[playerid][prY][4], PlayerAttatchedObjects[playerid][prZ][4], PlayerAttatchedObjects[playerid][psX][4], PlayerAttatchedObjects[playerid][psY][4], PlayerAttatchedObjects[playerid][psZ][4]);
  582.                         PlayerAttatchedObjects[playerid][pUsingSlot][4] = 1;
  583.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  584.                     }
  585.                     else
  586.                     {
  587.                         RemovePlayerAttachedObject(playerid, 4);
  588.                         PlayerAttatchedObjects[playerid][pUsingSlot][4] = 0;
  589.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  590.                     }
  591.                     SavePObjects(playerid, 4);
  592.                 }
  593.                 case 5:
  594.                 {
  595.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][5] == 0)
  596.                     {
  597.                         SetPlayerAttachedObject(playerid, 5, PlayerAttatchedObjects[playerid][pmodel][5], PlayerAttatchedObjects[playerid][pbone][5], PlayerAttatchedObjects[playerid][pfX][5], PlayerAttatchedObjects[playerid][pfY][5], PlayerAttatchedObjects[playerid][pfZ][5],
  598.                         PlayerAttatchedObjects[playerid][prX][5], PlayerAttatchedObjects[playerid][prY][5], PlayerAttatchedObjects[playerid][prZ][5], PlayerAttatchedObjects[playerid][psX][5], PlayerAttatchedObjects[playerid][psY][5], PlayerAttatchedObjects[playerid][psZ][5]);
  599.                         PlayerAttatchedObjects[playerid][pUsingSlot][5] = 1;
  600.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  601.                     }
  602.                     else
  603.                     {
  604.                         RemovePlayerAttachedObject(playerid, 5);
  605.                         PlayerAttatchedObjects[playerid][pUsingSlot][5] = 0;
  606.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  607.                     }
  608.                     SavePObjects(playerid, 5);
  609.                 }
  610.                 case 6:
  611.                 {
  612.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][6] == 0)
  613.                     {
  614.                         SetPlayerAttachedObject(playerid, 6, PlayerAttatchedObjects[playerid][pmodel][6], PlayerAttatchedObjects[playerid][pbone][6], PlayerAttatchedObjects[playerid][pfX][6], PlayerAttatchedObjects[playerid][pfY][6], PlayerAttatchedObjects[playerid][pfZ][6],
  615.                         PlayerAttatchedObjects[playerid][prX][6], PlayerAttatchedObjects[playerid][prY][6], PlayerAttatchedObjects[playerid][prZ][6], PlayerAttatchedObjects[playerid][psX][6], PlayerAttatchedObjects[playerid][psY][6], PlayerAttatchedObjects[playerid][psZ][6]);
  616.                         PlayerAttatchedObjects[playerid][pUsingSlot][6] = 1;
  617.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  618.                     }
  619.                     else
  620.                     {
  621.                         RemovePlayerAttachedObject(playerid, 6);
  622.                         PlayerAttatchedObjects[playerid][pUsingSlot][6] = 0;
  623.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  624.                     }
  625.                     SavePObjects(playerid, 6);
  626.                 }
  627.                 case 7:
  628.                 {
  629.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][7] == 0)
  630.                     {
  631.                         SetPlayerAttachedObject(playerid, 7, PlayerAttatchedObjects[playerid][pmodel][7], PlayerAttatchedObjects[playerid][pbone][7], PlayerAttatchedObjects[playerid][pfX][7], PlayerAttatchedObjects[playerid][pfY][7], PlayerAttatchedObjects[playerid][pfZ][7],
  632.                         PlayerAttatchedObjects[playerid][prX][7], PlayerAttatchedObjects[playerid][prY][7], PlayerAttatchedObjects[playerid][prZ][7], PlayerAttatchedObjects[playerid][psX][7], PlayerAttatchedObjects[playerid][psY][7], PlayerAttatchedObjects[playerid][psZ][7]);
  633.                         PlayerAttatchedObjects[playerid][pUsingSlot][7] = 1;
  634.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  635.                     }
  636.                     else
  637.                     {
  638.                         RemovePlayerAttachedObject(playerid, 7);
  639.                         PlayerAttatchedObjects[playerid][pUsingSlot][7] = 0;
  640.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  641.                     }
  642.                     SavePObjects(playerid, 7);
  643.                 }
  644.                 case 8:
  645.                 {
  646.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][8] == 0)
  647.                     {
  648.                         SetPlayerAttachedObject(playerid, 8, PlayerAttatchedObjects[playerid][pmodel][8], PlayerAttatchedObjects[playerid][pbone][8], PlayerAttatchedObjects[playerid][pfX][8], PlayerAttatchedObjects[playerid][pfY][8], PlayerAttatchedObjects[playerid][pfZ][8],
  649.                         PlayerAttatchedObjects[playerid][prX][8], PlayerAttatchedObjects[playerid][prY][8], PlayerAttatchedObjects[playerid][prZ][8], PlayerAttatchedObjects[playerid][psX][8], PlayerAttatchedObjects[playerid][psY][8], PlayerAttatchedObjects[playerid][psZ][8]);
  650.                         PlayerAttatchedObjects[playerid][pUsingSlot][8] = 1;
  651.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  652.                     }
  653.                     else
  654.                     {
  655.                         RemovePlayerAttachedObject(playerid, 8);
  656.                         PlayerAttatchedObjects[playerid][pUsingSlot][8] = 0;
  657.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  658.                     }
  659.                     SavePObjects(playerid, 8);
  660.                 }
  661.                 case 9:
  662.                 {
  663.                     if(PlayerAttatchedObjects[playerid][pUsingSlot][9] == 0)
  664.                     {
  665.                         SetPlayerAttachedObject(playerid, 9, PlayerAttatchedObjects[playerid][pmodel][9], PlayerAttatchedObjects[playerid][pbone][9], PlayerAttatchedObjects[playerid][pfX][9], PlayerAttatchedObjects[playerid][pfY][9], PlayerAttatchedObjects[playerid][pfZ][9],
  666.                         PlayerAttatchedObjects[playerid][prX][9], PlayerAttatchedObjects[playerid][prY][9], PlayerAttatchedObjects[playerid][prZ][9], PlayerAttatchedObjects[playerid][psX][9], PlayerAttatchedObjects[playerid][psY][9], PlayerAttatchedObjects[playerid][psZ][9]);
  667.                         PlayerAttatchedObjects[playerid][pUsingSlot][9] = 1;
  668.                         GameTextForPlayer(playerid, "Item placed", 1200, 3);
  669.                     }
  670.                     else
  671.                     {
  672.                         RemovePlayerAttachedObject(playerid, 9);
  673.                         PlayerAttatchedObjects[playerid][pUsingSlot][9] = 0;
  674.                         SendClientMessage(playerid, -1, "{0BDDC4}[Hold Objects]{FFFFFF} Item removed! To permanently delete it, use edit items.");
  675.                     }
  676.                     SavePObjects(playerid, 9);
  677.                 }
  678.             }
  679.         }
  680.     }
  681.     return 1;
  682. }
  683.  
  684. forward InitializePlayerObjects(playerid);
  685. public InitializePlayerObjects(playerid)
  686. {
  687.     new Query[160];
  688.     mysql_format(gConnectionhandle, Query, "SELECT * FROM `PlayerObjects` WHERE `Name` = '%s' LIMIT 10", pName(playerid));
  689.     mysql_function_query(gConnectionhandle, Query, true, "OnPlayerObjectsLoad", "d", playerid);
  690. }
  691.  
  692. CMD:playerobjects(playerid, params[])
  693. {
  694.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{F42626}[Info]{FFFFFF}You need to leave the vehicle to use this command!");
  695.     ShowPlayerDialog(playerid, HOLDMENU3E, DIALOG_STYLE_LIST, "{F42626}Set or Edit", "Wear/Take off one of your items \nAdd/Replace items \nEdit items", "Select", "Cancel");
  696.     return 1;
  697. }
  698.  
  699. /*==============================================================================
  700.     Use InitializePlayerObjects(playerid); where player info is beeing loaded
  701. ==============================================================================*/
  702. forward OnPlayerObjectsLoad(playerid);
  703. public OnPlayerObjectsLoad(playerid)
  704. {
  705.     if(IsPlayerConnected(playerid))
  706.     {
  707.         new rows, fields;
  708.         cache_get_data(rows, fields);
  709.         if(!rows)
  710.         {
  711.             new EscName[MAX_PLAYER_NAME], Query[160];
  712.             mysql_real_escape_string(pName(playerid), EscName);
  713.             for(new i = 0; i < 10; i++)
  714.             {
  715.                 format(Query, sizeof(Query), "INSERT INTO `PlayerObjects` (`Name`, `Slot`) VALUES ('%s', %d)", EscName, i);
  716.                 mysql_function_query(gConnectionhandle, Query, false, "NoReturnThread", "d", playerid);
  717.  
  718.                 PlayerAttatchedObjects[playerid][pmodel][i] = 0;
  719.                 PlayerAttatchedObjects[playerid][pbone][i] = 0;
  720.                 PlayerAttatchedObjects[playerid][pfX][i] = 0;
  721.                 PlayerAttatchedObjects[playerid][pfY][i] = 0;
  722.                 PlayerAttatchedObjects[playerid][pfZ][i] = 0;
  723.                 PlayerAttatchedObjects[playerid][prX][i] = 0;
  724.                 PlayerAttatchedObjects[playerid][prY][i] = 0;
  725.                 PlayerAttatchedObjects[playerid][prZ][i] = 0;
  726.                 PlayerAttatchedObjects[playerid][psX][i] = 0;
  727.                 PlayerAttatchedObjects[playerid][psY][i] = 0;
  728.                 PlayerAttatchedObjects[playerid][psZ][i] = 0;
  729.                 PlayerAttatchedObjects[playerid][pUsingSlot][i] = 0;
  730.             }
  731.         }
  732.         else
  733.         {
  734.             new Data[50];
  735.             for(new x=0; x<rows; x++)
  736.             {
  737.                 cache_get_field_content(x, "model", Data),                      PlayerAttatchedObjects[playerid][pmodel][x]  = strval(Data);
  738.                 cache_get_field_content(x, "bone", Data),                       PlayerAttatchedObjects[playerid][pbone][x] = strval(Data);
  739.                 cache_get_field_content(x, "fX", Data),                         PlayerAttatchedObjects[playerid][pfX][x] = floatstr(Data);
  740.                 cache_get_field_content(x, "fY", Data),                         PlayerAttatchedObjects[playerid][pfY][x] = floatstr(Data);
  741.                 cache_get_field_content(x, "fZ", Data),                         PlayerAttatchedObjects[playerid][pfZ][x] = floatstr(Data);
  742.                 cache_get_field_content(x, "rX", Data),                         PlayerAttatchedObjects[playerid][prX][x] = floatstr(Data);
  743.                 cache_get_field_content(x, "rY", Data),                         PlayerAttatchedObjects[playerid][prY][x] = floatstr(Data);
  744.                 cache_get_field_content(x, "rZ", Data),                         PlayerAttatchedObjects[playerid][prZ][x] = floatstr(Data);
  745.                 cache_get_field_content(x, "sX", Data),                         PlayerAttatchedObjects[playerid][psX][x] = floatstr(Data);
  746.                 cache_get_field_content(x, "sY", Data),                         PlayerAttatchedObjects[playerid][psY][x] = floatstr(Data);
  747.                 cache_get_field_content(x, "sZ", Data),                         PlayerAttatchedObjects[playerid][psZ][x] = floatstr(Data);
  748.                 cache_get_field_content(x, "Enabled", Data),                    PlayerAttatchedObjects[playerid][pUsingSlot][x] = strval(Data);
  749.             }
  750.         }
  751.     }
  752.     return 1;
  753. }
  754.  
  755. forward NoReturnThreads();
  756. public NoReturnThreads()
  757. {
  758.     return 1;
  759. }
  760.  
  761. /*==============================================================================
  762.                                 Stocks
  763. ===============================================================================*/
  764. stock pName(playerid)
  765. {
  766.     new Name[24];
  767.     GetPlayerName(playerid, Name, sizeof(Name));
  768.     return Name;
  769. }
  770.  
  771. stock SetPlayerObjects(playerid)
  772. {
  773.     for(new i=0; i<10; i++)
  774.     {
  775.         if(PlayerAttatchedObjects[playerid][pmodel][i] > 18000)
  776.         {
  777.             if(PlayerAttatchedObjects[playerid][pUsingSlot][i] == 1)
  778.             {
  779.                 SetPlayerAttachedObject(playerid, i, PlayerAttatchedObjects[playerid][pmodel][i], PlayerAttatchedObjects[playerid][pbone][i], PlayerAttatchedObjects[playerid][pfX][i], PlayerAttatchedObjects[playerid][pfY][i], PlayerAttatchedObjects[playerid][pfZ][i],
  780.                 PlayerAttatchedObjects[playerid][prX][i], PlayerAttatchedObjects[playerid][prY][i], PlayerAttatchedObjects[playerid][prZ][i], PlayerAttatchedObjects[playerid][psX][i], PlayerAttatchedObjects[playerid][psY][i], PlayerAttatchedObjects[playerid][psZ][i]);
  781.             }
  782.         }
  783.     }
  784. }
  785.  
  786. stock SavePObjects(playerid, slotid)
  787. {
  788.     new
  789.         Query[1024], EscName[MAX_PLAYER_NAME];
  790.  
  791.     new index = slotid;
  792.  
  793.     if(index < 10)
  794.     {
  795.         mysql_real_escape_string(pName(playerid), EscName);
  796.  
  797.         format(Query, sizeof(Query), "UPDATE `PlayerObjects` SET `model` = %d, `bone` = %d, `fX` = %f, `fY` = %f, `fZ` = %f, `rX` = %f, `rY` = %f, `rZ` = %f, `sX` = %f, `sY` = %f, `sZ` = %f, `Enabled` = %d WHERE `Name` = '%s' AND `Slot` = %d",
  798.         PlayerAttatchedObjects[playerid][pmodel][index],
  799.         PlayerAttatchedObjects[playerid][pbone][index],
  800.         PlayerAttatchedObjects[playerid][pfX][index],
  801.         PlayerAttatchedObjects[playerid][pfY][index],
  802.         PlayerAttatchedObjects[playerid][pfZ][index],
  803.         PlayerAttatchedObjects[playerid][prX][index],
  804.         PlayerAttatchedObjects[playerid][prY][index],
  805.         PlayerAttatchedObjects[playerid][prZ][index],
  806.         PlayerAttatchedObjects[playerid][psX][index],
  807.         PlayerAttatchedObjects[playerid][psY][index],
  808.         PlayerAttatchedObjects[playerid][psZ][index],
  809.         PlayerAttatchedObjects[playerid][pUsingSlot][index],
  810.         EscName,
  811.         index);
  812.  
  813.         mysql_function_query(gConnectionhandle, Query, false, "NoReturnThreads", "");
  814.     }
  815. }
  816.  
  817. stock ResetHoldObjects(playerid)
  818. {
  819.     for(new i = 0; i < 10; i++)
  820.     {
  821.         PlayerAttatchedObjects[playerid][pmodel][i] = 0;
  822.         PlayerAttatchedObjects[playerid][pbone][i] = 0;
  823.         PlayerAttatchedObjects[playerid][pfX][i] = 0;
  824.         PlayerAttatchedObjects[playerid][pfY][i] = 0;
  825.         PlayerAttatchedObjects[playerid][pfZ][i] = 0;
  826.         PlayerAttatchedObjects[playerid][prX][i] = 0;
  827.         PlayerAttatchedObjects[playerid][prY][i] = 0;
  828.         PlayerAttatchedObjects[playerid][prZ][i] = 0;
  829.         PlayerAttatchedObjects[playerid][psX][i] = 0;
  830.         PlayerAttatchedObjects[playerid][psY][i] = 0;
  831.         PlayerAttatchedObjects[playerid][psZ][i] = 0;
  832.         PlayerAttatchedObjects[playerid][pUsingSlot][i] = 0;
  833.     }
  834. }
  835.  
  836. stock GetAttachedModelName(modelid)
  837. {
  838.     new returnt[64];
  839.     switch(modelid)
  840.     {
  841.         case 18632: { format(returnt,sizeof(returnt),  "FishingRod"); }
  842.         case 18633: { format(returnt,sizeof(returnt),  "GTASAWrench1"); }
  843.         case 18634: { format(returnt,sizeof(returnt),  "GTASACrowbar1"); }
  844.         case 18635: { format(returnt,sizeof(returnt),  "GTASAHammer1"); }
  845.         case 18636: { format(returnt,sizeof(returnt),  "PoliceCap1"); }
  846.         case 18637: { format(returnt,sizeof(returnt),  "PoliceShield1"); }
  847.         case 18638: { format(returnt,sizeof(returnt),  "HardHat1"); }
  848.         case 18639: { format(returnt,sizeof(returnt),  "BlackHat1"); }
  849.         case 18640: { format(returnt,sizeof(returnt),  "Hair1"); }
  850.         case 18975: { format(returnt,sizeof(returnt),  "Hair2"); }
  851.         case 19136: { format(returnt,sizeof(returnt),  "Hair4"); }
  852.         case 19274: { format(returnt,sizeof(returnt),  "Hair5"); }
  853.         case 18641: { format(returnt,sizeof(returnt),  "Flashlight1"); }
  854.         case 18642: { format(returnt,sizeof(returnt),  "Taser1"); }
  855.         case 18643: { format(returnt,sizeof(returnt),  "LaserPointer1"); }
  856.         case 19080: { format(returnt,sizeof(returnt),  "LaserPointer2"); }
  857.         case 19081: { format(returnt,sizeof(returnt),  "LaserPointer3"); }
  858.         case 19082: { format(returnt,sizeof(returnt),  "LaserPointer4"); }
  859.         case 19083: { format(returnt,sizeof(returnt),  "LaserPointer5"); }
  860.         case 19084: { format(returnt,sizeof(returnt),  "LaserPointer6"); }
  861.         case 18644: { format(returnt,sizeof(returnt),  "Screwdriver1"); }
  862.         case 18645: { format(returnt,sizeof(returnt),  "MotorcycleHelmet1"); }
  863.         case 18865: { format(returnt,sizeof(returnt),  "MobilePhone1"); }
  864.         case 18866: { format(returnt,sizeof(returnt),  "MobilePhone2"); }
  865.         case 18867: { format(returnt,sizeof(returnt),  "MobilePhone3"); }
  866.         case 18868: { format(returnt,sizeof(returnt),  "MobilePhone4"); }
  867.         case 18869: { format(returnt,sizeof(returnt),  "MobilePhone5"); }
  868.         case 18870: { format(returnt,sizeof(returnt),  "MobilePhone6"); }
  869.         case 18871: { format(returnt,sizeof(returnt),  "MobilePhone7"); }
  870.         case 18872: { format(returnt,sizeof(returnt),  "MobilePhone8"); }
  871.         case 18873: { format(returnt,sizeof(returnt),  "MobilePhone9"); }
  872.         case 18874: { format(returnt,sizeof(returnt),  "MobilePhone10"); }
  873.         case 18875: { format(returnt,sizeof(returnt),  "Pager1"); }
  874.         case 18890: { format(returnt,sizeof(returnt),  "Rake1"); }
  875.         case 18891: { format(returnt,sizeof(returnt),  "Bandana1"); }
  876.         case 18892: { format(returnt,sizeof(returnt),  "Bandana2"); }
  877.         case 18893: { format(returnt,sizeof(returnt),  "Bandana3"); }
  878.         case 18894: { format(returnt,sizeof(returnt),  "Bandana4"); }
  879.         case 18895: { format(returnt,sizeof(returnt),  "Bandana5"); }
  880.         case 18896: { format(returnt,sizeof(returnt),  "Bandana6"); }
  881.         case 18897: { format(returnt,sizeof(returnt),  "Bandana7"); }
  882.         case 18898: { format(returnt,sizeof(returnt),  "Bandana8"); }
  883.         case 18899: { format(returnt,sizeof(returnt),  "Bandana9"); }
  884.         case 18900: { format(returnt,sizeof(returnt),  "Bandana10"); }
  885.         case 18901: { format(returnt,sizeof(returnt),  "Bandana11"); }
  886.         case 18902: { format(returnt,sizeof(returnt),  "Bandana12"); }
  887.         case 18903: { format(returnt,sizeof(returnt),  "Bandana13"); }
  888.         case 18904: { format(returnt,sizeof(returnt),  "Bandana14"); }
  889.         case 18905: { format(returnt,sizeof(returnt),  "Bandana15"); }
  890.         case 18906: { format(returnt,sizeof(returnt),  "Bandana16"); }
  891.         case 18907: { format(returnt,sizeof(returnt),  "Bandana17"); }
  892.         case 18908: { format(returnt,sizeof(returnt),  "Bandana18"); }
  893.         case 18909: { format(returnt,sizeof(returnt),  "Bandana19"); }
  894.         case 18910: { format(returnt,sizeof(returnt),  "Bandana20"); }
  895.         case 18911: { format(returnt,sizeof(returnt),  "Mask1"); }
  896.         case 18912: { format(returnt,sizeof(returnt),  "Mask2"); }
  897.         case 18913: { format(returnt,sizeof(returnt),  "Mask3"); }
  898.         case 18914: { format(returnt,sizeof(returnt),  "Mask4"); }
  899.         case 18915: { format(returnt,sizeof(returnt),  "Mask5"); }
  900.         case 18916: { format(returnt,sizeof(returnt),  "Mask6"); }
  901.         case 18917: { format(returnt,sizeof(returnt),  "Mask7"); }
  902.         case 18918: { format(returnt,sizeof(returnt),  "Mask8"); }
  903.         case 18919: { format(returnt,sizeof(returnt),  "Mask9"); }
  904.         case 18920: { format(returnt,sizeof(returnt),  "Mask10"); }
  905.         case 18921: { format(returnt,sizeof(returnt),  "Beret1"); }
  906.         case 18922: { format(returnt,sizeof(returnt),  "Beret2"); }
  907.         case 18923: { format(returnt,sizeof(returnt),  "Beret3"); }
  908.         case 18924: { format(returnt,sizeof(returnt),  "Beret4"); }
  909.         case 18925: { format(returnt,sizeof(returnt),  "Beret5"); }
  910.         case 18926: { format(returnt,sizeof(returnt),  "Hat1"); }
  911.         case 18927: { format(returnt,sizeof(returnt),  "Hat2"); }
  912.         case 18928: { format(returnt,sizeof(returnt),  "Hat3"); }
  913.         case 18929: { format(returnt,sizeof(returnt),  "Hat4"); }
  914.         case 18930: { format(returnt,sizeof(returnt),  "Hat5"); }
  915.         case 18931: { format(returnt,sizeof(returnt),  "Hat6"); }
  916.         case 18932: { format(returnt,sizeof(returnt),  "Hat7"); }
  917.         case 18933: { format(returnt,sizeof(returnt),  "Hat8"); }
  918.         case 18934: { format(returnt,sizeof(returnt),  "Hat9"); }
  919.         case 18935: { format(returnt,sizeof(returnt),  "Hat10"); }
  920.         case 18936: { format(returnt,sizeof(returnt),  "Helmet1"); }
  921.         case 18937: { format(returnt,sizeof(returnt),  "Helmet2"); }
  922.         case 18938: { format(returnt,sizeof(returnt),  "Helmet3"); }
  923.         case 18939: { format(returnt,sizeof(returnt),  "CapBack1"); }
  924.         case 18940: { format(returnt,sizeof(returnt),  "CapBack2"); }
  925.         case 18941: { format(returnt,sizeof(returnt),  "CapBack3"); }
  926.         case 18942: { format(returnt,sizeof(returnt),  "CapBack4"); }
  927.         case 18943: { format(returnt,sizeof(returnt),  "CapBack5"); }
  928.         case 18944: { format(returnt,sizeof(returnt),  "HatBoater1"); }
  929.         case 18945: { format(returnt,sizeof(returnt),  "HatBoater2"); }
  930.         case 18946: { format(returnt,sizeof(returnt),  "HatBoater3"); }
  931.         case 18947: { format(returnt,sizeof(returnt),  "HatBowler1"); }
  932.         case 18948: { format(returnt,sizeof(returnt),  "HatBowler2"); }
  933.         case 18949: { format(returnt,sizeof(returnt),  "HatBowler3"); }
  934.         case 18950: { format(returnt,sizeof(returnt),  "HatBowler4"); }
  935.         case 18951: { format(returnt,sizeof(returnt),  "HatBowler5"); }
  936.         case 18952: { format(returnt,sizeof(returnt),  "BoxingHelmet1"); }
  937.         case 18953: { format(returnt,sizeof(returnt),  "CapKnit1"); }
  938.         case 18954: { format(returnt,sizeof(returnt),  "CapKnit2"); }
  939.         case 18955: { format(returnt,sizeof(returnt),  "CapOverEye1"); }
  940.         case 18956: { format(returnt,sizeof(returnt),  "CapOverEye2"); }
  941.         case 18957: { format(returnt,sizeof(returnt),  "CapOverEye3"); }
  942.         case 18958: { format(returnt,sizeof(returnt),  "CapOverEye4"); }
  943.         case 18959: { format(returnt,sizeof(returnt),  "CapOverEye5"); }
  944.         case 18960: { format(returnt,sizeof(returnt),  "CapRimUp1"); }
  945.         case 18961: { format(returnt,sizeof(returnt),  "CapTrucker1"); }
  946.         case 18962: { format(returnt,sizeof(returnt),  "CowboyHat2"); }
  947.         case 18963: { format(returnt,sizeof(returnt),  "CJElvisHead"); }
  948.         case 18964: { format(returnt,sizeof(returnt),  "SkullyCap1"); }
  949.         case 18965: { format(returnt,sizeof(returnt),  "SkullyCap2"); }
  950.         case 18966: { format(returnt,sizeof(returnt),  "SkullyCap3"); }
  951.         case 18967: { format(returnt,sizeof(returnt),  "HatMan1"); }
  952.         case 18968: { format(returnt,sizeof(returnt),  "HatMan2"); }
  953.         case 18969: { format(returnt,sizeof(returnt),  "HatMan3"); }
  954.         case 18970: { format(returnt,sizeof(returnt),  "HatTiger1"); }
  955.         case 18971: { format(returnt,sizeof(returnt),  "HatCool1"); }
  956.         case 18972: { format(returnt,sizeof(returnt),  "HatCool2"); }
  957.         case 18973: { format(returnt,sizeof(returnt),  "HatCool3"); }
  958.         case 18974: { format(returnt,sizeof(returnt),  "MaskZorro1"); }
  959.         case 18976: { format(returnt,sizeof(returnt),  "MotorcycleHelmet2"); }
  960.         case 18977: { format(returnt,sizeof(returnt),  "MotorcycleHelmet3"); }
  961.         case 18978: { format(returnt,sizeof(returnt),  "MotorcycleHelmet4"); }
  962.         case 18979: { format(returnt,sizeof(returnt),  "MotorcycleHelmet5"); }
  963.         case 19006: { format(returnt,sizeof(returnt),  "GlassesType1"); }
  964.         case 19007: { format(returnt,sizeof(returnt),  "GlassesType2"); }
  965.         case 19008: { format(returnt,sizeof(returnt),  "GlassesType3"); }
  966.         case 19009: { format(returnt,sizeof(returnt),  "GlassesType4"); }
  967.         case 19010: { format(returnt,sizeof(returnt),  "GlassesType5"); }
  968.         case 19011: { format(returnt,sizeof(returnt),  "GlassesType6"); }
  969.         case 19012: { format(returnt,sizeof(returnt),  "GlassesType7"); }
  970.         case 19013: { format(returnt,sizeof(returnt),  "GlassesType8"); }
  971.         case 19014: { format(returnt,sizeof(returnt),  "GlassesType9"); }
  972.         case 19015: { format(returnt,sizeof(returnt),  "GlassesType10"); }
  973.         case 19016: { format(returnt,sizeof(returnt),  "GlassesType11"); }
  974.         case 19017: { format(returnt,sizeof(returnt),  "GlassesType12"); }
  975.         case 19018: { format(returnt,sizeof(returnt),  "GlassesType13"); }
  976.         case 19019: { format(returnt,sizeof(returnt),  "GlassesType14"); }
  977.         case 19020: { format(returnt,sizeof(returnt),  "GlassesType15"); }
  978.         case 19021: { format(returnt,sizeof(returnt),  "GlassesType16"); }
  979.         case 19022: { format(returnt,sizeof(returnt),  "GlassesType17"); }
  980.         case 19023: { format(returnt,sizeof(returnt),  "GlassesType18"); }
  981.         case 19024: { format(returnt,sizeof(returnt),  "GlassesType19"); }
  982.         case 19025: { format(returnt,sizeof(returnt),  "GlassesType20"); }
  983.         case 19026: { format(returnt,sizeof(returnt),  "GlassesType21"); }
  984.         case 19027: { format(returnt,sizeof(returnt),  "GlassesType22"); }
  985.         case 19028: { format(returnt,sizeof(returnt),  "GlassesType23"); }
  986.         case 19029: { format(returnt,sizeof(returnt),  "GlassesType24"); }
  987.         case 19030: { format(returnt,sizeof(returnt),  "GlassesType25"); }
  988.         case 19031: { format(returnt,sizeof(returnt),  "GlassesType26"); }
  989.         case 19032: { format(returnt,sizeof(returnt),  "GlassesType27"); }
  990.         case 19033: { format(returnt,sizeof(returnt),  "GlassesType28"); }
  991.         case 19034: { format(returnt,sizeof(returnt),  "GlassesType29"); }
  992.         case 19035: { format(returnt,sizeof(returnt),  "GlassesType30"); }
  993.         case 19036: { format(returnt,sizeof(returnt),  "HockeyMask1"); }
  994.         case 19037: { format(returnt,sizeof(returnt),  "HockeyMask2"); }
  995.         case 19038: { format(returnt,sizeof(returnt),  "HockeyMask3"); }
  996.         case 19039: { format(returnt,sizeof(returnt),  "WatchType1"); }
  997.         case 19040: { format(returnt,sizeof(returnt),  "WatchType2"); }
  998.         case 19041: { format(returnt,sizeof(returnt),  "WatchType3"); }
  999.         case 19042: { format(returnt,sizeof(returnt),  "WatchType4"); }
  1000.         case 19043: { format(returnt,sizeof(returnt),  "WatchType5"); }
  1001.         case 19044: { format(returnt,sizeof(returnt),  "WatchType6"); }
  1002.         case 19045: { format(returnt,sizeof(returnt),  "WatchType7"); }
  1003.         case 19046: { format(returnt,sizeof(returnt),  "WatchType8"); }
  1004.         case 19047: { format(returnt,sizeof(returnt),  "WatchType9"); }
  1005.         case 19048: { format(returnt,sizeof(returnt),  "WatchType10"); }
  1006.         case 19049: { format(returnt,sizeof(returnt),  "WatchType11"); }
  1007.         case 19050: { format(returnt,sizeof(returnt),  "WatchType12"); }
  1008.         case 19051: { format(returnt,sizeof(returnt),  "WatchType13"); }
  1009.         case 19052: { format(returnt,sizeof(returnt),  "WatchType14"); }
  1010.         case 19053: { format(returnt,sizeof(returnt),  "WatchType15"); }
  1011.         case 19079: { format(returnt,sizeof(returnt),  "Parrot"); }
  1012.         case 19085: { format(returnt,sizeof(returnt),  "EyePatch1"); }
  1013.         case 19086: { format(returnt,sizeof(returnt),  "ChainsawDildo1"); }
  1014.         case 19090: { format(returnt,sizeof(returnt),  "PomPomBlue"); }
  1015.         case 19091: { format(returnt,sizeof(returnt),  "PomPomRed"); }
  1016.         case 19092: { format(returnt,sizeof(returnt),  "PomPomGreen"); }
  1017.         case 19093: { format(returnt,sizeof(returnt),  "HardHat2"); }
  1018.         case 19094: { format(returnt,sizeof(returnt),  "BurgerShotHat1"); }
  1019.         case 19095: { format(returnt,sizeof(returnt),  "CowboyHat1"); }
  1020.         case 19096: { format(returnt,sizeof(returnt),  "CowboyHat3"); }
  1021.         case 19097: { format(returnt,sizeof(returnt),  "CowboyHat4"); }
  1022.         case 19098: { format(returnt,sizeof(returnt),  "CowboyHat5"); }
  1023.         case 19099: { format(returnt,sizeof(returnt),  "PoliceCap2"); }
  1024.         case 19100: { format(returnt,sizeof(returnt),  "PoliceCap3"); }
  1025.         case 19101: { format(returnt,sizeof(returnt),  "ArmyHelmet1"); }
  1026.         case 19102: { format(returnt,sizeof(returnt),  "ArmyHelmet2"); }
  1027.         case 19103: { format(returnt,sizeof(returnt),  "ArmyHelmet3"); }
  1028.         case 19104: { format(returnt,sizeof(returnt),  "ArmyHelmet4"); }
  1029.         case 19105: { format(returnt,sizeof(returnt),  "ArmyHelmet5"); }
  1030.         case 19106: { format(returnt,sizeof(returnt),  "ArmyHelmet6"); }
  1031.         case 19107: { format(returnt,sizeof(returnt),  "ArmyHelmet7"); }
  1032.         case 19108: { format(returnt,sizeof(returnt),  "ArmyHelmet8"); }
  1033.         case 19109: { format(returnt,sizeof(returnt),  "ArmyHelmet9"); }
  1034.         case 19110: { format(returnt,sizeof(returnt),  "ArmyHelmet10"); }
  1035.         case 19111: { format(returnt,sizeof(returnt),  "ArmyHelmet11"); }
  1036.         case 19112: { format(returnt,sizeof(returnt),  "ArmyHelmet12"); }
  1037.         case 19113: { format(returnt,sizeof(returnt),  "SillyHelmet1"); }
  1038.         case 19114: { format(returnt,sizeof(returnt),  "SillyHelmet2"); }
  1039.         case 19115: { format(returnt,sizeof(returnt),  "SillyHelmet3"); }
  1040.         case 19116: { format(returnt,sizeof(returnt),  "PlainHelmet1"); }
  1041.         case 19117: { format(returnt,sizeof(returnt),  "PlainHelmet2"); }
  1042.         case 19118: { format(returnt,sizeof(returnt),  "PlainHelmet3"); }
  1043.         case 19119: { format(returnt,sizeof(returnt),  "PlainHelmet4"); }
  1044.         case 19120: { format(returnt,sizeof(returnt),  "PlainHelmet5"); }
  1045.         case 19137: { format(returnt,sizeof(returnt),  "CluckinBellHat1"); }
  1046.         case 19138: { format(returnt,sizeof(returnt),  "PoliceGlasses1"); }
  1047.         case 19139: { format(returnt,sizeof(returnt),  "PoliceGlasses2"); }
  1048.         case 19140: { format(returnt,sizeof(returnt),  "PoliceGlasses3"); }
  1049.         case 19141: { format(returnt,sizeof(returnt),  "SWATHelmet1"); }
  1050.         case 19142: { format(returnt,sizeof(returnt),  "SWATArmour1"); }
  1051.         case 19160: { format(returnt,sizeof(returnt),  "HardHat3"); }
  1052.         case 19161: { format(returnt,sizeof(returnt),  "PoliceHat1"); }
  1053.         case 19162: { format(returnt,sizeof(returnt),  "PoliceHat2"); }
  1054.         case 19163: { format(returnt,sizeof(returnt),  "GimpMask1"); }
  1055.         case 19317: { format(returnt,sizeof(returnt),  "bassguitar01"); }
  1056.         case 19318: { format(returnt,sizeof(returnt),  "flyingv01"); }
  1057.         case 19319: { format(returnt,sizeof(returnt),  "warlock01"); }
  1058.         case 19330: { format(returnt,sizeof(returnt),  "fire_hat01"); }
  1059.         case 19331: { format(returnt,sizeof(returnt),  "fire_hat02"); }
  1060.         case 19346: { format(returnt,sizeof(returnt),  "hotdog01"); }
  1061.         case 19347: { format(returnt,sizeof(returnt),  "badge01"); }
  1062.         case 19348: { format(returnt,sizeof(returnt),  "cane01"); }
  1063.         case 19349: { format(returnt,sizeof(returnt),  "monocle01"); }
  1064.         case 19350: { format(returnt,sizeof(returnt),  "moustache01"); }
  1065.         case 19351: { format(returnt,sizeof(returnt),  "moustache02"); }
  1066.         case 19352: { format(returnt,sizeof(returnt),  "tophat01"); }
  1067.         default: { format(returnt,sizeof(returnt),  "Un-listed item"); }
  1068.     }
  1069.     return returnt;
  1070. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement