hlmod.hu
https://hlmod.hu/

Ujraéledés Pontért.
https://hlmod.hu/viewtopic.php?f=9&t=20325
Oldal: 1 / 1

Szerző:  Levii [ 2015.04.16. 17:00 ]
Hozzászólás témája:  Ujraéledés Pontért.

Sziasztok! valaki segítene hogy ujraéledni így lehessen? hogy 30pont az ujraéledés:) pont[id] előre is kössz:
SMA Forráskód: [ Mindet kijelol ]
  1. /*_____________________________________________________________*/
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <colorchat>
  6. #include <hamsandwich>
  7. #include <fun>
  8.  
  9. public plugin_init() {
  10. register_plugin("Ujraeledes ", "2.0", "maxi & ultraibolya")
  11. register_clcmd("say /ujra","elet")
  12. RegisterHam(Ham_Spawn,"player","info")
  13. }
  14. public info() {
  15. ColorChat(0,RED, "Ha megvan 10 olesed akkor ujra tudsz eledni egy alkalommal!")
  16. ColorChat(0,RED, "Hasznalata: /ujra!")
  17. }
  18. public elet(id) {
  19. new olesek = get_user_frags(id)
  20. if(is_user_alive(id)) {
  21. if(!get_user_flags(id) && ADMIN_KICK) {
  22. if(olesek >= 10)
  23. {
  24. ExecuteHamB(Ham_CS_RoundRespawn, id)
  25. set_user_frags(id, get_user_frags(id) -10)
  26. ColorChat(id, GREEN, "Sikeresen ujraeledtel!");
  27. }
  28. else {
  29. ColorChat(id, RED, "Nincs eleg olesed!")
  30. }
  31. }
  32. else {
  33. ExecuteHamB(Ham_CS_RoundRespawn, id)
  34. ColorChat(id, GREEN, "Sikeresen ujraeledtel!");
  35. }
  36. }
  37. else {
  38. ColorChat(id, RED, "Eletben vagy, ilyenkor nem használhatod ezt a funkciót.")
  39. }
  40. }

Szerző:  Applee [ 2015.04.16. 17:14 ]
Hozzászólás témája:  Re: Ujraéledés Pontért.

Levii írta:
Sziasztok! valaki segítene hogy ujraéledni így lehessen? hogy 30pont az ujraéledés:) pont[id] előre is kössz: SMA Forráskód: [ Mindet kijelol ]/*_____________________________________________________________*/
 
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <hamsandwich>
#include <fun>
 
public plugin_init() {
register_plugin("Ujraeledes ", "2.0", "maxi & ultraibolya")
register_clcmd("say /ujra","elet")
RegisterHam(Ham_Spawn,"player","info")
}
public info() {
ColorChat(0,RED, "Ha megvan 30 olesed akkor ujra tudsz eledni egy alkalommal!")
ColorChat(0,RED, "Hasznalata: /ujra!")
}
public elet(id) {
new olesek = get_user_frags(id)
if(is_user_alive(id)) {
if(!get_user_flags(id) && ADMIN_KICK) {
if(olesek >= 30)
{
ExecuteHamB(Ham_CS_RoundRespawn, id)
set_user_frags(id, get_user_frags(id) -30)
ColorChat(id, GREEN, "Sikeresen ujraeledtel!");
}
else {
ColorChat(id, RED, "Nincs eleg olesed!")
}
}
else {
ExecuteHamB(Ham_CS_RoundRespawn, id)
ColorChat(id, GREEN, "Sikeresen ujraeledtel!");
}
}
else {
ColorChat(id, RED, "Eletben vagy, ilyenkor nem használhatod ezt a funkciót.")
}
}

Próbáld

Szerző:  LostLegend [ 2015.04.16. 18:21 ]
Hozzászólás témája:  Re: Ujraéledés Pontért.

TRY:

SMA Forráskód: [ Mindet kijelol ]
  1. /*_____________________________________________________________*/
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <colorchat>
  6. #include <hamsandwich>
  7. #include <fun>
  8.  
  9. new pont[33]
  10.  
  11. public plugin_init() {
  12. register_plugin("Ujraeledes ", "2.0", "maxi & ultraibolya")
  13. register_clcmd("say /ujra","elet")
  14. RegisterHam(Ham_Spawn,"player","info")
  15. }
  16. public info() {
  17. ColorChat(0,RED, "Ha megvan 10 olesed akkor ujra tudsz eledni egy alkalommal!")
  18. ColorChat(0,RED, "Hasznalata: /ujra!")
  19. }
  20. public elet(id) {
  21. if(is_user_alive(id)) {
  22. if(!get_user_flags(id) && ADMIN_KICK) {
  23. if(pont[id] >= 30)
  24. {
  25. ExecuteHamB(Ham_CS_RoundRespawn, id)
  26. pont[id] -=30
  27. ColorChat(id, GREEN, "Sikeresen ujraeledtel!");
  28. }
  29. else {
  30. ColorChat(id, RED, "Nincs eleg olesed!")
  31. }
  32. }
  33. else {
  34. ExecuteHamB(Ham_CS_RoundRespawn, id)
  35. ColorChat(id, GREEN, "Sikeresen ujraeledtel!");
  36. }
  37. }
  38. else {
  39. ColorChat(id, RED, "Eletben vagy, ilyenkor nem használhatod ezt a funkciót.")
  40. }
  41. }

Szerző:  DecToR [ 2015.04.18. 17:22 ]
Hozzászólás témája:  Re: Ujraéledés Pontért.

Ha boltba akarod akkor így :) elejére : new pont[33] :
SMA Forráskód: [ Mindet kijelol ]
  1. public bolt(id)
  2. {
  3. new cim[121]
  4. format(cim,charsmax(cim)," Bolt ^nPont: %d",pont[id]) // itt a menu , ami irja hogy mennyi pontod van , a menuben irja.
  5. new menu = menu_create(cim, "mh_MyMenu")
  6.  
  7. menu_additem(menu, "\dUjraeledes \r[15pont]", "", 0);
  8.  
  9. menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
  10.  
  11. menu_display(id, menu, 0);
  12.  
  13. return PLUGIN_HANDLED;
  14. }
  15.  
  16. public mh_MyMenu(id, menu, item)
  17. {
  18. if(item == MENU_EXIT)
  19. {
  20. menu_cancel(id);
  21. return PLUGIN_HANDLED;
  22. }
  23.  
  24. new command[6], name[64], access, callback;
  25.  
  26. menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
  27.  
  28. switch(item)
  29. {
  30. case 0: {
  31. if(pont[id] >= 15) //itt megadod hogy mennyi pont legyen
  32. {
  33. ExecuteHam(Ham_CS_RoundRespawn, id)
  34. pont[id]-=15 //itt levonja azt a pontot.
  35. print_color(id, "!g[Információ]!y Sikeresen Ujraéledtél.")
  36. }
  37. else print_color(id, "!g[Információ]!y Sajnos nincs elég pontod.")
  38. } //bezárod a fügvényt.
  39.  


Kérem jelezz vissza hogy jó vagy nem, remélem segítettem.

Szerző:  Levii [ 2015.04.21. 20:48 ]
Hozzászólás témája:  Re: Ujraéledés Pontért.

DecToR köszönöm Sikerült :) Ment a gomb :)

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/