#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <colorchat>
#include <dhudmessage>
#include <hamsandwich>
#define PLUGIN "pontrendszer"
#define VERZIO "1.0"
#define KESZITO "pixxa112"
#define KEZDOPONT 2
#define KEZDOPONT_VIP 4
#define OLESPONT 1
#define OLESPONT_VIP 2
#define BONUSZ1 2
#define BONUSZ2 4
#define BONUSZ3 6
#define BONUSZIDO1 180.0
#define BONUSZIDO2 300.0
#define BONUSZIDO3 600.0
#define VIPJOG ADMIN_LEVEL_B
#define SZINT_2 60
#define SZINT_2_BONUSZ 1
#define SZINT_3 150
#define SZINT_3_BONUSZ 1
#define SZINT_4 200
#define SZINT_4_BONUSZ 1
#define SZINT_5 300
#define SZINT_5_BONUSZ 1
#define SZINT_6 350
#define SZINT_6_BONUSZ 1
#define SZINT_7 500
#define SZINT_7_BONUSZ 1
#define SZINT_8 600
#define SZINT_8_BONUSZ 1
#define SZINT_9 750
#define SZINT_9_BONUSZ 1
#define SZINT_10 1000
#define SZINT_10_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 gravítáció \y(\r30 pont\y)")
menu_additem(menu, "\wGyorsaság \y(\r15 pont\y)")
menu_additem(menu, "\w+10 HP \y(\r10 pont\y)")
menu_additem(menu, "\wIsten mód \y(\r60 pont\y)")
menu_additem(menu, "\wVilágítás \y - \rPiros \y(\r5 pont\y)")
menu_additem(menu, "\wVilágítás \y - \rKék \y(\r5 pont\y)")
menu_additem(menu, "\wVilágítás \y - \rZöld \y(\r5 pont\y)")
menu_additem(menu, "\wVilágítás \y - \rSárga \y(\r5 pont\y)")
menu_additem(menu, "\wVilágítás \y - \rLila \y(\r5 pont\y)")
}
}
public menu_funkciok(id, menu, key)
{
key++
if(key == 1) {
if(pont >= 30)
{
set_user_gravity(id, 0.100)
cs_set_user_points(id,pont-30)
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Te megvetted a gravitaciot!")
}
else {
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Nincs eleg pontod!");
}
}
if(key == 2) {
if(pont >= 15)
{
set_user_maxspeed(id, 900.0)
cs_set_user_points(id,pont-15)
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Te megvetted a gyorsasagot!")
}
else {
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Nincs eleg pontod!")
}
}
if(key == 3) {
if(pont >= 10)
{
set_user_health(id, 10)
cs_set_user_points(id,pont-10)
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Te megvetted a +10hpt!")
}
else {
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Nincs eleg pontod!");
}
}
if(key == 5) {
if(pont >= 60)
{
set_user_godmode(id, 1)
cs_set_user_points(id,pont-60)
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Te megvetted az Isten modot!")
}
else {
ColorChat(id, GREEN, "^x04[Pont Rendszer] ^x03Nincs eleg pontod!");
}
}
if(key == 6) {
if(pont >= 5)
{
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
cs_set_user_money(id,pont-1)
ColorChat(id, BLUE, "^x04[Menu] ^x03Te megvetted a vilagitast(piros)!")
}
else {
ColorChat(id, BLUE, "^x04[Menu] ^x03Nincs eleg pontod!");
}
}
if(key == 7) {
if(pont >= 5)
{
set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,25)
cs_set_user_money(id,pont-1)
ColorChat(id, BLUE, "^x04[Menu] ^x03Te megvetted a vilagitast(kek)!")
}
else {
ColorChat(id, BLUE, "^x04[Menu] ^x03Nincs eleg pontod!");
}
}
if(key == 8) {
if(pont >= 5)
{
set_user_rendering(id,kRenderFxGlowShell,0,255,0,kRenderNormal,25)
cs_set_user_money(id,pont-1)
ColorChat(id, BLUE, "^x04[Menu] ^x03Te megvetted a vilagitast(zold)!")
}
else {
ColorChat(id, BLUE, "^x04[Menu] ^x03Nincs eleg pontod!");
}
}
if(key == 9) {
if(pont >= 5)
{
set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,25)
cs_set_user_money(id,pont-5)
ColorChat(id, BLUE, "^x04[Menu] ^x03Te megvetted a vilagitast(sarga)!")
}
else {
ColorChat(id, BLUE, "^x04[Menu] ^x03Nincs eleg pontod!");
}
}
if(key == 10) {
if(pont >= 5)
{
set_user_rendering(id,kRenderFxGlowShell,155,48,255,kRenderNormal,25)
cs_set_user_money(id,pont-1)
ColorChat(id, BLUE, "^x04[Menu] ^x03Te megvetted a vilagitast(lila)!")
}
else {
ColorChat(id, BLUE, "^x04[Menu] ^x03Nincs eleg pontod!");
}
}
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")
}
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
}
if(pontok[id] >= SZINT_3)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_3_BONUSZ
}
if(pontok[id] >= SZINT_4)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_4_BONUSZ
}
if(pontok[id] >= SZINT_5)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_5_BONUSZ
}
if(pontok[id] >= SZINT_6)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_6_BONUSZ
}
if(pontok[id] >= SZINT_7)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_7_BONUSZ
}
if(pontok[id] >= SZINT_8)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_8_BONUSZ
}
if(pontok[id] >= SZINT_9)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_9_BONUSZ
}
if(pontok[id] >= SZINT_10)
{
new name[33]
get_user_name(id, name, 31)
ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
pontok[id] += SZINT_10_BONUSZ
}
}else{
pontok[attacker] += OLESPONT
ColorChat(attacker, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT)
}
}
public go_shopmenu(id)
{
menu_display(id,menu)
return PLUGIN_HANDLED
}
public reset(id) {
client_print(id,print_chat,"A szerveren fut a Pont Rendszer plugint! Ird a chatbe hogy: /pontok | /pont | /bolt | /shop");
}