Witam, mam taki problem, bo chciałbym zrobić losowanie 3 granatów z 3 powtórzeniami, ale nie chce żeby mi trafiło tych samych, mam coś takiego
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Nowy Plug-In" #define VERSION "1.0.0" #define AUTHOR "Andrzejek" new Array:ah; new modele[][] = { "GRANAT_HE", "GRANAT_FLASH", "GRANAT_SMOKE" }; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) ah = ArrayCreate(21, 3); LosujModel() register_clcmd("say /wykonaj", "UstawModel"); } public LosujModel() { new s = sizeof(modele); for(new i=0;i<s; ++i) ArrayPushString(ah, modele[i]); } public UstawModel() { new model[21], j, r; if(!(j = ArraySize(ah))) LosujModel(); r = random(j); ArrayGetString(ah, r, model, 20); ArrayDeleteItem(ah, r); for(new i=1;i<33; i++) { if(is_user_connected(i)) //ustaw model } }