Pár hiba van benne ( amiket nem tudtam ) :
-fegyverekbe csak 1 golyó,
-láthatatlanság
Kód:
//////////////////////////////////////////////////////////////////////
// Készítő: OroSzRuLetT. | Elérhetőség: oroszrulett@stayhosting.hu //
// --------------------------------------------------------------- //
// Ha megkértek, csinálok nektek olyan menu itemeket, amilyene- //
// ket szeretnétek! Sok Sikert a pluginhoz! //
//////////////////////////////////////////////////////////////////////
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <colorchat>
#include <dhudmessage>
#include <hamsandwich>
#define PLUGIN "Surf Ski 2"
#define VERZIO "1.0"
#define KESZITO "OroSzRuLetT."
/////////////////////////////////////////////////////////////////////
// Definiálom a különböző értékeket! //
/////////////////////////////////////////////////////////////////////
#define KEZDOPONT 5
#define KEZDOPONT_VIP 10
#define OLESPONT 3
#define OLESPONT_VIP 5
#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 50
#define SZINT_2_BONUSZ 10
#define DROG_ARA 5
#define DROG_SEBESSEG 340.0
#define BOXER_ARA 8
#define BOXER_DMG 80.0
#define BOXER_DMG_HS 160.0
#define BOKO_ARA 8
#define BOKO_DMG 90.0
#define BOKO_DMG_HS 180.0
#define GLOCK_ARA 30
#define HE_ARA 8
#define FLASH_ARA 8
#define SCOUT_ARA 15
#define AWP_ARA 25
#define LATHATATLANSAG_ARA 15
/////////////////////////////////////////////////////////////////////
// Elkészítem azokat a "tömböket", amelyeknek szerepük lesz a //
// mindenkori pontok meghatározásában, és a HUD színének kisorso- //
// lásában! //
/////////////////////////////////////////////////////////////////////
/*| Drog | 5 | Gyorsabb futás (halálig, kör végéig)
2 | Bokszer | 8 | Nagyobb sebzés késsel (halálig, körvégéig +15 dmg)
3 | Bökő | 10 | Nagyobb sebzés késsel (halálig, körvégéig +25 dmg)
4 | Glock | 30 | (halálig,kör végéig, csak 1 tár van)
5 | 1 db He | 8 |
6 | 2 db Flash| 8 |
7 | Scout 1 tolteny | 15 |
8 | AWP 1 tolteny | 25 |
9 | 10 mp lathatatlansag | 15 |
10 | VIP 7 nap | 30 | (kulon skin, 2 flash, +100 armor) */
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("\ySzerver nev \wShop Menu","menu_funkciok")
menu_additem(menu, "\yDrog | \r5 \y| \wGyorsabb futás (halalig, kor vegeig)")
menu_additem(menu, "\yItem : ???")
menu_additem(menu, "\yItem : ???")
menu_additem(menu, "\yItem : ???")
menu_additem(menu, "\yItem : ???")
}
}
public menu_funkciok(id, menu, key, victim, Float:damage, damage_bits)
{
key++
if(key == 1)
{
if( pontok[id] >= DROG_ARA)
{
set_user_maxspeed(id, DROG_SEBESSEG)
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 2)
{
if( pontok[id] >= BOXER_ARA)
{
new clip , ammo
new weapon = get_user_weapon ( id , clip , ammo )
if(weapon == CSW_KNIFE)
{
SetHamParamFloat(4, BOXER_DMG)
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
SetHamParamFloat(4, BOXER_DMG_HS)
}
}
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 3)
{
if( pontok[id] >= BOKO_ARA)
{
new clip , ammo
new weapon = get_user_weapon ( id , clip , ammo )
if(weapon == CSW_KNIFE)
{
SetHamParamFloat(4, BOKO_DMG)
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
SetHamParamFloat(4, BOKO_DMG_HS)
}
}
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 4)
{
if( pontok[id] >= GLOCK_ARA)
{
give_item(id, "weapon_glock")
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 5)
{
if( pontok[id] >= HE_ARA)
{
give_item(id, "weapon_hegrenade")
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 6)
{
if( pontok[id] >=FLASH_ARA)
{
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 7)
{
if( pontok[id] >= SCOUT_ARA)
{
give_item(id, "weapon_scout")
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 8)
{
if( pontok[id] >= AWP_ARA)
{
give_item(id, "weapon_awp")
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
if(key == 8)
{
if( pontok[id] >= LATHATATLANSAG_ARA)
{
//rendering vlami:d
}else{
ColorChat(id, GREEN, "Nincs eleg penzed!")
}
}
}
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
}
}else{
pontok[attacker] += OLESPONT
ColorChat(attacker, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT)
}
set_user_maxspeed(id, -1.0)
SetHamParamFloat(4, -1.0)
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
SetHamParamFloat(4, -1.0)
}
}
public go_shopmenu(id)
{
menu_display(id,menu)
return PLUGIN_HANDLED
}