Untitled
Guest 323 4th May, 2022
public chest_weapon_skin(id, item)
{
if (!multipleSkins && !get_missing_weapon_skins_count(id, weapons_name[item])) {
client_print_color(id, id, "^x04[CS:GO]^x01 Masz juz wszystkie dostepne skiny broni^x03 %s^x01.", weapons_name[item]);
return PLUGIN_HANDLED;
}
new chance = chestDropRate+(csgo_get_user_svip(id)? chestSvipRate:(csgo_get_user_vip(id)? chestVipRate:0))
new Array:wylosowane = ArrayCreate(128, 0);
if (random_num(1, 100) <= chance) {
new skin[skinsInfo], skinId, skinsChance = 0, skinChance = random_num(1, multipleSkins ? get_weapon_skins_count(weapons_name[item], 1) : get_missing_weapon_skins_count(id, weapons_name[item], 1));
for (new i = 0; i < ArraySize(skins); i++) {
ArrayGetArray(skins, i, skin);
if (!multipleSkins && has_skin(id, i)) continue;
if(skinChestId[i] == item) {
ArrayPushCell(wylosowane, i);
}
skinId = i;
}
client_print_color(0, id, "%i", ArrayGetCell(wylosowane, 2));
ArrayGetArray(skins, skinId, skin);
add_skin(id, skinId, skin[SKIN_WEAPON], skin[SKIN_NAME]);
client_print_color(0, id, "^x04[CS:GO]^x03 %s^x01 wylosowal skin^x03 %s^x01 do broni^x03 %s^x01. %i", playerData[id][NAME], skin[SKIN_NAME], skin[SKIN_WEAPON], item);
log_to_file("csgo-random.log", "Gracz %s wylosowal skina %s (%s)", playerData[id][NAME], skin[SKIN_NAME], skin[SKIN_WEAPON]);
save_data(id);
}
else
{
client_print_color(id, id, "^x04[CS:GO]^x01 Niestety tym razem nie udalo ci sie wylosowac skina. Probuj dalej. %i", item);
}
return PLUGIN_HANDLED;
}
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Untitled
Markup | 19 | 20 hours ago
- Untitled
Markup | 25 | 23 hours ago
- Wanted to see what your conviction is on this theme
Markdown | 14 | 1 day ago
- Untitled
Markup | 67 | 1 day ago
- mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.onion
Template Toolkit 2 | 26 | 2 days ago
- Untitled
Markup | 72 | 3 days ago
- Untitled
Markup | 80 | 3 days ago