Randomize an array of names in gsc for gun game mp
-
I am trying to randomize a array of all the gun names to have a random gun game order but gsc doesn't have a 'shuffle' function. Is there another way to do this? The array is below.
allgunslist = array("mp7_mp", "pdw57_mp", "vector_mp", "insas_mp", "qcw05_mp", "evoskorpion_mp", "peacekeeper_mp", "tar21_mp", "type95_mp", "sig556_mp", "sa58_mp", "hk416_mp", "scar_mp", "saritch_mp", "xm8_mp", "an94_mp", "870mcs_mp", "saiga12_mp", "ksg_mp", "srm1216_mp", "mk48_mp", "qbb95_mp", "lsat_mp", "hamr_mp", "svu_mp", "dsr50_mp", "ballista_mp", "as50_mp", "beretta93r_dw_mp", "fiveseven_mp", "fnp45_dw_mp", "judge_mp", "kard_mp", "smaw_mp", "usrpg_mp", "crossbow_mp", "knife_ballistic_mp", "minigun_wager_mp", "m32_wager_mp");``` -
Thanks to the discord I figured out to #include common_scripts\utility and use array_randomize(array)
-
In the future you can search in the game's code directly here, even with no experience searching "randomize" shows up array_randomize in the first results, and in case of unresolved external errors you can try adding the includes at the top of that file, of course pick ones that make sense
https://github.com/search?q=repo%3Aplutoniummod%2Ft6-scripts randomize&type=code
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login