Rules FAQ Members List Search Register Login

 Raised This Month: \$165 Target: \$400 41%

Author Message
AnimalMonster
Senior Member
Join Date: May 2020
 01-11-2021 , 05:05   Sorting System #1 Hey, i wanted to make a little sorting system by rairity and the weaponid on a weapon menu but i realised that i don t know how i should do it... Anyone knows to show and example of a sort system other than the amxx's one? Rarities are from 0 to 5 and weapon ids are stored into an array with size of 24. __________________ A little of scripting makes a MIRACLE. ============================================= DeclineD#7346 // for everyone who wants a friend..
AnimalMonster
Senior Member
Join Date: May 2020
 01-11-2021 , 05:33   Re: Sorting System #2 This is the work i ve done so far PHP Code: ``` stock PlsSort(const lala[]) { for(new i = 0; i < g_WeaponCount; i++) { new idk = g_WeaponCount new WeaponBasedOn = ArrayGetCell(BasenOn, i) new WeaponRarity = ArrayGetCell(Item_Rarity) new sr[idk], sb[idk] for(new l=0;l<24;l++) { if(WeaponBasedOn == weapon_based[l]) { for(new k=0; k<5;k++) { if(WeaponRarity == k) { sr[i] = k break; } sb[i] = l } for(new p=0, p sb[p]) { lala[p] = i } } } return 1 }  ``` Would it work?? __________________ A little of scripting makes a MIRACLE. ============================================= DeclineD#7346 // for everyone who wants a friend.. Last edited by AnimalMonster; 01-11-2021 at 05:33.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
 01-11-2021 , 09:15   Re: Sorting System #3 Please, no. Simply use ArraySort() or ArraySortEx() if running AMXX dev-builds. If you need help, show how the arrays are defined because that code is a complete mess and make no sense. __________________
AnimalMonster
Senior Member
Join Date: May 2020
 01-15-2021 , 04:48   Re: Sorting System #4 After a few tries i ve got to nothing and 2nd array can be this: new x[] or new x: x = ArrayCreate(num, num2). I need to sort some items based on their rarity(5) and return it. __________________ A little of scripting makes a MIRACLE. ============================================= DeclineD#7346 // for everyone who wants a friend..
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
 01-15-2021 , 08:29   Re: Sorting System #5 Show the full array definitions. __________________

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Server Discussion     Source Servers (SRCDS)     HL1 Servers (HLDS) AMX Mod X     News     Bug Reports     General     Off-Topic     Plugins         Suggestions / Requests         Approved Plugins         New Plugin Submissions         Unapproved/Old Plugins         Translation Request         High-Traffic Plugins             GunGame             UAIO (Ultimate All-In-One Plugin)             xREDIRECT             CSDM             AMX Super             RuneMod             Zombie Plague Mod             SuperHero Mod                 News                 Tech Support                 Scripting Help                 Off-Topic / General Chat                 Heroes                     Suggestions / Requests                     Approved Heroes                     New Submissions                     Unapproved/Old Heroes                         Module Heroes                     SuperHero Mod Stats - By 123                 (OLD) Bug Reports     Scripting         Scripting Help         Code Snippets/Tutorials         Module Coding     Donor Access SourceMod     News     General     Plugins         Plugins         Unapproved Plugins         Plugin/Gameplay Ideas and Requests         High-Traffic Plugins             SourceMod Anti-Cheat             Zombie:Reloaded             SourceBans / SourceBans++             VSH / Freak Fortress             Store             SM_Hosties             HLstatsX:CE     Scripting     Extensions     Snippets and Tutorials     Donor Access     Metamod: Source         Metamod:Source Plugins         Metamod:Source Questions         Coding MM:S Plugins & SM Extensions Hosted Stuff     Asherkin's Plugins         TFDodgeball         TF2Items         SteamTools     Bail's Plugins         CSDM         CS:S DM Off-Topic & Trash     Off-Topic     Trash

All times are GMT -4. The time now is 22:40.

 DMCA - Archive - Top