hlmod.hu
https://hlmod.hu/

Valaki javítaná ?. -Szint
https://hlmod.hu/viewtopic.php?f=10&t=24530
Oldal: 1 / 1

Szerző:  Tomii~'. cL. [ 2016.04.05. 15:34 ]
Hozzászólás témája:  Valaki javítaná ?. -Szint

Helló.
Valaki tudná javítani vagy megcsinálni azt hogy 3% XP-t mindig adjon ölésnél ?.

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <nvault>
  4. #include <cstrike>
  5. #include <fun>
  6. #include <fakemeta>
  7. #include <hamsandwich>
  8. #include <colorchat>
  9.  
  10. #define PLUGIN "New Plug-In"
  11. #define VERSION "1.0"
  12. #define AUTHOR "author"
  13.  
  14. new oles[33], szint[33], tapasztalat[33]
  15. new cim
  16.  
  17. public plugin_init() {
  18.     register_plugin(PLUGIN, VERSION, AUTHOR)
  19.     register_clcmd("say /menu", "Fomenu")
  20.     register_event("DeathMsg","halal","a")
  21. }
  22.  
  23. public halal(id)
  24. {
  25.     new killer = read_data(1)
  26.     new victim = read_data(2)
  27.         new Gyilkos = read_data(3)
  28.  
  29.         if(szint[Gyilkos] >= 0 && szint[Gyilkos] < 1)
  30.         {
  31.             tapasztalat[Gyilkos] += random_num(50,35)
  32.         }
  33.         else if(szint[Gyilkos] >= 5 && szint[Gyilkos] < 10)
  34.         {
  35.             tapasztalat[Gyilkos] += random_num(40,25)
  36.         }
  37.         if(tapasztalat[Gyilkos] >= 100)
  38.         {
  39.             szint[Gyilkos]++
  40.             oles[Gyilkos]+= 3
  41.             tapasztalat[Gyilkos] -= 100
  42.         }
  43.    
  44.     if(killer != victim){
  45.     oles[killer] += 2
  46.     }
  47. }
  48.  
  49. public Fomenu(id) {
  50.     new focim[121],menu1[121]
  51.     formatex(focim, charsmax(focim), "^n\wArany:\r %d \d \ySzint: \d%d \yEXP: \d%d%%", oles[id], szint[id], tapasztalat[id])
  52.     new menu = menu_create(focim, "menuu_h")
  53.  
  54.     menu_additem(menu, "USP", "0", 0)
  55.  
  56.     menu_setprop(menu, MPROP_EXITNAME, "Kilepes");
  57.  
  58.     menu_display(id, menu, 0)
  59. }
  60.  
  61. public menuu_h(id, menu, item)
  62.     {
  63.     if( item == MENU_EXIT )
  64.     {
  65.     menu_destroy(menu);
  66.     return PLUGIN_HANDLED;
  67.     }
  68.     new data[9], access, callback, szName[64]
  69.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback)
  70.     new key = str_to_num(data)
  71.  
  72.     switch(key)
  73.     {
  74.         case 0:
  75.         {
  76.                          give_item(id, "weapon_usp");
  77.                          give_item(id,"ammo_556nato");
  78.                          give_item(id,"ammo_556nato");
  79.                          give_item(id,"ammo_556nato");
  80.                          ColorChat(id, BLUE, "^3Sikeresen ^4kivalasztottad ^3az ^4Alap USP-t !.")
  81.                        }
  82.                  }
  83.        }

Szerző:  The Peace [ 2016.04.05. 16:43 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

talán.

  1. public halal(id)
  2. {
  3.     new killer = read_data(1)
  4.     new victim = read_data(2)
  5.         new Gyilkos = read_data(3)
  6.  
  7.         if(szint[Gyilkos] >= 0 && szint[Gyilkos] < 1000) // 0-tól 1000 szintig
  8.         {
  9.             tapasztalat[Gyilkos] += 3 //ennyi tapasztalatot ad random
  10.         }
  11.      
  12.         if(tapasztalat[Gyilkos] >= 100) // ha megvan a 100 tapasztalat
  13.         {
  14.             szint[Gyilkos]++ //akkor +1 szintet kapsz
  15.             oles[Gyilkos]+= 3 // +3 ölést kapsz
  16.             tapasztalat[Gyilkos] -= 100 // és levonja a tapasztalatot
  17.         }
  18.    
  19.     if(killer != victim){
  20.     oles[killer] += 2
  21.     }
  22. }

Szerző:  Tomii~'. cL. [ 2016.04.05. 17:26 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

The Peace írta:
talán.

  1. public halal(id)
  2. {
  3.     new killer = read_data(1)
  4.     new victim = read_data(2)
  5.         new Gyilkos = read_data(3)
  6.  
  7.         if(szint[Gyilkos] >= 0 && szint[Gyilkos] < 1000) // 0-tól 1000 szintig
  8.         {
  9.             tapasztalat[Gyilkos] += 3 //ennyi tapasztalatot ad random
  10.         }
  11.      
  12.         if(tapasztalat[Gyilkos] >= 100) // ha megvan a 100 tapasztalat
  13.         {
  14.             szint[Gyilkos]++ //akkor +1 szintet kapsz
  15.             oles[Gyilkos]+= 3 // +3 ölést kapsz
  16.             tapasztalat[Gyilkos] -= 100 // és levonja a tapasztalatot
  17.         }
  18.    
  19.     if(killer != victim){
  20.     oles[killer] += 2
  21.     }
  22. }


teszteltem de nem jó !.
csak aranyat ad.

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <nvault>
  4. #include <cstrike>
  5. #include <fun>
  6. #include <fakemeta>
  7. #include <hamsandwich>
  8. #include <colorchat>
  9.  
  10. #define PLUGIN "New Plug-In"
  11. #define VERSION "1.0"
  12. #define AUTHOR "author"
  13.  
  14. new oles[33], szint[33], tapasztalat[33]
  15. new cim
  16.  
  17. public plugin_init() {
  18.     register_plugin(PLUGIN, VERSION, AUTHOR)
  19.     register_clcmd("say /menu", "Fomenu")
  20.     register_event("DeathMsg","lekeres","a")
  21. }
  22.  
  23. public lekeres(id)
  24.     {
  25.         new killer = read_data(1)
  26.         new victim = read_data(2)
  27.         new Gyilkos = read_data(3)
  28.      
  29.             if(szint[Gyilkos] >= 0 && szint[Gyilkos] < 50) // 0-tól 1000 szintig
  30.             {
  31.                 tapasztalat[Gyilkos] += 30 //ennyi tapasztalatot ad random
  32.             }
  33.          
  34.             if(tapasztalat[Gyilkos] >= 100) // ha megvan a 100 tapasztalat
  35.             {
  36.                 szint[Gyilkos]++ //akkor +1 szintet kapsz
  37.                 tapasztalat[Gyilkos] -= 100 // és levonja a tapasztalatot
  38.             }
  39.        
  40.         if(killer != victim){
  41.         oles[killer] += 2
  42.         }
  43.     }
  44.  
  45. public Fomenu(id) {
  46.     new focim[121],menu1[121]
  47.     formatex(focim, charsmax(focim), "^n\wArany:\r %d \d \ySzint: \d%d \yEXP: \d%d%%", oles[id], szint[id], tapasztalat[id])
  48.     new menu = menu_create(focim, "menuu_h")
  49.  
  50.     menu_additem(menu, "USP", "0", 0)
  51.  
  52.     menu_setprop(menu, MPROP_EXITNAME, "Kilepes");
  53.  
  54.     menu_display(id, menu, 0)
  55. }
  56.  
  57. public menuu_h(id, menu, item)
  58.     {
  59.     if( item == MENU_EXIT )
  60.     {
  61.     menu_destroy(menu);
  62.     return PLUGIN_HANDLED;
  63.     }
  64.     new data[9], access, callback, szName[64]
  65.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback)
  66.     new key = str_to_num(data)
  67.  
  68.     switch(key)
  69.     {
  70.         case 0:
  71.         {
  72.                          give_item(id, "weapon_usp");
  73.                          give_item(id,"ammo_556nato");
  74.                          give_item(id,"ammo_556nato");
  75.                          give_item(id,"ammo_556nato");
  76.                          ColorChat(id, BLUE, "^3Sikeresen ^4kivalasztottad ^3az ^4Alap USP-t !.")
  77.                        }
  78.                  }
  79.        }

Szerző:  LyleChriss [ 2016.04.05. 18:24 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

És ebben hol az arany? :shock:

Szerző:  The Peace [ 2016.04.05. 18:37 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

LyleChriss írta:
És ebben hol az arany? :shock:

Hát én se értem ezt, szegény szerintem azt se tudja mit akar :lol:

Szerző:  Tomii~'. cL. [ 2016.04.05. 18:57 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

Az oles[id] az -.-"

Szerző:  SZILARD [ 2016.04.05. 20:31 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <nvault>
  4. #include <cstrike>
  5. #include <fun>
  6. #include <fakemeta>
  7. #include <hamsandwich>
  8. #include <colorchat>
  9.  
  10. #define PLUGIN "New Plug-In"
  11. #define VERSION "1.0"
  12. #define AUTHOR "author"
  13.  
  14. new oles[33], szint[33], tapasztalat[33]
  15. new cim
  16.  
  17. public plugin_init() {
  18.     register_plugin(PLUGIN, VERSION, AUTHOR)
  19.     register_clcmd("say /menu", "Fomenu")
  20.     register_event("DeathMsg","halal","a")
  21. }
  22.  
  23. public halal(id)
  24. {
  25.     new killer = read_data(1)
  26.     new victim = read_data(2)
  27.         new Gyilkos = read_data(3)
  28.  
  29.         if(szint[Gyilkos] >= 0 && szint[Gyilkos] < 1)
  30.         {
  31.             tapasztalat[Gyilkos] += random_num(50,35)
  32.         }
  33.         else if(szint[Gyilkos] >= 5 && szint[Gyilkos] < 10)
  34.         {
  35.             tapasztalat[Gyilkos] += random_num(40,25)
  36.         }
  37.         if(tapasztalat[Gyilkos] >= 100)
  38.         {
  39.             szint[Gyilkos]++
  40.             oles[Gyilkos]+= 3
  41.             tapasztalat[Gyilkos] -= 100
  42.         }
  43.    
  44.     if(killer != victim){
  45.     oles[killer] += 2
  46.     tapasztalat[Gyilkos] += 3
  47.     }
  48. }
  49.  
  50. public Fomenu(id) {
  51.     new focim[121],menu1[121]
  52.     formatex(focim, charsmax(focim), "^n\wArany:\r %d \d \ySzint: \d%d \yEXP: \d%d%%", oles[id], szint[id], tapasztalat[id])
  53.     new menu = menu_create(focim, "menuu_h")
  54.  
  55.     menu_additem(menu, "USP", "0", 0)
  56.  
  57.     menu_setprop(menu, MPROP_EXITNAME, "Kilepes");
  58.  
  59.     menu_display(id, menu, 0)
  60. }
  61.  
  62. public menuu_h(id, menu, item)
  63.     {
  64.     if( item == MENU_EXIT )
  65.     {
  66.     menu_destroy(menu);
  67.     return PLUGIN_HANDLED;
  68.     }
  69.     new data[9], access, callback, szName[64]
  70.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback)
  71.     new key = str_to_num(data)
  72.  
  73.     switch(key)
  74.     {
  75.         case 0:
  76.         {
  77.                          give_item(id, "weapon_usp");
  78.                          give_item(id,"ammo_556nato");
  79.                          give_item(id,"ammo_556nato");
  80.                          give_item(id,"ammo_556nato");
  81.                          ColorChat(id, BLUE, "^3Sikeresen ^4kivalasztottad ^3az ^4Alap USP-t !.")
  82.                        }
  83.                  }
  84.        }

Szerző:  Pardon [ 2016.04.05. 20:35 ]
Hozzászólás témája:  Re: Valaki javítaná ?. -Szint

  1. #include <amxmodx>
  2. #include <engine>
  3. #include <nvault>
  4. #include <cstrike>
  5. #include <fun>
  6. #include <fakemeta>
  7. #include <hamsandwich>
  8. #include <colorchat>
  9.  
  10. #define PLUGIN "New Plug-In"
  11. #define VERSION "1.0"
  12. #define AUTHOR "author"
  13.  
  14. new oles[33], szint[33], tapasztalat[33]
  15. new cim
  16.  
  17. public plugin_init() {
  18.     register_plugin(PLUGIN, VERSION, AUTHOR)
  19.     register_clcmd("say /menu", "Fomenu")
  20.     register_event("DeathMsg","halal","a")
  21. }
  22.  
  23. public halal(id)
  24. {
  25.     new killer = read_data(1)
  26.     new victim = read_data(2)
  27.         new Gyilkos = read_data(3)
  28.  
  29.         if(szint[Gyilkos] >= 0 && szint[Gyilkos] < 1)
  30.         {
  31.             tapasztalat[Gyilkos] += 3
  32.         }
  33.         else if(szint[Gyilkos] >= 5 && szint[Gyilkos] < 10)
  34.         {
  35.             tapasztalat[Gyilkos] += 3
  36.         }
  37.         if(tapasztalat[Gyilkos] >= 100)
  38.         {
  39.             szint[Gyilkos]++
  40.             oles[Gyilkos]+= 3
  41.             tapasztalat[Gyilkos] -= 100
  42.         }
  43.    
  44.     if(killer != victim){
  45.     oles[killer] += 2
  46.     }
  47. }
  48.  
  49. public Fomenu(id) {
  50.     new focim[121],menu1[121]
  51.     formatex(focim, charsmax(focim), "^n\wArany:\r %d \d \ySzint: \d%d \yEXP: \d%d%%", oles[id], szint[id], tapasztalat[id])
  52.     new menu = menu_create(focim, "menuu_h")
  53.  
  54.     menu_additem(menu, "USP", "0", 0)
  55.  
  56.     menu_setprop(menu, MPROP_EXITNAME, "Kilepes");
  57.  
  58.     menu_display(id, menu, 0)
  59. }
  60.  
  61. public menuu_h(id, menu, item)
  62.     {
  63.     if( item == MENU_EXIT )
  64.     {
  65.     menu_destroy(menu);
  66.     return PLUGIN_HANDLED;
  67.     }
  68.     new data[9], access, callback, szName[64]
  69.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback)
  70.     new key = str_to_num(data)
  71.  
  72.     switch(key)
  73.     {
  74.         case 0:
  75.         {
  76.                          give_item(id, "weapon_usp");
  77.                          give_item(id,"ammo_556nato");
  78.                          give_item(id,"ammo_556nato");
  79.                          give_item(id,"ammo_556nato");
  80.                          ColorChat(id, BLUE, "^3Sikeresen ^4kivalasztottad ^3az ^4Alap USP-t !.")
  81.                        }
  82.                  }
  83.        }


Egyebkent minek ennyi include ?

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