Üdv.!
Ezt a plugint Oroszrulett csinálta , én meg kiegészítettem itemekkel, de nem értem hogy mért nem találja a lang fájlt, a data/lang ba bennt van de azt írja hogy ML_NOTFOUND stb. Pontosan ott van a lang fájl ahol kell lennie.
Kód: #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 "OroSzRuLetT."
/////////////////////////////////////////////////////////////////////
// Definiálom a különböző értékeket! //
/////////////////////////////////////////////////////////////////////
#define KEZDOPONT 5
#define KEZDOPONT_VIP 10
#define OLESPONT 3
#define OLESPONT_VIP 4
#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
/////////////////////////////////////////////////////////////////////
// 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! //
/////////////////////////////////////////////////////////////////////
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("pont.txt")
RegisterHam(Ham_Killed, "player", "fw_player_killed")
{
menu = menu_create("\rDubstepCity \wShop Menu","menu_funkciok")
menu_additem(menu, "\yAK47 - \r|30|pont")
menu_additem(menu, "\yGranat - \r|10|pont")
menu_additem(menu, "\yUZI - \r|20|pont")
menu_additem(menu, "\yAuto Shotgun - \r|25|pont")
menu_additem(menu, "\yMagozo - \r|40|pont")
menu_additem(menu, "\yDeagle - \r|25|pont")
}
}
public menu_funkciok(id, menu, key)
{
key++
if(key == 1)
{
if(pontok[id] >= 30)
{
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,120)
pontok[id] -= 30
}
}
if(key == 2)
{
if(pontok[id] >= 10)
{
give_item(id, "weapon_hegrenade")
pontok[id] -= 10
}
}
if(key == 3)
{
if(pontok[id] >= 20)
{
give_item(id, "weapon_mac10")
cs_set_user_bpammo(id,CSW_MAC10,150)
pontok[id] -= 20
}
}
if(key == 4)
{
if(pontok[id] >= 25)
{
give_item(id, "weapon_xm1014")
cs_set_user_bpammo(id,CSW_XM1014,90)
pontok[id] -= 25
}
}
if(key == 5)
{
if(pontok[id] >= 40)
{
give_item(id, "weapon_sg550")
cs_set_user_bpammo(id,CSW_SG550,90)
pontok[id] -= 40
}
}
if(key == 6)
{
if(pontok[id] >= 25)
{
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,100)
pontok[id] -= 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")
}
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
}
pont.txt tartalma:
Kód: BONUSZ_1 = Kaptal ^x03 %d ^x04 Pontot, mert jatszottal ^x03 %d ^x04 mp-t!
BONUSZ_2 = Kaptal ^x03 %d ^x04 Pontot, mert jatszottal ^x03 %d ^x04 mp-t!
BONUSZ_3 = Kaptal ^x03 %d ^x04 Pontot, mert jatszottal ^x03 %d ^x04 mp-t!
PONTOK_HUD = Pontjaid: %d ^nOlj ellenseget, hogy szerezz!
INFO_CHAT_1 = A Szerveren ^x03 Pont Rendszer ^x04 uzemel!
INFO_CHAT_2 = Bolt elohivasa: ^x03 /bolt, /shop !
PONTOK_CHAT = Te jelenlegi pontjaid szama: ^x03 %d
OLES = Kaptal ^x03 %d ^x04 pontot olesert!
SZINTLEPES = %s ^x04 lepett egy szintet, ezert kapott ^x03 %d ^x04 pontot!
Valaki megtudja mondani nekem, hogy mit csináltam rosszul?
|