- Nie działają napisy
- Nie zabiera fragów, tzn. gdy mamy 5 fragów możemy kupować(losować) do woli.
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <colorchat> #include <fun> #define PLUGIN "RuletkaPGC" #define VERSION "1.0" #define AUTHOR "ZixI" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /ruletka", "ruletka") register_clcmd("say /lotto", "ruletka") } public ruletka(id) { new rand new fragi = get_user_frags(id) new zycie = get_user_health(id) if(is_user_alive(id)) { if(fragi >= 5) { rand = random_num(0,6) switch(rand) { case 0: { give_item(id,"nvgs") ColorChat(id, GREEN, "[Ruletka PGC] Otrzymales noktowizor!") } case 1: { set_user_frags(id, fragi + 15) ColorChat(id, GREEN, "[Ruletka PGC] Wygrales 15 fragow!") } case 2: { set_user_health(id, zycie + 25) ColorChat(id, GREEN, "[Ruletka PGC] Zdobyles 25HP") } case 3: { give_item(id,"weapon_usp") give_item(id,"weapon_knife") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") give_item(id, "ammo_45acp") ColorChat(id, GREEN, "[Ruletka PGC] Wygrales usp!") } case 4: { set_user_health(id, zycie - 25) ColorChat(id, GREEN, "[Ruletka PGC] Straciles 25HP!") } case 5: { give_item(id,"weapon_flashbang") ColorChat(id, GREEN, "[Ruletka PGC] Dostales flashbanga!") } case 6: { give_item(id,"weapon_smokegrenade") ColorChat(id, GREEN, "[Ruletka PGC] Dostales Smoke'a! ") } } set_user_frags(id, fragi - 5) ColorChat(id, GREY, "[Ruletka PGC] Zagrales w ruletke, Zaplaciles 10 fragow") } else { ColorChat(id, RED, "[Ruletka PGC] Aby zagrac musisz miec 5 fragow") } } else { client_print(id, print_chat, "^x04[Ruletka PGC] Nie możesz grac gdy nie zyjesz!") } } public client_authorized(id) { set_task(20.0, "Reklama" ,id) } public Reklama(id) { new name[32] get_user_name(id,name,31) ColorChat(id, RED, "Witaj %s. Grasz na DeathRun *REKLAMA*", name) ColorChat(0, GREEN, "[Ruletka PGC] Wpisz /ruletka lub /lotto aby zagrac!") } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */Proszę o pomoc!
Użytkownik Pavulon edytował ten post 25.06.2010 19:56