#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <fakemeta>
#include <fun>
#include <dhudmessage>
#include <hamsandwich>
#define PLUGIN "Surf Ski 2"
#define VERZIO "1.0"
#define KESZITO "OroSzRuLetT."
#define KEZDOPONT 5
#define KEZDOPONT_VIP 10
#define OLESPONT 1
#define OLESPONT_VIP 2
#define BONUSZ1 5
#define BONUSZ2 10
#define BONUSZ3 15
#define BONUSZIDO1 180.0
#define BONUSZIDO2 300.0
#define BONUSZIDO3 600.0
#define VIPJOG ADMIN_LEVEL_B
#define SZINT_2 100
#define SZINT_2_BONUSZ 1
#define SZINT_3 300
#define SZINT_3_BONUSZ 1
#define SZINT_4 400
#define SZINT_4_BONUSZ 1
#define SZINT_5 800
#define SZINT_5_BONUSZ 1
#define SZINT_6 1000
#define SZINT_6_BONUSZ 1
#define SZINT_7 1500
#define SZINT_7_BONUSZ 1
#define SZINT_8 2000
#define SZINT_8_BONUSZ 1
#define SZINT_9 2500
#define SZINT_9_BONUSZ 1
new pontok[33]
new r
new g
new b
new menu
public plugin_init() {
register_plugin(PLUGIN, VERZIO, KESZITO)
register_clcmd("say /pontok", "kiir_pont")
register_clcmd("say /pont", "kiir_pont")
register_clcmd("say /shop", "go_shopmenu")
register_clcmd("say /bolt", "go_shopmenu")
register_dictionary("pontrendszer.txt")
RegisterHam(Ham_Killed, "player", "fw_player_killed")
{
menu = menu_create("\rPont Rendszer! \y[Cfg: Danii]","menu_funkciok")
menu_additem(menu, "\wNagyobb gravitacio \d[\r30 pont\d]")
menu_additem(menu, "\wGyorsasag \d[\r15 pont\d]")
menu_additem(menu, "\w+10 HP \d[\r10 pont\d]")
menu_additem(menu, "\wIsten mod \d[\r120 pont\d]")
menu_additem(menu, "\wVilagitas \y - \rPiros \d[\r5 pont\d]")
menu_additem(menu, "\wVilagitas \y - \rKek \d[\r5 pont\d]")
menu_additem(menu, "\wVilagitas \y - \rZold \d[\r5 pont\d]")
menu_additem(menu, "\wVilagitas \y - \rSarga \d[\r5 pont\d]")
menu_additem(menu, "\wVilagitas \y - \rLila \d[\r5 pont\d]")
}
}
public menu_funkciok(id, menu, key)
{
key++
if(key == 1)
{
//1. Menu item
set_user_gravity(id, 0.5);
}
if(key == 2)
{
//2. Menu item
set_user_maxspeed( id , 900.0 );
}
if(key == 3)
{
//3. Menu item
set_user_health(id, get_user_health(id) + 10)
}
if(key == 4)
{
//4. Menu item
set_user_godmode(id, 1)
}
if(key == 5)
{
//5. Menu item
set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25)
}
if(key == 6)
{
//6. menu item
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 25)
}
if(key == 7)
{
//7. menu item
set_user_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 25)
}
if(key == 8)
{
//8. menu item
set_user_rendering(id, kRenderFxGlowShell, 250, 255, 0, kRenderNormal, 25)
}
if(key == 9)
{
//9. menu item
set_user_rendering(id, kRenderFxGlowShell, 255, 0, 246, kRenderNormal, 25)
}
}public client_putinserver( id )
{
pontok[id] = KEZDOPONT
set_task(5.0, "kiir_hud_pont", id)
set_task(5.1, "kiir_chat_info", id)
//Ido bonusz
set_task(BONUSZIDO1, "bonusz_1", id)
set_task(BONUSZIDO2, "bonusz_2", id)
set_task(BONUSZIDO3, "bonusz_3", id)
}
public bonusz_1( id )
{
pontok[id] += BONUSZ1
ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_1", BONUSZ1, BONUSZIDO1)
}
public bonusz_2( id )
{
pontok[id] += BONUSZ2
ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_2", BONUSZ2, BONUSZIDO1)
}
public bonusz_3( id )
{
pontok[id] += BONUSZ3
ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_3", BONUSZ3, BONUSZIDO1)
}
public kiir_hud_pont( id )
{
r = random_num(50, 256)
g = random_num(50, 256)
b = random_num(50, 256)
set_dhudmessage(r, g, b, 0.7,-1.0, 0, 6.0, 12.0)
show_dhudmessage(id, "%L", LANG_PLAYER, "PONTOK_HUD", pontok[id])
}
public kiir_chat_info( id )
{
ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_1")
ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_2")
ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_3")
ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_4")
}
public kiir_pont( id )
{
ColorChat(id, GREEN, "%L", LANG_PLAYER, "PONTOK_CHAT", pontok[id])
}
public fw_player_killed(victim, attacker, shouldgib, id)
{
if(get_user_flags(id, VIPJOG))
{
pontok[attacker] += OLESPONT_VIP
ColorChat(attacker, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT_VIP)
if(pontok[id] >= SZINT_2)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_2_BONUSZ
}
}else{
pontok[attacker] += OLESPONT
ColorChat(attacker, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT)
}
}
public go_shopmenu(id)
{
menu_display(id,menu)
return PLUGIN_HANDLED
}