Untitled
Guest 419 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))
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));
new tab[128];
for (new i = 0; i < ArraySize(skins); i++) {
ArrayGetArray(skins, i, skin);
if (!multipleSkins && has_skin(id, i)) continue;
skinsChance += skin[SKIN_CHANCE];
if(skinChestId[skin[SKIN_PRICE]] == item) {
skinId = i;
break;
}
}
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 %s - %s.", playerData[id][NAME], weapons_name[item], skin[SKIN_WEAPON]);
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 | 11 | 19 minutes ago
- Untitled
Markup | 17 | 2 hours ago
- Wanted to see what your conviction is on this theme
Markdown | 8 | 3 hours ago
- Untitled
Markup | 55 | 1 day ago
- mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.onion
Template Toolkit 2 | 23 | 1 day ago
- Untitled
Markup | 66 | 2 days ago
- Untitled
Markup | 64 | 2 days ago