ActionBron(id, ent)
{
set_hudmessage(0, 255, 255, -1.0, 0.60, 0, 0.0, 0.1, 0.1, 0.1, -1);
if (cs_get_user_team(id) == CS_TEAM_CT) {
show_hudmessage(id, "Nie mozesz brac broni bedąc w CT");
return PLUGIN_HANDLED;
}
new name[32];
get_user_name(id, name, 31);
static property[5];
GetProperty(ent, 1, property);
static property2[5];
GetProperty(ent, 2, property2);
numer = str_to_num(property);
new szWeapon[32];
format(szWeapon, 31, "weapon_%s", g_bronie[numer]);
new iWeapons[32], iNum;
if(!WzialBron[id][str_to_num(property)]){
if(!(get_user_weapons(id, iWeapons, iNum) & (1<<get_weaponid(szWeapon)))){
give_item(id, szWeapon);
new ammo = str_to_num(property2);
cs_set_weapon_ammo(find_ent_by_owner(-1, szWeapon, id), ammo);
BCM_Print(id, "^x04[ProFrags]^x03 Dostales Bron: ^x04 %s ^x03z^x04 %i^x03 Nabojami", g_bronie[numer], ammo);
emit_sound(id, CHAN_STATIC, g_sound_bron, 1.0, ATTN_NORM, 0, PITCH_NORM);
set_hudmessage(0,255,255, -1.0, -1.0, 0, 32.0, 4.0, 0.1, 0.5, 1);
show_hudmessage(0, "UWAGA!^n Gracz %s zdobyl %s", name, g_bronie[numer]);
WzialBron[id][str_to_num(property)] = true;
}
}
else {
set_hudmessage(0, 255, 255, -1.0, 0.60, 0, 0.0, 0.1, 0.1, 0.1, -1);
show_hudmessage(id, "Juz raz wziales %s", g_bronie[numer]);
}
return PLUGIN_HANDLED;
}
Nie jestem pewien czy dziala napisz mi jak by co
Użytkownik FetaGreen edytował ten post 28.12.2011 21:35