hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.25. 05:36



Jelenlévő felhasználók

Jelenleg 202 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 201 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot] az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 1 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Bázis Épitő pontrendszer
HozzászólásElküldve: 2013.12.03. 19:02 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.10.27. 23:13
Hozzászólások: 412
Megköszönt másnak: 21 alkalommal
Megköszönték neki: 68 alkalommal
Ez nem tudom miért hibás bevan írva :
aranyfegyó stb.
És amikor felmek szeróra ML_NOTFOUND meg ilyenek közbe bevan rakva a lang.
És ha beírom /shop vagy /bolt semmi.
Meg nem is menti pontokat.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <nvault>
  5. #include <colorchat>
  6. #include <fun>
  7. #include <cstrike>
  8. #include <fakemeta>
  9. #include <engine>
  10. #include <dhudmessage>
  11.  
  12. #define PLUGIN "New Plug-In"
  13. #define VERSION "1.0"
  14. #define AUTHOR "author"
  15.  
  16. /// ez a gyorsaság és gravitáció
  17. #define SPEED 700.0
  18. #define GRAVIT 0.3
  19. #define HP5 5000
  20. #define HP2 2000
  21. #define HP1 1000
  22.  
  23. ////KEZDŐ///BÓNUSZ////
  24.  
  25. #define KEZDOPONT 5
  26. #define KEZDOPONT_VIP 10
  27. #define OLESPONT 3
  28. #define OLESPONT_VIP 5
  29.  
  30. #define BONUSZ1 5
  31. #define BONUSZ2 10
  32. #define BONUSZ3 15
  33.  
  34. #define VIPJOG ADMIN_RESERVATION
  35.  
  36. #define SZINT_2 50
  37. #define SZINT_2_BONUSZ 10
  38.  
  39. #define BONUSZIDO1 600.0
  40. #define BONUSZIDO2 1200.0
  41. #define BONUSZIDO3 1500.0
  42.  
  43. new const G_AK47V[]= "models/aranygoldfegyok/v_goldenak47.mdl" //Arany modell elérési útja.
  44. new const G_AK47P[]= "models/aranygoldfegyok/p_goldenak47.mdl" //Arany modell elérési útja.
  45. new const G_M4A1V[]= "models/aranygoldfegyok/v_goldenm4a1.mdl" //Arany modell elérési útja.
  46. new const G_M4A1P[]= "models/aranygoldfegyok/p_goldenm4a1.mdl" //Arany modell elérési útja.
  47. new const G_DEAGLEV[]= "models/aranygoldfegyok/v_goldendd.mdl" //Arany modell elérési útja.
  48. new const G_DEAGLEP[]= "models/aranygoldfegyok/p_goldendd.mdl" //Arany modell elérési útja.
  49. new g_vault
  50. new pont[33]
  51. new bool:rec[33]
  52. new bool:strong[33]
  53. new bool:g_ak[33]=false
  54. new bool:g_m4a1[33]=false
  55. new bool:g_deagle[33]=false
  56. new r
  57. new g
  58. new b
  59.  
  60.  
  61. public plugin_init() {
  62. register_plugin(PLUGIN, VERSION, AUTHOR)
  63. RegisterHam(Ham_Spawn, "player", "hamplayer_spawn", 0)
  64. RegisterHam(Ham_Killed, "player", "fw_player_killed")
  65. register_clcmd("say /bolt", "shopmenu")
  66. register_clcmd("say /pontok", "kiir_pont")
  67. register_clcmd("say /pont", "kiir_pont")
  68. register_clcmd("say /shop", "shopmenu")
  69. register_forward(FM_UpdateClientData, "fwUpdateClientData", 1)
  70. RegisterHam(Ham_TakeDamage, "player", "Erossebzes", 0)
  71. register_event("CurWeapon", "Event_Change_Weapon", "be", "1=1")
  72.  
  73. register_dictionary("pontrendszer.txt")
  74.  
  75.  
  76. }
  77.  
  78. public fwUpdateClientData(id, sw, cd_handle)
  79. {
  80. if(rec[id])
  81. set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0});
  82. }
  83. public Erossebzes( aldozat,inflictor,tamado,Float:damage, DamageBits )
  84. {
  85. if(strong[tamado])
  86. {
  87. SetHamParamFloat(4, damage * 3.0);
  88. }
  89. return HAM_IGNORED;
  90. }
  91.  
  92. public shopmenu(id)
  93. {
  94. if (!is_user_alive(id))
  95. return
  96.  
  97. static CsTeams: team ; team = cs_get_user_team(id)
  98.  
  99. if (team == CS_TEAM_T)
  100. {
  101. Tmenubolt(id)
  102.  
  103. }
  104. else if (team == CS_TEAM_CT)
  105. {
  106. CTmenubolt(id)
  107. }
  108. }
  109. public client_connect(id){
  110. Betolt(id)
  111. set_task(1.0, "Informaciok", id);
  112. }
  113.  
  114. public client_disconnect(id){
  115. Mentes(id)
  116. }
  117.  
  118. public Mentes(id){
  119. new name[32]
  120. get_user_name(id, name, 31)
  121.  
  122. new vaultkey[64],vaultdata[256]
  123. format(vaultkey,63,"%sPT", name)
  124. format(vaultdata,255,"%i",pont[id])
  125. nvault_set(g_vault,vaultkey,vaultdata)
  126. return PLUGIN_CONTINUE
  127. }
  128.  
  129. public Betolt(id){
  130. new name[32]
  131. get_user_name(id, name, 31)
  132. new vaultkey[64],vaultdata[256]
  133. format(vaultkey,63,"%sPT", name)
  134. format(vaultdata,255,"%i",pont[id])
  135. nvault_get(g_vault,vaultkey,vaultdata,255)
  136. replace_all(vaultdata, 255, "#", " ")
  137. new pt[32]
  138. parse(vaultdata, pt, 31)
  139. pont[id] = str_to_num(pt)
  140. return PLUGIN_CONTINUE
  141. }
  142.  
  143. public Tmenubolt(id)
  144. {
  145. new menu= menu_create("Bazis Epito Shop [ T ]", "tmenu_hand")
  146. menu_additem(menu, "5000HP (pluszba)")
  147. menu_additem(menu, "2000HP (pluszba)")
  148. menu_additem(menu, "1000HP (pluszba)")
  149. menu_additem(menu, "Gyorsasag")
  150. menu_additem(menu, "Gravitacio")
  151. menu_additem(menu, "16000$ bevaltas (pontra)")
  152.  
  153. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
  154. menu_display(id, menu, 0)
  155. return PLUGIN_HANDLED
  156.  
  157. }
  158.  
  159. public CTmenubolt(id)
  160. {
  161. new menu= menu_create("Bazis Epito Shop [ CT ] ", "ctmenu_hand")
  162. menu_additem(menu, "Arany Ak47")
  163. menu_additem(menu, "Arany M4A1")
  164. menu_additem(menu, "Arany Desert")
  165. menu_additem(menu, "500HP (pluszba)")
  166. menu_additem(menu, "No recoil")
  167. menu_additem(menu, "Eros sebzes (3x)(1kor)")
  168. menu_additem(menu, "16000$ bevaltas (pontra)")
  169. menu_additem(menu, "Gyorsasag")
  170. menu_additem(menu, "Gravitacio")
  171.  
  172. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
  173. menu_display(id, menu, 0)
  174. return PLUGIN_HANDLED
  175. }
  176.  
  177. public tmenu_hand(id, menu, item, live)
  178. {
  179. switch(item)
  180. {
  181. case 0:{
  182. if(pont[id]>=10 && live){
  183. pont[id]-=10
  184. set_user_health(id, get_user_health(id) + HP5)
  185. ColorChat(id, GREEN, "[BiG woRld BB] Hozza lett adva eletedhez 5000HP!")
  186. }
  187. else
  188. {
  189. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  190. }
  191. }
  192. case 1:{
  193. if (pont[id]>=10 && live){
  194. pont[id]-=10
  195. set_user_health(id, get_user_health(id) + HP2)
  196. ColorChat(id, GREEN, "[BiG woRld BB] Hozza lett adva eletedhez 2000HP!")
  197. }
  198. else
  199. {
  200. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  201. }
  202. }
  203. case 2:{
  204. if (pont[id]>=10 && live){
  205. pont[id]-=10
  206. set_user_health(id,get_user_health(id)+HP1)
  207. ColorChat(id, GREEN, "[BiG woRld BB] Hozza lett adva eletedhez 1000HP!")
  208. }
  209. else
  210. {
  211. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  212. }
  213. }
  214. case 3:{
  215. if (pont[id]>=10 && live){
  216. pont[id]-=10
  217. set_user_maxspeed(id, SPEED)
  218. ColorChat(id, GREEN, "[BiG woRld BB] Gyorsasagad megvaltoztatva!")
  219. }
  220. else
  221. {
  222. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  223. }
  224. }
  225. case 4:{
  226. if (pont[id]>=10 && live){
  227. pont[id]-=10
  228. set_user_gravity(id, GRAVIT)
  229. ColorChat(id, GREEN, "[BiG woRld BB] Gravitaciod kisebb lett!")
  230. }
  231. else
  232. {
  233. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  234. }
  235. }
  236. case 5:{
  237. if (cs_get_user_money(id)>= 16000 && live){
  238. cs_set_user_money(id, cs_get_user_money(id) -16000)
  239. pont[id]+=20
  240. ColorChat(id, GREEN, "[BiG woRld BB] Sikeresen bevaltotad penzed pontra")
  241. }
  242. else
  243. {
  244. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  245. }
  246. }
  247. }
  248. menu_destroy(menu)
  249. return PLUGIN_HANDLED
  250. }
  251. public ctmenu_hand(id, menu, item, live)
  252. {
  253. switch(item){
  254.  
  255.  
  256. case 0:{
  257. if(pont[id]>=10 && live) {
  258. pont[id]-=10
  259. g_ak[id]=true
  260. ColorChat(id, GREEN, "[BiG woRld BB] Megkaptad az Arany AK47!")
  261. give_item(id, "ak47")
  262. cs_set_user_bpammo(id, CSW_AK47,90)
  263. }
  264. else
  265. {
  266. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  267. }
  268. }
  269. case 1:{
  270. if(pont[id]>=10 && live){
  271. pont[id]-=10
  272. g_m4a1[id]=true
  273. ColorChat(id, GREEN, "[BiG woRld BB] Megkaptad az Arany M4A1-t!")
  274. give_item(id, "m4a1")
  275. cs_set_user_bpammo(id, CSW_M4A1,90)
  276. }
  277. else
  278. {
  279. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  280. }
  281. }
  282. case 2:{
  283. if(pont[id]>=10 && live){
  284. pont[id]-=10
  285. g_deagle[id]=true
  286. ColorChat(id, GREEN, "[BiG woRld BB] Megkaptad az Arany Desert-t!")
  287. give_item(id, "deagle")
  288. cs_set_user_bpammo(id, CSW_DEAGLE,35)
  289. }
  290. else
  291. {
  292. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  293. }
  294. }
  295. case 3:{
  296. if(pont[id]>=10 && live){
  297. pont[id]-=10
  298. set_user_health(id,get_user_health(id)+ 500)
  299. ColorChat(id, GREEN, "[BiG woRld BB] Megkaptad az 500HP-t!")
  300. }
  301. else
  302. {
  303. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  304. }
  305. }
  306. case 4:{
  307. if(pont[id]>=10 && live){
  308. pont[id]-=10
  309. rec[id] = true
  310. ColorChat(id, GREEN, "[BiG woRld BB] Megkaptad a NoRECoilt-t!")
  311. }
  312. else
  313. {
  314. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  315. }
  316. }
  317. case 5:{
  318. if(pont[id]>=10 && live){
  319. pont[id]-=10
  320. strong[id] = true
  321. ColorChat(id, GREEN, "[BiG woRld BB] Megkaptad a 3x sebzest (1korre)")
  322. }
  323. else
  324. {
  325. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  326. }
  327. }
  328. case 6:{
  329. if (cs_get_user_money(id)>= 16000 && live){
  330. pont[id]+=20
  331. cs_set_user_money(id, cs_get_user_money(id) -16000)
  332. ColorChat(id, GREEN, "[BiG woRld BB] Sikerult bevaltani!")
  333. }
  334. else
  335. {
  336. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg penzed , pont bevaltasra!")
  337. }
  338. }
  339. case 7:{
  340. if(pont[id]>=10 && live){
  341. pont[id]-=10
  342. set_user_maxspeed(id, SPEED)
  343. ColorChat(id, GREEN, "[BiG woRld BB] Sebeseged megvaltoztatva!")
  344. }
  345. else
  346. {
  347. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod!")
  348. }
  349. }
  350. case 8:{
  351. if(pont[id]>=10 && live){
  352. pont[id]-=10
  353. set_user_gravity(id , GRAVIT)
  354. ColorChat(id, GREEN, "[BiG woRld BB] Gravitaciod kisebb lett!")
  355. }
  356. else
  357. {
  358. ColorChat(id, GREEN, "[BiG woRld BB] Nincs eleg pontod Sajnos!")
  359. }
  360. }
  361. }
  362. menu_destroy(menu)
  363. return PLUGIN_HANDLED
  364. }
  365.  
  366. public Event_Change_Weapon(id)
  367. {
  368. //Fegyver lekéréshez szükséges kódok
  369. new clip,ammo,weap=get_user_weapon(id,clip,ammo)
  370. if(weap==CSW_AK47 && g_ak[id]){ //Ha megvette az arany ak-t
  371. entity_set_string(id, EV_SZ_viewmodel,G_AK47V);//Megváltoztatjuk a modellt engine inc segítségével.
  372. entity_set_string(id, EV_SZ_viewmodel,G_AK47P)
  373. }
  374.  
  375. //new clip,ammo,weap=get_user_weapon(id,clip,ammo)
  376. if(weap==CSW_M4A1 && g_m4a1[id]){ //Ha megvette az arany ak-t
  377. entity_set_string(id, EV_SZ_viewmodel,G_M4A1V);//Megváltoztatjuk a modellt engine inc segítségével.
  378. entity_set_string(id, EV_SZ_viewmodel,G_M4A1P)
  379. }
  380. //new clip,ammo,weap=get_user_weapon(id,clip,ammo)
  381. if(weap==CSW_DEAGLE && g_deagle[id]){ //Ha megvette az arany ak-t
  382. entity_set_string(id, EV_SZ_viewmodel,G_DEAGLEV);//Megváltoztatjuk a modellt engine inc segítségével.
  383. entity_set_string(id, EV_SZ_viewmodel,G_DEAGLEP)
  384. }
  385.  
  386. return PLUGIN_CONTINUE
  387. }
  388.  
  389. public client_putinserver( id )
  390. {
  391. pont[id]= KEZDOPONT
  392. set_task(5.0, "kiir_hud_pont", id)
  393. set_task(5.1, "kiir_chat_info", id)
  394.  
  395. //Ido bonusz
  396. set_task(BONUSZIDO1, "bonusz_1", id)
  397. set_task(BONUSZIDO2, "bonusz_2", id)
  398. set_task(BONUSZIDO3, "bonusz_3", id)
  399. }
  400. public bonusz_1( id )
  401. {
  402. pont[id] += BONUSZ1
  403. ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_1", BONUSZ1, BONUSZIDO1)
  404. }
  405. public bonusz_2( id )
  406. {
  407. pont[id] += BONUSZ2
  408. ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_2", BONUSZ2, BONUSZIDO1)
  409. }
  410. public bonusz_3( id )
  411. {
  412. pont[id] += BONUSZ3
  413. ColorChat(id, GREEN, "%L", LANG_PLAYER, "BONUSZ_3", BONUSZ3, BONUSZIDO1)
  414. }
  415. public fw_player_killed(aldozat, tamado, shouldgib, id)
  416. {
  417. if(get_user_flags(id, VIPJOG))
  418. {
  419. pont[tamado] += OLESPONT_VIP
  420. ColorChat(tamado, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT_VIP)
  421.  
  422. if(pont[id] >= SZINT_2)
  423. {
  424. new name[33]
  425. get_user_name(id, name, 31)
  426. ColorChat(0, RED, "%L", LANG_PLAYER, "SZINTLEPES", name, SZINT_2_BONUSZ)
  427. pont[id] += SZINT_2_BONUSZ
  428. }
  429. }else{
  430. pont[tamado] += OLESPONT
  431. ColorChat(tamado, GREEN, "%L", LANG_PLAYER, "OLES", OLESPONT)
  432. }
  433. }
  434. public kiir_hud_pont( id )
  435. {
  436. new r = random_num(50, 256)
  437. new g = random_num(50, 256)
  438. new b = random_num(50, 256)
  439. set_dhudmessage(r, g, b, 0.7,-1.0, 0, 6.0, 12.0)
  440. show_dhudmessage(id, "%L", LANG_PLAYER, "PONTOK_HUD", pont[id])
  441. }
  442.  
  443. public kiir_chat_info( id )
  444. {
  445. ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_1")
  446. ColorChat(id, GREEN, "%L", LANG_PLAYER, "INFO_CHAT_2")
  447. }
  448.  
  449. public kiir_pont( id )
  450. {
  451. ColorChat(id, GREEN, "%L", LANG_PLAYER, "PONTOK_CHAT", pont[id])
  452. }
  453. public Informaciok(id){
  454. set_task(0.1, "Informaciok", id);
  455. if(!is_user_alive(id)){
  456. new target = entity_get_int(id, EV_INT_iuser2);
  457.  
  458. if(target == 0)
  459.  
  460. return PLUGIN_CONTINUE;
  461. set_hudmessage(0, 255, 0, 0.07, 0.22, 0, 6.0, 0.0)
  462. show_hudmessage(id, "Pontjai: %d", pont[target])
  463.  
  464. return PLUGIN_CONTINUE;
  465. }
  466. set_hudmessage(0, 255, 0, 0.07, 0.22, 0, 6.0, 0.0)
  467. show_hudmessage(id, "Pontjaid: %d", pont[id])
  468. return PLUGIN_CONTINUE;
  469. }
  470.  

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 1 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 27 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole