hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.27. 12:42



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: siska15 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  [ 2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Adatkezelői hiba
HozzászólásElküldve: 2023.09.29. 09:23 
Offline
Jómunkásember

Csatlakozott: 2020.06.14. 17:59
Hozzászólások: 368
Megköszönt másnak: 64 alkalommal
Megköszönték neki: 10 alkalommal
Sziasztok....

Miért van az hogy 13 alap fegyver van bent és adatkezelő menüben csak az AK47 Skinekre küldi ki az addolt pontot...?


  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <hamsandwich>
  4. #include <engine>
  5. #include <fakemeta>
  6. #include <cstrike>
  7. #include <sqlx>
  8. //////////////////////////////////////////////////////
  9. #define Tablename "teszt_mod" //SQL Tábla neve!//
  10. //////////////////////////////////////////////////////
  11. #define ChatColor print_team_default // -1 csak szürke a ^3 -2 csak piros, -3 csak kék, print_team_default az alap
  12. //////////////////////////////////////////////////////
  13. #define OWNER ADMIN_IMMUNITY // OWnerben taroljuk az immunitas jogot
  14. #define FOADMIN ADMIN_LEVEL_E // foadminban meg a o jogot
  15. #define ADMIN ADMIN_MAP // adminban a mapvaltas jogot
  16. #define VIP ADMIN_LEVEL_H  //vipben meg egy h jogot
  17. //////////////////////////////////////////////////////
  18. //////////////////////////////////////////////////////
  19. //(valamelyik előtt mindenképpen legyen // jel!)
  20. #define RANK_ON // ha latni akarsz rangokat chatben (tulaj admin vip)
  21. //#define RANK_OFF // ha nem akarsz latni rangokat chatben (tulaj admin vip)
  22. //(valamelyik előtt mindenképpen legyen // jel!)
  23. /////////////////////////////////////////////////////
  24. #define KILL_POINT 1 // Sima Ölés
  25. #define HEADSHOT_POINT 2 // Fejlővés
  26. //////////////////////////////////////////////////////
  27. enum _:GunDatas {
  28.     M4A1,
  29.     AK47,
  30.     AWP,
  31.     SCOUT,
  32.     FAMAS,
  33.     GALIL,
  34.     AUG,
  35.     M3,
  36.     XM1014,
  37.     KNIFE,
  38.     DEAGLE,
  39.     USP,
  40.     GLOCK
  41. }
  42. new g_SelectedGun[33][GunDatas], g_uPoints[33][GunDatas];
  43. new betoltve[33];
  44. new sSteamID[33];
  45. new Rang[33], Oles[33];
  46. new Hud[33];
  47. new gSyncHud;
  48. new Masodpercek[33];
  49. new x_tempid, iChoosedMode;
  50.  
  51. new const gMenuPrefix[] = "\w[~|ChamPs|~]\y";
  52. new const gChatPrefix[] = "~|ChamPs|~";
  53.  
  54. enum _:DATA {
  55.     GunName[512],
  56.     ModelName[512],
  57.     Points[8]
  58. }  
  59.  
  60. enum _:Rangs { Szint[32], Xp[8] };
  61. new const Rangok[][Rangs] ={
  62.    
  63.     { "Újonc", 100 },
  64.     { "Honvéd", 200 },
  65.     { "Örvezető", 300 },
  66.     { "Szakaszvezető", 400 },
  67.     { "Őrmester", 500 },
  68.     { "Hadnagy", 600 },
  69.     { "Főhadnagy", 700 },
  70.     { "Százados", 800 },
  71.     { "Örnagy", 900 },
  72.     { "Alezredes", 1000 },
  73.     { "Ezredes", 1100 },
  74.     { "Dandártábornok", 1200 },
  75.     { "Vezérnagy", 1300 },
  76.     { "Altábornok", 1400 },
  77.     { "Vezérezredes", 1500 }
  78. };
  79.  
  80.  
  81. new const WeaponM4A1[][DATA] = {
  82.     {"M4A1 | Default", "models/v_m4a1.mdl", 0, }
  83. };
  84. new const WeaponAK47[][DATA] = {
  85.     {"AK47 | Default", "models/v_ak47.mdl", 0, }
  86. };
  87. new const WeaponAWP[][DATA] = {
  88.     {"AWP | Default", "models/v_awp.mdl", 0, }
  89. };
  90. new const WeaponSCOUT[][DATA] = {
  91.     {"SCOUT | Default", "models/v_scout.mdl", 0, }
  92. };
  93. new const WeaponFAMAS[][DATA] = {
  94.     {"FAMAS | Default", "models/v_famas.mdl", 0, }
  95. };
  96. new const WeaponGALIL[][DATA] = {
  97.     {"GALIL | Default", "models/v_galil.mdl", 0, }
  98. };
  99. new const WeaponAUG[][DATA] = {
  100.     {"AUG | Default", "models/v_aug.mdl", 0, }
  101. };
  102. new const WeaponM3[][DATA] = {
  103.     {"M3 | Default", "models/v_m3.mdl", 0, }
  104. };
  105. new const WeaponXM1014[][DATA] = {
  106.     {"XM1014 | Default", "models/v_xm1014.mdl", 0, }
  107. };
  108. new const WeaponKNIFE[][DATA] = {
  109.     {"KNIFE | Default", "models/v_knife.mdl", 0, }
  110. };
  111. new const WeaponDEAGLE[][DATA] = {
  112.     {"DEAGLE | Default", "models/v_deagle.mdl", 0, }
  113. };
  114. new const WeaponUSP[][DATA] = {
  115.     {"USP | Default", "models/v_usp.mdl", 0, }
  116. };
  117. new const WeaponGLOCK[][DATA] = {
  118.     {"GLOCK18 | Default", "models/v_glock18.mdl", 0, }
  119. };
  120. public plugin_init() {
  121.     register_plugin("Hlmodra", "valamiverziosiskell?", "szeretjükatejetazbiztos!");
  122.     register_clcmd("say /add", "Addolas");
  123.    
  124.     register_clcmd("say /rang", "showrang"); // Rang rendszer //
  125.    
  126.     register_clcmd("type_itemremoveoradd", "type_itemammount");
  127.    
  128.     register_impulse(201, "main_menu"); // T betü
  129.    
  130.     register_clcmd("say /menu", "main_menu"); // ha nem jelenik meg
  131.     register_clcmd("say /menu", "main_menu"); // ha nem jelenik meg
  132.    
  133.     register_event("DeathMsg","Halal","a"); // Kill Ölések //
  134.     register_event("DeathMsg","kills","a") // Rang Ölések //
  135.    
  136.     RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "WeaponChange_p", 1);
  137.     RegisterHam(Ham_Item_Deploy, "weapon_ak47", "WeaponChange_p", 1);
  138.     RegisterHam(Ham_Item_Deploy, "weapon_awp", "WeaponChange_p", 1);
  139.     RegisterHam(Ham_Item_Deploy, "weapon_scout", "WeaponChange_p", 1);
  140.     RegisterHam(Ham_Item_Deploy, "weapon_famas", "WeaponChange_p", 1);
  141.     RegisterHam(Ham_Item_Deploy, "weapon_galil", "WeaponChange_p", 1);
  142.     RegisterHam(Ham_Item_Deploy, "weapon_aug", "WeaponChange_p", 1);
  143.     RegisterHam(Ham_Item_Deploy, "weapon_m3", "WeaponChange_p", 1);
  144.     RegisterHam(Ham_Item_Deploy, "weapon_xm1014", "WeaponChange_p", 1);
  145.     RegisterHam(Ham_Item_Deploy, "weapon_knife", "WeaponChange_p", 1);
  146.     RegisterHam(Ham_Item_Deploy, "weapon_deagle", "WeaponChange_p", 1);
  147.     RegisterHam(Ham_Item_Deploy, "weapon_usp", "WeaponChange_p", 1);
  148.     RegisterHam(Ham_Item_Deploy, "weapon_glock18", "WeaponChange_p", 1);
  149.    
  150.     ////////////////////////////////////////
  151.     register_clcmd("say", "sayhook");     //Maradjon alul!
  152.     ////////////////////////////////////////
  153.    
  154.     set_task(1.0, "AutoCheck",_,_,_,"b");
  155. }
  156. public AutoCheck()
  157. {
  158.     new p[32],n;
  159.     get_players(p,n,"ch");
  160.     for(new i=0;i<n;i++)
  161.     {
  162.         new id = p[i];
  163.         if(Hud[id])
  164.         {
  165.             InfoHud(id);
  166.         }
  167.     }  
  168. }
  169. public InfoHud(id)
  170. {
  171.     new Target = pev(id, pev_iuser1) == 4 ? pev(id, pev_iuser2) : id;
  172.    
  173.     if(is_user_alive(id))
  174.     {
  175.         new iMasodperc, iPerc, iOra, Nev[32];
  176.         get_user_name(id, Nev, 31);
  177.         iMasodperc = Masodpercek[id] + get_user_time(id);
  178.         iPerc = iMasodperc / 60;
  179.         iOra = iPerc / 60;
  180.         iMasodperc = iMasodperc - iPerc * 60;
  181.         iPerc = iPerc - iOra * 60;
  182.         set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
  183.         show_hudmessage(id, "Üdv %s! ^n^nÖléseid: [ %d ] ^nRangod: [ %s ] ^nJátszott idő: %d óra %d perc %d mp", Nev, Oles[id],Rangok[Rang[id]][Szint], iOra, iPerc, iMasodperc);
  184.     }
  185.     else
  186.     {
  187.         new iMasodperc, iPerc, iOra;
  188.         iMasodperc = Masodpercek[Target] + get_user_time(Target);
  189.         iPerc = iMasodperc / 60;
  190.         iOra = iPerc / 60;
  191.         iMasodperc = iMasodperc - iPerc * 60;
  192.         iPerc = iPerc - iOra * 60;
  193.         set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
  194.         show_hudmessage(id, "Nézett játékos adatai: ^n^nÖléseid: [ %d ] ^nRangod: [ %s ] ^nJátszott idő: %d óra %d perc %d mp", Oles[id],Rangok[Rang[id]][Szint],  iOra, iPerc, iMasodperc);
  195.     }
  196. }
  197. public showrang(id)
  198. {
  199.     if(Rangok[Rang[id]+1][Szint])
  200.     {
  201.         client_print_color(id, print_team_default, "^4[%s] ^3Rang: ^4%s ^1| ^3Öléseid: ^4%d ^1| ^3Kell még: ^4%d", gChatPrefix, Rangok[Rang[id]][Szint], Oles[id], Rangok[Rang[id]][Xp]);
  202.     }
  203.     else
  204.     {
  205.         client_print_color(id, print_team_default, "^4[%s] ^3Rang: ^4%s ^1| ^3Ölések: ^4%d", gChatPrefix, Rangok[Rang[id]][Szint], Oles[id]);
  206.         client_print_color(id, print_team_default, "^4[%s] ^1Elérted a legmagasabb ^3rangot.", gChatPrefix);
  207.     }
  208.     return PLUGIN_HANDLED;
  209. }
  210. public kills()
  211. {
  212.     new Gyilkos = read_data(1);
  213.     new Aldozat = read_data(2);
  214.    
  215.     if(Gyilkos == Aldozat)
  216.         return PLUGIN_HANDLED;
  217.    
  218.     Oles[Gyilkos] ++;
  219.    
  220.     while(Oles[Gyilkos] >= Rangok[Rang[Gyilkos]][Xp])
  221.         Rang[Gyilkos]++;
  222.    
  223.     return PLUGIN_HANDLED;
  224. }
  225. public Addolas(id)
  226. {
  227.     g_uPoints[id][M4A1] += 50;
  228.     g_uPoints[id][AK47] += 50;
  229.     g_uPoints[id][AWP] += 50;
  230.     g_uPoints[id][SCOUT] += 50;
  231.     g_uPoints[id][FAMAS] += 50;
  232.     g_uPoints[id][GALIL] += 50;
  233.     g_uPoints[id][AUG] += 50;
  234.     g_uPoints[id][M3] += 50;
  235.     g_uPoints[id][XM1014] += 50;
  236.     g_uPoints[id][KNIFE] += 50;
  237.     g_uPoints[id][DEAGLE] += 50;
  238.     g_uPoints[id][USP] += 50;
  239.     g_uPoints[id][GLOCK] += 50;
  240. }
  241. public plugin_precache() {
  242.     for(new i;i < sizeof(WeaponM4A1); i++) precache_model(WeaponM4A1[i][ModelName]);
  243.     for(new i;i < sizeof(WeaponAK47); i++) precache_model(WeaponAK47[i][ModelName]);
  244.     for(new i;i < sizeof(WeaponAWP); i++) precache_model(WeaponAWP[i][ModelName]);
  245.     for(new i;i < sizeof(WeaponSCOUT); i++) precache_model(WeaponSCOUT[i][ModelName]);
  246.     for(new i;i < sizeof(WeaponFAMAS); i++) precache_model(WeaponFAMAS[i][ModelName]);
  247.     for(new i;i < sizeof(WeaponGALIL); i++) precache_model(WeaponGALIL[i][ModelName]);
  248.     for(new i;i < sizeof(WeaponAUG); i++) precache_model(WeaponAUG[i][ModelName]);
  249.     for(new i;i < sizeof(WeaponM3); i++) precache_model(WeaponM3[i][ModelName]);
  250.     for(new i;i < sizeof(WeaponXM1014); i++) precache_model(WeaponXM1014[i][ModelName]);
  251.     for(new i;i < sizeof(WeaponKNIFE); i++) precache_model(WeaponKNIFE[i][ModelName]);
  252.     for(new i;i < sizeof(WeaponDEAGLE); i++) precache_model(WeaponDEAGLE[i][ModelName]);
  253.     for(new i;i < sizeof(WeaponUSP); i++) precache_model(WeaponUSP[i][ModelName]);
  254.     for(new i;i < sizeof(WeaponGLOCK); i++) precache_model(WeaponGLOCK[i][ModelName]);
  255. }
  256. public WeaponChange_p(iEnt)
  257. {
  258.     new id = get_pdata_cbase(iEnt, 41, 4);
  259.    
  260.     if(!is_user_alive(id) || !is_user_connected(id))
  261.         return HAM_IGNORED;
  262.    
  263.     new Weapon = cs_get_weapon_id(iEnt);
  264.    
  265.     switch(Weapon)
  266.     {
  267.         case CSW_M4A1: entity_set_string(id, EV_SZ_viewmodel, WeaponM4A1[g_SelectedGun[id][M4A1]][ModelName]);
  268.             case CSW_AK47: entity_set_string(id, EV_SZ_viewmodel, WeaponAK47[g_SelectedGun[id][AK47]][ModelName]);
  269.             case CSW_AWP: entity_set_string(id, EV_SZ_viewmodel, WeaponAWP[g_SelectedGun[id][AWP]][ModelName]);
  270.             case CSW_SCOUT: entity_set_string(id, EV_SZ_viewmodel, WeaponSCOUT[g_SelectedGun[id][SCOUT]][ModelName]);
  271.             case CSW_FAMAS: entity_set_string(id, EV_SZ_viewmodel, WeaponFAMAS[g_SelectedGun[id][FAMAS]][ModelName]);
  272.             case CSW_GALIL: entity_set_string(id, EV_SZ_viewmodel, WeaponGALIL[g_SelectedGun[id][GALIL]][ModelName]);
  273.             case CSW_AUG: entity_set_string(id, EV_SZ_viewmodel, WeaponAUG[g_SelectedGun[id][AUG]][ModelName]);
  274.             case CSW_M3: entity_set_string(id, EV_SZ_viewmodel, WeaponM3[g_SelectedGun[id][M3]][ModelName]);
  275.             case CSW_XM1014: entity_set_string(id, EV_SZ_viewmodel, WeaponXM1014[g_SelectedGun[id][XM1014]][ModelName]);
  276.             case CSW_KNIFE: entity_set_string(id, EV_SZ_viewmodel, WeaponKNIFE[g_SelectedGun[id][KNIFE]][ModelName]);
  277.             case CSW_DEAGLE: entity_set_string(id, EV_SZ_viewmodel, WeaponDEAGLE[g_SelectedGun[id][DEAGLE]][ModelName]);
  278.             case CSW_USP: entity_set_string(id, EV_SZ_viewmodel, WeaponUSP[g_SelectedGun[id][USP]][ModelName]);
  279.             case CSW_GLOCK18: entity_set_string(id, EV_SZ_viewmodel, WeaponGLOCK[g_SelectedGun[id][GLOCK]][ModelName]);
  280.         }
  281.     return HAM_IGNORED;
  282. }
  283. public Halal() {
  284.    
  285.     new iAttacker = read_data(1);
  286.     new iVictim = read_data(2);
  287.     new iHs = read_data(3);
  288.    
  289.     if(iAttacker == iVictim || iAttacker == 0) return PLUGIN_HANDLED;
  290.     new iPoints = iHs ? HEADSHOT_POINT : KILL_POINT;
  291.    
  292.     switch(get_user_weapon(iAttacker)) {
  293.         case CSW_M4A1: g_uPoints[iAttacker][M4A1] += iPoints;
  294.             case CSW_AK47: g_uPoints[iAttacker][AK47] += iPoints;
  295.             case CSW_AWP: g_uPoints[iAttacker][AWP] += iPoints;
  296.             case CSW_SCOUT: g_uPoints[iAttacker][SCOUT] += iPoints;
  297.             case CSW_FAMAS: g_uPoints[iAttacker][FAMAS] += iPoints;
  298.             case CSW_GALIL: g_uPoints[iAttacker][GALIL] += iPoints;
  299.             case CSW_AUG: g_uPoints[iAttacker][AUG] += iPoints;
  300.             case CSW_M3: g_uPoints[iAttacker][M3] += iPoints;
  301.             case CSW_XM1014: g_uPoints[iAttacker][XM1014] += iPoints;
  302.             case CSW_KNIFE: g_uPoints[iAttacker][KNIFE] += iPoints;
  303.             case CSW_DEAGLE: g_uPoints[iAttacker][DEAGLE] += iPoints;
  304.             case CSW_USP: g_uPoints[iAttacker][USP] += iPoints;
  305.             case CSW_GLOCK18: g_uPoints[iAttacker][GLOCK] += iPoints;
  306.         }
  307.     set_hudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
  308.     ShowSyncHudMsg(gSyncHud, iAttacker, "+%i Pont", iPoints);
  309.     return PLUGIN_CONTINUE;
  310. }
  311. public main_menu(id)
  312. {
  313.     new sTitle[128];
  314.     format(sTitle, charsmax(sTitle), "[%s] \dFun \r» \d[ Főmenü \r]", gChatPrefix);
  315.     new iMenu = menu_create(sTitle, "menu_main_h");
  316.    
  317.     menu_additem(iMenu, "\r===>\d[\rFegyver Skinek\d]", "1", 0);
  318.     menu_additem(iMenu, "\rAdatkezelő", "2", 0);
  319.     //menu_additem(iMenu, "\rSzabályzat", "3", 0);
  320.    
  321.     menu_display(id, iMenu, 0);
  322.    
  323. }
  324. public menu_main_h(id, menu, item)
  325. {
  326.     if(item == MENU_EXIT)
  327.     {
  328.         menu_destroy(menu);
  329.         return;
  330.     }
  331.    
  332.     new data[9], Name[64];
  333.     new access, callback;
  334.     menu_item_getinfo(menu, item, access, data,charsmax(data), Name,charsmax(Name), callback);
  335.     new key = str_to_num(data);
  336.    
  337.     switch(key)
  338.     {
  339.         case 1: menu_storage(id);
  340.             case 2: {
  341.             if(get_user_flags(id) & ADMIN_IMMUNITY) SendItems(id);
  342.             else
  343.                 client_print_color(id, print_team_default, "^3[%s] ^1Ezt a menut csak ^4Tulajdonos ^1hasznalhatja!", gChatPrefix)
  344.         }
  345.     }
  346. }
  347. public menu_storage(id)
  348. {
  349.     new sTitle[128];
  350.     format(sTitle, charsmax(sTitle), "[%s] \dFun \r» \d[ Fegyver Skinek \r]", gChatPrefix);
  351.     new iMenu = menu_create(sTitle, "menu_storage_h");
  352.    
  353.     menu_additem(iMenu, "\rM4A1 \ySkinek", "1", 0);
  354.     menu_additem(iMenu, "\rAK47 \ySkinek", "2", 0);
  355.     menu_additem(iMenu, "\rAWP \ySkinek", "3", 0);
  356.     menu_additem(iMenu, "\rSCOUT \ySkinek", "4", 0);
  357.     menu_additem(iMenu, "\rFAMAS \ySkinek", "5", 0);
  358.     menu_additem(iMenu, "\rAUG  \ySkinek", "6", 0);
  359.     menu_additem(iMenu, "\rGALIL \ySkinek", "7", 0);
  360.     menu_additem(iMenu, "\rM3 \ySkinek", "8", 0);
  361.     menu_additem(iMenu, "\rXM1014 \ySkinek", "9", 0);
  362.     menu_additem(iMenu, "\rKNIFE \ySkinek", "10", 0);
  363.     menu_additem(iMenu, "\rDEAGLE \ySkinek", "11", 0);
  364.     menu_additem(iMenu, "\rUSP \ySkinek", "12", 0);
  365.     menu_additem(iMenu, "\rGLOCK18 \ySkinek", "13", 0);
  366.    
  367.     menu_display(id, iMenu, 0);
  368.    
  369. }
  370. public menu_storage_h(id, menu, item)
  371. {
  372.     if(item == MENU_EXIT)
  373.     {
  374.         menu_destroy(menu);
  375.         return;
  376.     }
  377.    
  378.     new data[9], Name[64];
  379.     new access, callback;
  380.     menu_item_getinfo(menu, item, access, data,charsmax(data), Name,charsmax(Name), callback);
  381.     new key = str_to_num(data);
  382.    
  383.     switch(key)
  384.     {
  385.         case 1: m4a1_menu(id);
  386.             case 2: ak47_menu(id);
  387.             case 3: awp_menu(id);
  388.             case 4: scout_menu(id);
  389.             case 5: famas_menu(id);
  390.             case 6: aug_menu(id);
  391.             case 7: galil_menu(id);
  392.             case 8: m3_menu(id);
  393.             case 9: xm1014_menu(id);
  394.             case 10: knife_menu(id);
  395.             case 11: deagle_menu(id);
  396.             case 12: usp_menu(id);
  397.             case 13: glock_menu(id);
  398.            
  399.     }
  400. }  
  401. public m4a1_menu(id) {
  402.    
  403.     new sTitle[128];
  404.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wM4A1 Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][M4A1]);
  405.     new iMenu = menu_create(sTitle, "m4a1_handler");
  406.    
  407.     for(new i;i < sizeof(WeaponM4A1); i++)
  408.     {
  409.         new a[6]; num_to_str(i, a, 5);
  410.         if(WeaponM4A1[i][Points] <= g_uPoints[id][M4A1])
  411.         {
  412.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponM4A1[i][GunName],g_uPoints[id][M4A1],WeaponM4A1[i][Points]);
  413.         }
  414.         else if(WeaponM4A1[i][Points] > g_uPoints[id][M4A1])
  415.         {
  416.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponM4A1[i][GunName],g_uPoints[id][M4A1],WeaponM4A1[i][Points]);
  417.         }
  418.         menu_additem(iMenu, sTitle, a);
  419.     }
  420.    
  421.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  422.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  423.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  424.    
  425.     menu_display(id, iMenu, 0);
  426. }
  427.  
  428. public m4a1_handler(id, menu, item) {
  429.     if( item == MENU_EXIT )
  430.     {
  431.         menu_destroy(menu);
  432.         return PLUGIN_HANDLED;
  433.     }
  434.     new data[9], szName[64];
  435.     new access, callback;
  436.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  437.     new key = str_to_num(data);
  438.    
  439.     if(WeaponM4A1[item][Points] <= g_uPoints[id][M4A1])
  440.     {
  441.         g_SelectedGun[id][M4A1] = item;
  442.     }
  443.     else
  444.     {
  445.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  446.     }
  447.    
  448.     menu_destroy(menu);
  449.     return PLUGIN_HANDLED;
  450. }
  451. public ak47_menu(id) {
  452.    
  453.     new sTitle[128];
  454.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wAK47 Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][AK47]);
  455.     new iMenu = menu_create(sTitle, "ak47_handler");
  456.    
  457.     for(new i;i < sizeof(WeaponAK47); i++)
  458.     {
  459.         new a[6]; num_to_str(i, a, 5);
  460.         if(WeaponAK47[i][Points] <= g_uPoints[id][AK47])
  461.         {
  462.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponAK47[i][GunName],g_uPoints[id][AK47],WeaponAK47[i][Points]);
  463.         }
  464.         else if(WeaponAK47[i][Points] > g_uPoints[id][AK47])
  465.         {
  466.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponAK47[i][GunName],g_uPoints[id][AK47],WeaponAK47[i][Points]);
  467.         }
  468.         menu_additem(iMenu, sTitle, a);
  469.     }
  470.    
  471.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  472.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  473.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  474.    
  475.     menu_display(id, iMenu, 0);
  476. }
  477.  
  478. public ak47_handler(id, menu, item) {
  479.     if( item == MENU_EXIT )
  480.     {
  481.         menu_destroy(menu);
  482.         return PLUGIN_HANDLED;
  483.     }
  484.     new data[9], szName[64];
  485.     new access, callback;
  486.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  487.     new key = str_to_num(data);
  488.    
  489.     if(WeaponAK47[item][Points] <= g_uPoints[id][AK47])
  490.     {
  491.         g_SelectedGun[id][AK47] = item;
  492.     }
  493.     else
  494.     {
  495.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  496.     }
  497.    
  498.     menu_destroy(menu);
  499.     return PLUGIN_HANDLED;
  500. }
  501. public awp_menu(id) {
  502.    
  503.     new sTitle[128];
  504.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wAWP Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][AWP]);
  505.     new iMenu = menu_create(sTitle, "awp_handler");
  506.    
  507.     for(new i;i < sizeof(WeaponAWP); i++)
  508.     {
  509.         new a[6]; num_to_str(i, a, 5);
  510.         if(WeaponAWP[i][Points] <= g_uPoints[id][AWP])
  511.         {
  512.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponAWP[i][GunName],g_uPoints[id][AWP],WeaponAWP[i][Points]);
  513.         }
  514.         else if(WeaponAWP[i][Points] > g_uPoints[id][AWP])
  515.         {
  516.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponAWP[i][GunName],g_uPoints[id][AWP],WeaponAWP[i][Points]);
  517.         }
  518.         menu_additem(iMenu, sTitle, a);
  519.     }
  520.    
  521.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  522.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  523.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  524.    
  525.     menu_display(id, iMenu, 0);
  526. }
  527.  
  528. public awp_handler(id, menu, item) {
  529.     if( item == MENU_EXIT )
  530.     {
  531.         menu_destroy(menu);
  532.         return PLUGIN_HANDLED;
  533.     }
  534.     new data[9], szName[64];
  535.     new access, callback;
  536.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  537.     new key = str_to_num(data);
  538.    
  539.     if(WeaponAWP[item][Points] <= g_uPoints[id][AWP])
  540.     {
  541.         g_SelectedGun[id][AWP] = item;
  542.     }
  543.     else
  544.     {
  545.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  546.     }
  547.    
  548.     menu_destroy(menu);
  549.     return PLUGIN_HANDLED;
  550. }
  551. public scout_menu(id) {
  552.    
  553.     new sTitle[128];
  554.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wSCOUT Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][SCOUT]);
  555.     new iMenu = menu_create(sTitle, "scout_handler");
  556.    
  557.     for(new i;i < sizeof(WeaponSCOUT); i++)
  558.     {
  559.         new a[6]; num_to_str(i, a, 5);
  560.         if(WeaponSCOUT[i][Points] <= g_uPoints[id][SCOUT])
  561.         {
  562.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponSCOUT[i][GunName],g_uPoints[id][SCOUT],WeaponSCOUT[i][Points]);
  563.         }
  564.         else if(WeaponSCOUT[i][Points] > g_uPoints[id][SCOUT])
  565.         {
  566.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponSCOUT[i][GunName],g_uPoints[id][SCOUT],WeaponSCOUT[i][Points]);
  567.         }
  568.         menu_additem(iMenu, sTitle, a);
  569.     }
  570.    
  571.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  572.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  573.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  574.    
  575.     menu_display(id, iMenu, 0);
  576. }
  577.  
  578. public scout_handler(id, menu, item) {
  579.     if( item == MENU_EXIT )
  580.     {
  581.         menu_destroy(menu);
  582.         return PLUGIN_HANDLED;
  583.     }
  584.     new data[9], szName[64];
  585.     new access, callback;
  586.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  587.     new key = str_to_num(data);
  588.    
  589.     if(WeaponSCOUT[item][Points] <= g_uPoints[id][SCOUT])
  590.     {
  591.         g_SelectedGun[id][SCOUT] = item;
  592.     }
  593.     else
  594.     {
  595.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  596.     }
  597.    
  598.     menu_destroy(menu);
  599.     return PLUGIN_HANDLED;
  600. }
  601. public famas_menu(id) {
  602.    
  603.     new sTitle[128];
  604.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wFAMAS Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][FAMAS]);
  605.     new iMenu = menu_create(sTitle, "m4a1_handler");
  606.    
  607.     for(new i;i < sizeof(WeaponFAMAS); i++)
  608.     {
  609.         new a[6]; num_to_str(i, a, 5);
  610.         if(WeaponFAMAS[i][Points] <= g_uPoints[id][FAMAS])
  611.         {
  612.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponFAMAS[i][GunName],g_uPoints[id][FAMAS],WeaponFAMAS[i][Points]);
  613.         }
  614.         else if(WeaponFAMAS[i][Points] > g_uPoints[id][FAMAS])
  615.         {
  616.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponFAMAS[i][GunName],g_uPoints[id][FAMAS],WeaponFAMAS[i][Points]);
  617.         }
  618.         menu_additem(iMenu, sTitle, a);
  619.     }
  620.    
  621.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  622.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  623.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  624.    
  625.     menu_display(id, iMenu, 0);
  626. }
  627.  
  628. public famas_handler(id, menu, item) {
  629.     if( item == MENU_EXIT )
  630.     {
  631.         menu_destroy(menu);
  632.         return PLUGIN_HANDLED;
  633.     }
  634.     new data[9], szName[64];
  635.     new access, callback;
  636.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  637.     new key = str_to_num(data);
  638.    
  639.     if(WeaponFAMAS[item][Points] <= g_uPoints[id][FAMAS])
  640.     {
  641.         g_SelectedGun[id][FAMAS] = item;
  642.     }
  643.     else
  644.     {
  645.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  646.     }
  647.    
  648.     menu_destroy(menu);
  649.     return PLUGIN_HANDLED;
  650. }
  651. public galil_menu(id) {
  652.    
  653.     new sTitle[128];
  654.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wGALIL Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][GALIL]);
  655.     new iMenu = menu_create(sTitle, "galil_handler");
  656.    
  657.     for(new i;i < sizeof(WeaponGALIL); i++)
  658.     {
  659.         new a[6]; num_to_str(i, a, 5);
  660.         if(WeaponGALIL[i][Points] <= g_uPoints[id][GALIL])
  661.         {
  662.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponGALIL[i][GunName],g_uPoints[id][GALIL],WeaponGALIL[i][Points]);
  663.         }
  664.         else if(WeaponGALIL[i][Points] > g_uPoints[id][GALIL])
  665.         {
  666.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponGALIL[i][GunName],g_uPoints[id][GALIL],WeaponGALIL[i][Points]);
  667.         }
  668.         menu_additem(iMenu, sTitle, a);
  669.     }
  670.    
  671.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  672.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  673.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  674.    
  675.     menu_display(id, iMenu, 0);
  676. }
  677.  
  678. public galil_handler(id, menu, item) {
  679.     if( item == MENU_EXIT )
  680.     {
  681.         menu_destroy(menu);
  682.         return PLUGIN_HANDLED;
  683.     }
  684.     new data[9], szName[64];
  685.     new access, callback;
  686.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  687.     new key = str_to_num(data);
  688.    
  689.     if(WeaponGALIL[item][Points] <= g_uPoints[id][GALIL])
  690.     {
  691.         g_SelectedGun[id][GALIL] = item;
  692.     }
  693.     else
  694.     {
  695.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  696.     }
  697.    
  698.     menu_destroy(menu);
  699.     return PLUGIN_HANDLED;
  700. }
  701. public aug_menu(id) {
  702.    
  703.     new sTitle[128];
  704.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wAUG Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][AUG]);
  705.     new iMenu = menu_create(sTitle, "aug_handler");
  706.    
  707.     for(new i;i < sizeof(WeaponAUG); i++)
  708.     {
  709.         new a[6]; num_to_str(i, a, 5);
  710.         if(WeaponAUG[i][Points] <= g_uPoints[id][AUG])
  711.         {
  712.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponAUG[i][GunName],g_uPoints[id][AUG],WeaponAUG[i][Points]);
  713.         }
  714.         else if(WeaponAUG[i][Points] > g_uPoints[id][AUG])
  715.         {
  716.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponAUG[i][GunName],g_uPoints[id][AUG],WeaponAUG[i][Points]);
  717.         }
  718.         menu_additem(iMenu, sTitle, a);
  719.     }
  720.    
  721.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  722.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  723.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  724.    
  725.     menu_display(id, iMenu, 0);
  726. }
  727.  
  728. public aug_handler(id, menu, item) {
  729.     if( item == MENU_EXIT )
  730.     {
  731.         menu_destroy(menu);
  732.         return PLUGIN_HANDLED;
  733.     }
  734.     new data[9], szName[64];
  735.     new access, callback;
  736.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  737.     new key = str_to_num(data);
  738.    
  739.     if(WeaponAUG[item][Points] <= g_uPoints[id][AUG])
  740.     {
  741.         g_SelectedGun[id][AUG] = item;
  742.     }
  743.     else
  744.     {
  745.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  746.     }
  747.    
  748.     menu_destroy(menu);
  749.     return PLUGIN_HANDLED;
  750. }
  751. public m3_menu(id) {
  752.    
  753.     new sTitle[128];
  754.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wM3 Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][M3]);
  755.     new iMenu = menu_create(sTitle, "m3_handler");
  756.    
  757.     for(new i;i < sizeof(WeaponM3); i++)
  758.     {
  759.         new a[6]; num_to_str(i, a, 5);
  760.         if(WeaponM3[i][Points] <= g_uPoints[id][M3])
  761.         {
  762.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponM3[i][GunName],g_uPoints[id][M3],WeaponM3[i][Points]);
  763.         }
  764.         else if(WeaponM3[i][Points] > g_uPoints[id][M3])
  765.         {
  766.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponM3[i][GunName],g_uPoints[id][M3],WeaponM3[i][Points]);
  767.         }
  768.         menu_additem(iMenu, sTitle, a);
  769.     }
  770.    
  771.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  772.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  773.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  774.    
  775.     menu_display(id, iMenu, 0);
  776. }
  777.  
  778. public m3_handler(id, menu, item) {
  779.     if( item == MENU_EXIT )
  780.     {
  781.         menu_destroy(menu);
  782.         return PLUGIN_HANDLED;
  783.     }
  784.     new data[9], szName[64];
  785.     new access, callback;
  786.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  787.     new key = str_to_num(data);
  788.    
  789.     if(WeaponM3[item][Points] <= g_uPoints[id][M3])
  790.     {
  791.         g_SelectedGun[id][M3] = item;
  792.     }
  793.     else
  794.     {
  795.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  796.     }
  797.    
  798.     menu_destroy(menu);
  799.     return PLUGIN_HANDLED;
  800. }
  801. public xm1014_menu(id) {
  802.    
  803.     new sTitle[128];
  804.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wXM1014 Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][XM1014]);
  805.     new iMenu = menu_create(sTitle, "xm1014_handler");
  806.    
  807.     for(new i;i < sizeof(WeaponXM1014); i++)
  808.     {
  809.         new a[6]; num_to_str(i, a, 5);
  810.         if(WeaponXM1014[i][Points] <= g_uPoints[id][XM1014])
  811.         {
  812.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponXM1014[i][GunName],g_uPoints[id][XM1014],WeaponXM1014[i][Points]);
  813.         }
  814.         else if(WeaponXM1014[i][Points] > g_uPoints[id][XM1014])
  815.         {
  816.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponXM1014[i][GunName],g_uPoints[id][XM1014],WeaponXM1014[i][Points]);
  817.         }
  818.         menu_additem(iMenu, sTitle, a);
  819.     }
  820.    
  821.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  822.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  823.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  824.    
  825.     menu_display(id, iMenu, 0);
  826. }
  827.  
  828. public xm1014_handler(id, menu, item) {
  829.     if( item == MENU_EXIT )
  830.     {
  831.         menu_destroy(menu);
  832.         return PLUGIN_HANDLED;
  833.     }
  834.     new data[9], szName[64];
  835.     new access, callback;
  836.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  837.     new key = str_to_num(data);
  838.    
  839.     if(WeaponXM1014[item][Points] <= g_uPoints[id][XM1014])
  840.     {
  841.         g_SelectedGun[id][XM1014] = item;
  842.     }
  843.     else
  844.     {
  845.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  846.     }
  847.    
  848.     menu_destroy(menu);
  849.     return PLUGIN_HANDLED;
  850. }
  851. public knife_menu(id) {
  852.    
  853.     new sTitle[128];
  854.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wKNIFE Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][KNIFE]);
  855.     new iMenu = menu_create(sTitle, "knife_handler");
  856.    
  857.     for(new i;i < sizeof(WeaponKNIFE); i++)
  858.     {
  859.         new a[6]; num_to_str(i, a, 5);
  860.         if(WeaponKNIFE[i][Points] <= g_uPoints[id][KNIFE])
  861.         {
  862.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponKNIFE[i][GunName],g_uPoints[id][KNIFE],WeaponKNIFE[i][Points]);
  863.         }
  864.         else if(WeaponKNIFE[i][Points] > g_uPoints[id][KNIFE])
  865.         {
  866.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponKNIFE[i][GunName],g_uPoints[id][KNIFE],WeaponKNIFE[i][Points]);
  867.         }
  868.         menu_additem(iMenu, sTitle, a);
  869.     }
  870.    
  871.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  872.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  873.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  874.    
  875.     menu_display(id, iMenu, 0);
  876. }
  877.  
  878. public knife_handler(id, menu, item) {
  879.     if( item == MENU_EXIT )
  880.     {
  881.         menu_destroy(menu);
  882.         return PLUGIN_HANDLED;
  883.     }
  884.     new data[9], szName[64];
  885.     new access, callback;
  886.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  887.     new key = str_to_num(data);
  888.    
  889.     if(WeaponKNIFE[item][Points] <= g_uPoints[id][KNIFE])
  890.     {
  891.         g_SelectedGun[id][KNIFE] = item;
  892.     }
  893.     else
  894.     {
  895.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  896.     }
  897.    
  898.     menu_destroy(menu);
  899.     return PLUGIN_HANDLED;
  900. }
  901. public deagle_menu(id) {
  902.    
  903.     new sTitle[128];
  904.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wDEAGLE Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][DEAGLE]);
  905.     new iMenu = menu_create(sTitle, "knife_handler");
  906.    
  907.     for(new i;i < sizeof(WeaponDEAGLE); i++)
  908.     {
  909.         new a[6]; num_to_str(i, a, 5);
  910.         if(WeaponDEAGLE[i][Points] <= g_uPoints[id][DEAGLE])
  911.         {
  912.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponDEAGLE[i][GunName],g_uPoints[id][DEAGLE],WeaponDEAGLE[i][Points]);
  913.         }
  914.         else if(WeaponDEAGLE[i][Points] > g_uPoints[id][DEAGLE])
  915.         {
  916.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponDEAGLE[i][GunName],g_uPoints[id][DEAGLE],WeaponDEAGLE[i][Points]);
  917.         }
  918.         menu_additem(iMenu, sTitle, a);
  919.     }
  920.    
  921.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  922.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  923.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  924.    
  925.     menu_display(id, iMenu, 0);
  926. }
  927.  
  928. public deagle_handler(id, menu, item) {
  929.     if( item == MENU_EXIT )
  930.     {
  931.         menu_destroy(menu);
  932.         return PLUGIN_HANDLED;
  933.     }
  934.     new data[9], szName[64];
  935.     new access, callback;
  936.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  937.     new key = str_to_num(data);
  938.    
  939.     if(WeaponDEAGLE[item][Points] <= g_uPoints[id][DEAGLE])
  940.     {
  941.         g_SelectedGun[id][DEAGLE] = item;
  942.     }
  943.     else
  944.     {
  945.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  946.     }
  947.    
  948.     menu_destroy(menu);
  949.     return PLUGIN_HANDLED;
  950. }
  951. public usp_menu(id) {
  952.    
  953.     new sTitle[128];
  954.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wUSP Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][USP]);
  955.     new iMenu = menu_create(sTitle, "usp_handler");
  956.    
  957.     for(new i;i < sizeof(WeaponUSP); i++)
  958.     {
  959.         new a[6]; num_to_str(i, a, 5);
  960.         if(WeaponUSP[i][Points] <= g_uPoints[id][USP])
  961.         {
  962.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponUSP[i][GunName],g_uPoints[id][USP],WeaponUSP[i][Points]);
  963.         }
  964.         else if(WeaponDEAGLE[i][Points] > g_uPoints[id][USP])
  965.         {
  966.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponUSP[i][GunName],g_uPoints[id][USP],WeaponUSP[i][Points]);
  967.         }
  968.         menu_additem(iMenu, sTitle, a);
  969.     }
  970.    
  971.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  972.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  973.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  974.    
  975.     menu_display(id, iMenu, 0);
  976. }
  977.  
  978. public usp_handler(id, menu, item) {
  979.     if( item == MENU_EXIT )
  980.     {
  981.         menu_destroy(menu);
  982.         return PLUGIN_HANDLED;
  983.     }
  984.     new data[9], szName[64];
  985.     new access, callback;
  986.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  987.     new key = str_to_num(data);
  988.    
  989.     if(WeaponUSP[item][Points] <= g_uPoints[id][USP])
  990.     {
  991.         g_SelectedGun[id][USP] = item;
  992.     }
  993.     else
  994.     {
  995.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  996.     }
  997.    
  998.     menu_destroy(menu);
  999.     return PLUGIN_HANDLED;
  1000. }
  1001. public glock_menu(id) {
  1002.    
  1003.     new sTitle[128];
  1004.     format(sTitle, charsmax(sTitle), "[~|ChamPs|~] \r» \wGLOCK18 Skinek \r[\dPontjaid: \y%d\r]", g_uPoints[id][GLOCK]);
  1005.     new iMenu = menu_create(sTitle, "glock_handler");
  1006.    
  1007.     for(new i;i < sizeof(WeaponUSP); i++)
  1008.     {
  1009.         new a[6]; num_to_str(i, a, 5);
  1010.         if(WeaponGLOCK[i][Points] <= g_uPoints[id][GLOCK])
  1011.         {
  1012.             format(sTitle, charsmax(sTitle), "\w%s \y*Elérhető", WeaponGLOCK[i][GunName],g_uPoints[id][GLOCK],WeaponGLOCK[i][Points]);
  1013.         }
  1014.         else if(WeaponGLOCK[i][Points] > g_uPoints[id][GLOCK])
  1015.         {
  1016.             format(sTitle, charsmax(sTitle), "\d%s  \y[\d%d\w/\r%d\y]", WeaponGLOCK[i][GunName],g_uPoints[id][GLOCK],WeaponGLOCK[i][Points]);
  1017.         }
  1018.         menu_additem(iMenu, sTitle, a);
  1019.     }
  1020.    
  1021.     menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
  1022.     menu_setprop(iMenu, MPROP_NEXTNAME, "Tovább");
  1023.     menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
  1024.    
  1025.     menu_display(id, iMenu, 0);
  1026. }
  1027.  
  1028. public glock_handler(id, menu, item) {
  1029.     if( item == MENU_EXIT )
  1030.     {
  1031.         menu_destroy(menu);
  1032.         return PLUGIN_HANDLED;
  1033.     }
  1034.     new data[9], szName[64];
  1035.     new access, callback;
  1036.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  1037.     new key = str_to_num(data);
  1038.    
  1039.     if(WeaponGLOCK[item][Points] <= g_uPoints[id][GLOCK])
  1040.     {
  1041.         g_SelectedGun[id][GLOCK] = item;
  1042.     }
  1043.     else
  1044.     {
  1045.         client_print_color(id, print_team_default, "[%s] \r» ^1Sajnálom, nincs elegendő ^3Pontod^3!", gChatPrefix);
  1046.     }
  1047.    
  1048.     menu_destroy(menu);
  1049.     return PLUGIN_HANDLED;
  1050. }
  1051. public SendItems(id)
  1052. {
  1053.     new menu = menu_create(".:ghfgh:. \rAdatkezelo menu", "SendItems_handler" );
  1054.    
  1055.     menu_additem(menu, "\y»\w Pontok Adasa", "1", 0);
  1056.     menu_additem(menu, "\y»\w Pontok Elvevese", "2", 0);
  1057.    
  1058.     menu_setprop(menu, MPROP_EXITNAME, "Kilepes");
  1059.     menu_display(id, menu, 0);
  1060. }
  1061. public SendItems_handler(id, menu, item){
  1062.     if(item == MENU_EXIT )
  1063.     {
  1064.         menu_destroy(menu);
  1065.         return PLUGIN_HANDLED;
  1066.     }
  1067.     new data[9], szName[64];
  1068.     new access, callback;
  1069.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  1070.     new key = str_to_num(data);
  1071.    
  1072.     switch(key)
  1073.     {
  1074.         case 1:{ChoosePlayer(id); iChoosedMode = 1;}
  1075.         case 2:{ChoosePlayer(id); iChoosedMode = 2;}
  1076.     }
  1077.     return PLUGIN_HANDLED;
  1078. }
  1079. public ChoosePlayer(id)
  1080. {
  1081.     new iPlayers[32], iPnum, iTempID;  
  1082.     new sName[MAX_NAME_LENGTH], sTempID[10];  
  1083.     get_players(iPlayers, iPnum);  
  1084.    
  1085.     new menu = menu_create("\rValaszd ki a jatekost:", "ChoosePlayer_handler");
  1086.    
  1087.     for(new i; i < iPnum; i++)
  1088.     {
  1089.         iTempID = iPlayers[i];  
  1090.         get_user_name(iTempID, sName, charsmax(sName));
  1091.         num_to_str(iTempID, sTempID, charsmax(sTempID));    
  1092.         menu_additem(menu, sName, sTempID, 0);  
  1093.     }
  1094.     menu_display(id, menu, 0);
  1095. }
  1096. public ChoosePlayer_handler(id, menu, item)
  1097. {
  1098.     if(item == MENU_EXIT)
  1099.     {
  1100.         menu_destroy(menu);
  1101.         return PLUGIN_HANDLED;
  1102.     }
  1103.     new data[6], szName[64];
  1104.     new access, callback;
  1105.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);    
  1106.     x_tempid = str_to_num(data);
  1107.     console_print(id, "%d", iChoosedMode)
  1108.    
  1109.     client_cmd(id, "messagemode type_itemremoveoradd");
  1110.    
  1111.     menu_destroy(menu);
  1112.     return PLUGIN_HANDLED;
  1113. }
  1114. public type_itemammount(id)
  1115. {
  1116.     new sItem[128], iItemAmmount, sSenderName[MAX_NAME_LENGTH], sTargetName[MAX_NAME_LENGTH];
  1117.     read_args(sItem, charsmax(sItem));
  1118.     remove_quotes(sItem);
  1119.    
  1120.     get_user_name(id, sSenderName, charsmax(sSenderName));
  1121.     get_user_name(x_tempid, sTargetName, charsmax(sTargetName));
  1122.    
  1123.     iItemAmmount = str_to_num(sItem);
  1124.    
  1125.     if(iItemAmmount < 0)
  1126.     {
  1127.         client_print_color(id, print_team_blue, "^3[.:hkh:.] ^1Az osszeg nem lehet kisebb, mint 0!");
  1128.         return PLUGIN_HANDLED;
  1129.     }
  1130.    
  1131.     switch(iChoosedMode)
  1132.     {
  1133.         case 1:
  1134.         {
  1135.             g_uPoints[M4A1][x_tempid] += iItemAmmount
  1136.             g_uPoints[AK47][x_tempid] += iItemAmmount
  1137.             g_uPoints[AWP][x_tempid] += iItemAmmount
  1138.             g_uPoints[SCOUT][x_tempid] += iItemAmmount
  1139.             g_uPoints[FAMAS][x_tempid] += iItemAmmount
  1140.             g_uPoints[GALIL][x_tempid] += iItemAmmount
  1141.             g_uPoints[AUG][x_tempid] += iItemAmmount
  1142.             g_uPoints[M3][x_tempid] += iItemAmmount
  1143.             g_uPoints[XM1014][x_tempid] += iItemAmmount
  1144.             g_uPoints[KNIFE][x_tempid] += iItemAmmount
  1145.             g_uPoints[DEAGLE][x_tempid] += iItemAmmount
  1146.             g_uPoints[USP][x_tempid] += iItemAmmount
  1147.             g_uPoints[GLOCK][x_tempid] += iItemAmmount
  1148.            
  1149.             client_print_color(id, print_team_blue, "^3[.:hkh:.] ^1Sikeresen jovairtal:^4 %d ^1Pontot, neki:^4 %s", iItemAmmount, sTargetName);
  1150.             client_print_color(x_tempid, print_team_blue, "^3[.:hjkhj:.] ^1Jovairtak neked^4 %d ^1Pontot! BY:^4 %s", iItemAmmount, sTargetName);
  1151.             client_print_color(id, print_team_blue, "^3»Admin: %s | Jatekos: %s | Osszeg: %d | Topus: Pont Jovairas", sSenderName, sTargetName, iItemAmmount);
  1152.             return PLUGIN_HANDLED;
  1153.         }
  1154.         case 2:
  1155.         {
  1156.             g_uPoints[M4A1][x_tempid] -= iItemAmmount
  1157.             g_uPoints[AK47][x_tempid] -= iItemAmmount
  1158.             g_uPoints[AWP][x_tempid] -= iItemAmmount
  1159.             g_uPoints[SCOUT][x_tempid] -= iItemAmmount
  1160.             g_uPoints[FAMAS][x_tempid] -= iItemAmmount
  1161.             g_uPoints[GALIL][x_tempid] -= iItemAmmount
  1162.             g_uPoints[AUG][x_tempid] -= iItemAmmount
  1163.             g_uPoints[M3][x_tempid] -= iItemAmmount
  1164.             g_uPoints[XM1014][x_tempid] -= iItemAmmount
  1165.             g_uPoints[KNIFE][x_tempid] -= iItemAmmount
  1166.             g_uPoints[DEAGLE][x_tempid] -= iItemAmmount
  1167.             g_uPoints[USP][x_tempid] -= iItemAmmount
  1168.             g_uPoints[GLOCK][x_tempid] -= iItemAmmount
  1169.            
  1170.             client_print_color(id, print_team_blue, "^3[.::.] ^1 ^1Sikeresen elvettel:^4 %d ^1Pontokat, tole:^4 %s", iItemAmmount, sTargetName);
  1171.             client_print_color(x_tempid, print_team_blue, "^3[.::.] ^1 ^1Ellett veve^4 %d ^1Pontok! BY:^4 %s", iItemAmmount, sTargetName);
  1172.             client_print_color(id, print_team_blue, "^3[.::.] ^1Admin: %s | Jatekos: %s | Osszeg: %d | Tipus: Pont Elvetel", sSenderName, sTargetName, iItemAmmount);
  1173.             return PLUGIN_HANDLED;
  1174.         }
  1175.     }
  1176.     return PLUGIN_HANDLED;
  1177. }
  1178. public client_putinserver(id)
  1179. {
  1180.     if(is_user_bot(id))
  1181.         return;
  1182.    
  1183.     betoltve[id] = false;
  1184.     Hud[id] = 1;
  1185.     Masodpercek[id] = 0;
  1186.     Rang[id] = 0;
  1187.     Oles[id] = 0;
  1188.     g_uPoints[id][M4A1] = 0;
  1189.     g_uPoints[id][AK47] = 0;
  1190.     g_uPoints[id][AWP] = 0;
  1191.     g_uPoints[id][SCOUT] = 0;
  1192.     g_uPoints[id][FAMAS] = 0;
  1193.     g_uPoints[id][GALIL] = 0;
  1194.     g_uPoints[id][AUG] = 0;
  1195.     g_uPoints[id][M3] = 0;
  1196.     g_uPoints[id][XM1014] = 0;
  1197.     g_uPoints[id][KNIFE] = 0;
  1198.     g_uPoints[id][DEAGLE] = 0;
  1199.     g_uPoints[id][USP] = 0;
  1200.     g_uPoints[id][GLOCK] = 0;
  1201.     g_SelectedGun[id][M4A1] = 0;
  1202.     g_SelectedGun[id][AK47] = 0;
  1203.     g_SelectedGun[id][AWP] = 0;
  1204.     g_SelectedGun[id][SCOUT] = 0;
  1205.     g_SelectedGun[id][FAMAS] = 0;
  1206.     g_SelectedGun[id][GALIL] = 0;
  1207.     g_SelectedGun[id][AUG] = 0;
  1208.     g_SelectedGun[id][M3] = 0;
  1209.     g_SelectedGun[id][XM1014] = 0;
  1210.     g_SelectedGun[id][KNIFE] = 0;
  1211.     g_SelectedGun[id][DEAGLE] = 0;
  1212.     g_SelectedGun[id][USP] = 0;
  1213.     g_SelectedGun[id][GLOCK] = 0;
  1214.    
  1215.     SelectDataTable(id);
  1216. }
  1217. public client_disconnected(id)
  1218. {
  1219.     if(is_user_bot(id))
  1220.         return;
  1221.    
  1222.     TableUpdate(id);
  1223.    
  1224. }
  1225. new Handle:g_SqlTuple;
  1226. public plugin_cfg()
  1227. {
  1228.     //Kiszolgáló | Felhasználó | Jelszó | Adatbázis
  1229.    
  1230.     g_SqlTuple = SQL_MakeDbTuple("mysql8.srkhost.eu:3306", "u29514_Q9S6QiB1On", "9DuKrQSL4!4z9Rcr9R4.sf1Y", "s29514_valami");
  1231.     CreateTable();
  1232. }
  1233. public CreateTable(){
  1234.     new iLen;
  1235.     static sQuery[10048];
  1236.    
  1237.     iLen += formatex(sQuery[iLen], charsmax(sQuery), "CREATE TABLE IF NOT EXISTS \`%s\` ", Tablename);
  1238.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "( ");
  1239.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`Id\` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,");
  1240.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`SteamId\` varchar(64) NOT NULL,");
  1241.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`Hud\` int(11) NOT NULL,");
  1242.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`Masodpercek\` int(11) NOT NULL,");
  1243.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`Szint\` int(11) NOT NULL,");
  1244.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`Oles\` int(11) NOT NULL,");
  1245.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsM4A1\` int(11) NOT NULL,");
  1246.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsAK47\` int(11) NOT NULL,");
  1247.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsAWP\` int(11) NOT NULL,");
  1248.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsSCOUT\` int(11) NOT NULL,");
  1249.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsFAMAS\` int(11) NOT NULL,");
  1250.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsGALIL\` int(11) NOT NULL,");
  1251.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsAUG\` int(11) NOT NULL,");
  1252.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsM3\` int(11) NOT NULL,");
  1253.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsXM1014\` int(11) NOT NULL,");
  1254.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsKNIFE\` int(11) NOT NULL,");
  1255.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsDEAGLE\` int(11) NOT NULL,");
  1256.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsUSP\` int(11) NOT NULL,");
  1257.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_uPointsGLOCK\` int(11) NOT NULL,");
  1258.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunM4A1\` int(11) NOT NULL,");
  1259.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunAK47\` int(11) NOT NULL,");
  1260.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunAWP\` int(11) NOT NULL,");
  1261.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunSCOUT\` int(11) NOT NULL,");
  1262.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunFAMAS\` int(11) NOT NULL,");
  1263.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunGALIL\` int(11) NOT NULL,");
  1264.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunAUG\` int(11) NOT NULL,");
  1265.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunM3\` int(11) NOT NULL,");
  1266.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunXM1014\` int(11) NOT NULL,");
  1267.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunKNIFE\` int(11) NOT NULL,");
  1268.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunDEAGLE\` int(11) NOT NULL,");
  1269.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunUSP\` int(11) NOT NULL,");
  1270.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "\`g_SelectedGunGLOCK\` int(11) NOT NULL)");
  1271.    
  1272.     SQL_ThreadQuery(g_SqlTuple, "TableCreateThread", sQuery);
  1273. }
  1274. public TableUpdate(id)
  1275. {
  1276.     if(betoltve[id]) {
  1277.         static sQuery[10048];
  1278.         new iLen, sSteamID[64];
  1279.         get_user_authid(id, sSteamID, charsmax(sSteamID));
  1280.        
  1281.         iLen += formatex(sQuery[iLen], charsmax(sQuery), "UPDATE \`%s\` SET ", Tablename);
  1282.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "Hud = ^"%i^",", Hud[id]);
  1283.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "Masodpercek = ^"%i^",", Masodpercek[id]+get_user_time(id));
  1284.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "Szint = ^"%i^", ", Rang[id]);
  1285.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "Oles = ^"%i^", ", Oles[id]);
  1286.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsM4A1 = ^"%i^",", g_uPoints[id][M4A1]);
  1287.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsAK47 = ^"%i^",", g_uPoints[id][AK47]);
  1288.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsAWP = ^"%i^",", g_uPoints[id][AWP]);
  1289.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsSCOUT = ^"%i^",", g_uPoints[id][SCOUT]);
  1290.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsFAMAS = ^"%i^",", g_uPoints[id][FAMAS]);
  1291.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsGALIL = ^"%i^",", g_uPoints[id][GALIL]);
  1292.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsAUG = ^"%i^",", g_uPoints[id][AUG]);
  1293.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsM3 = ^"%i^",", g_uPoints[id][M3]);
  1294.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsXM1014 = ^"%i^",", g_uPoints[id][XM1014]);
  1295.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsKNIFE = ^"%i^",", g_uPoints[id][KNIFE]);
  1296.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsDEAGLE = ^"%i^",", g_uPoints[id][DEAGLE]);
  1297.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsUSP = ^"%i^",", g_uPoints[id][USP]);
  1298.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsGLOCK = ^"%i^",", g_uPoints[id][GLOCK]);
  1299.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunAK47 = ^"%i^",", g_SelectedGun[id][AK47]);
  1300.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunAWP = ^"%i^",", g_SelectedGun[id][AWP]);
  1301.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunSCOUT = ^"%i^",", g_SelectedGun[id][SCOUT]);
  1302.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunFAMAS = ^"%i^",", g_SelectedGun[id][FAMAS]);
  1303.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunGALIL = ^"%i^",", g_SelectedGun[id][GALIL]);
  1304.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunAUG = ^"%i^",", g_SelectedGun[id][AUG]);
  1305.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunM3 = ^"%i^",", g_SelectedGun[id][M3]);
  1306.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunXM1014 = ^"%i^",", g_SelectedGun[id][XM1014]);
  1307.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunKNIFE = ^"%i^",", g_SelectedGun[id][KNIFE]);
  1308.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunDEAGLE = ^"%i^",", g_SelectedGun[id][DEAGLE]);
  1309.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunUSP = ^"%i^",", g_SelectedGun[id][USP]);
  1310.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunGLOCK = ^"%i^",", g_SelectedGun[id][GLOCK]);
  1311.        
  1312.         iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunM4A1 = ^"%i^" WHERE \`SteamId\` = ^"%s^";", g_SelectedGun[id][M4A1], sSteamID);
  1313.         SQL_ThreadQuery(g_SqlTuple, "QuerySetDataTable", sQuery);
  1314.     }
  1315. }
  1316. public TableCreateThread(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
  1317. {
  1318.     if(iFailState == TQUERY_CONNECT_FAILED)
  1319.         set_fail_state("[Create] Nem lehet csatlakozni az adatbazishoz!");
  1320.     else if(iFailState == TQUERY_QUERY_FAILED)
  1321.         set_fail_state("[Create] Lekerdezesi hiba");
  1322.     if(iErrcode)
  1323.         log_amx("[Create] Hiba:**!! %s !!**", sError);
  1324. }
  1325. public TableInsert(id)
  1326. {
  1327.     static sQuery[10048], sSteamID[64];
  1328.    
  1329.     get_user_authid(id, sSteamID, charsmax(sSteamID));
  1330.     formatex(sQuery, charsmax(sQuery), "INSERT INTO \`%s\` (\`SteamId\`) VALUES (^"%s^");", Tablename, sSteamID);
  1331.     SQL_ThreadQuery(g_SqlTuple, "QuerySetDataTable", sQuery);
  1332.     betoltve[id] = true;
  1333. }
  1334. public SelectDataTable(id)
  1335. {
  1336.     static sQuery[10048];
  1337.     new sData[1], sSteamID[64];
  1338.     sData[0] = id;
  1339.    
  1340.     get_user_authid(id, sSteamID, charsmax(sSteamID));
  1341.    
  1342.     formatex(sQuery, charsmax(sQuery), "SELECT * FROM \`%s\` WHERE SteamId = ^"%s^";", Tablename, sSteamID);
  1343.     SQL_ThreadQuery(g_SqlTuple, "QuerySelectDataTable", sQuery, sData, 1);
  1344. }
  1345. public QuerySelectDataTable(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
  1346. {
  1347.     if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
  1348.     {
  1349.         log_amx("[Insert] Hiba:**!! %s !!**", sError);
  1350.         return;
  1351.     }
  1352.     else
  1353.     {
  1354.         new id = sData[0];
  1355.        
  1356.         if(SQL_NumRows(sQuery) > 0)
  1357.         {
  1358.             Hud[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "Hud"));
  1359.             Masodpercek[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "Masodpercek"));
  1360.             Rang[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "Szint"));
  1361.             Oles[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "Oles"));
  1362.             g_uPoints[id][M4A1] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsM4A1"));
  1363.             g_uPoints[id][AK47] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsAK47"));
  1364.             g_uPoints[id][AWP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsAWP"));
  1365.             g_uPoints[id][SCOUT] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsSCOUT"));
  1366.             g_uPoints[id][FAMAS] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsFAMAS"));
  1367.             g_uPoints[id][GALIL] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsGALIL"));
  1368.             g_uPoints[id][AUG] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsAUG"));
  1369.             g_uPoints[id][M3] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsM3"));
  1370.             g_uPoints[id][XM1014] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsXM1014"));
  1371.             g_uPoints[id][KNIFE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsKNIFE"));
  1372.             g_uPoints[id][DEAGLE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsDEAGLE"));
  1373.             g_uPoints[id][USP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsUSP"));
  1374.             g_uPoints[id][GLOCK] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsGLOCK"));
  1375.             g_SelectedGun[id][M4A1] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunM4A1"));
  1376.             g_SelectedGun[id][AK47] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunAK47"));
  1377.             g_SelectedGun[id][AWP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunAWP"));
  1378.             g_SelectedGun[id][SCOUT] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunSCOUT"));
  1379.             g_SelectedGun[id][FAMAS] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunFAMAS"));
  1380.             g_SelectedGun[id][GALIL] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunGALIL"));
  1381.             g_SelectedGun[id][AUG] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunAUG"));
  1382.             g_SelectedGun[id][M3] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunM3"));
  1383.             g_SelectedGun[id][XM1014] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunXM1014"));
  1384.             g_SelectedGun[id][KNIFE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunKNIFE"));
  1385.             g_SelectedGun[id][DEAGLE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunDEAGLE"));
  1386.             g_SelectedGun[id][USP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunUSP"));
  1387.             g_SelectedGun[id][GLOCK] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunGLOCK"));
  1388.             betoltve[id] = true;
  1389.         }
  1390.         else
  1391.             TableInsert(id);
  1392.     }
  1393. }
  1394. public QuerySetDataTable(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
  1395. {
  1396.     if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
  1397.     {
  1398.         log_amx("[SetData] Hiba:**!! %s !!**", sError);
  1399.         return;
  1400.     }
  1401. }    
  1402. public sayhook(id)
  1403. {
  1404.     new sMessage[512], sText[128], sDeath[16], iLen, sName[64];
  1405.     read_args(sMessage, charsmax(sMessage));
  1406.     remove_quotes(sMessage);
  1407.    
  1408.     if(strlen(sMessage) == 0 || sMessage[0] == '/' || sMessage[0] == '@')
  1409.         return PLUGIN_HANDLED_MAIN;
  1410.    
  1411.     new iTeam, iColor;
  1412.     iTeam = get_user_team(id);
  1413.    
  1414.     switch(iTeam) //itt lehet elvalasztani hogy ha ctk irnak a tk kéken lássák, és fordítva, ha specek akkor szürkén látják.
  1415.     {
  1416.         case CS_TEAM_CT: iColor = -3; //kék
  1417.             case CS_TEAM_T: iColor = -2;//piros
  1418.             case CS_TEAM_SPECTATOR: iColor = -1;//szürke
  1419.         }
  1420.    
  1421.     format(sDeath, charsmax(sDeath), is_user_alive(id) ? "":"*Halott*");
  1422.     iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^1%s", sDeath);
  1423.     #if defined RANK_ON
  1424.     if(get_user_flags(id) & OWNER)
  1425.         iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^3[^4Tulajdonos^3]^1");
  1426.     else if(get_user_flags(id) & ADMIN_BAN)
  1427.         iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^3[^4Adminisztrátor^3]^1");
  1428.     else if(get_user_flags(id) & FOADMIN)
  1429.         iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^3[^4Moderátor^3]^1");
  1430.     else if(get_user_flags(id) & VIP)
  1431.         iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^3[^4Vip^3]^1");
  1432.     else
  1433.         iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^3[^4Játékos^3]^1");
  1434.    
  1435.     iLen += formatex(sText[iLen], charsmax(sText)-iLen, "^3[^4Rang: %s^3]^1~", Rangok[Rang[id]][Szint]);
  1436.     #endif
  1437.    
  1438.     #if defined RANK_OFF
  1439.     iLen += formatex(sText[iLen], charsmax(sText)-iLen, "~^3[^4Rang: %s^3]~", Rangok[Rang[id]][Szint]);
  1440.     #endif
  1441.    
  1442.     get_user_name(id, sName, charsmax(sName));
  1443.     format(sMessage, charsmax(sMessage), "%s ^1%s ^3»%s %s", sText, sName, get_user_flags(id) ? "^4" : "^3", sMessage);
  1444.    
  1445.     for(new i; i < get_maxplayers(); i++)
  1446.     {
  1447.         if(!is_user_connected(i))
  1448.             continue;
  1449.        
  1450.         client_print_color(i, iColor, sMessage);
  1451.     }
  1452.     return PLUGIN_HANDLED_MAIN;
  1453. }
  1454. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  1455. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  1456. */
  1457. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  1458. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  1459. */


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Adatkezelői hiba
HozzászólásElküldve: 2023.10.01. 04:16 
Offline
Jómunkásember
Avatar

Csatlakozott: 2019.07.12. 13:47
Hozzászólások: 305
Megköszönt másnak: 15 alkalommal
Megköszönték neki: 48 alkalommal
Add már fel, ez egy halott játék.

_________________
Munkáim / Segítkezésem
Serial BanSystem v3
Serial BanSystem v4
HerBoy - Avatár MultiMod


Avatár: 37.221.209.130:27350
HerBoy: 37.221.209.130:27295

Ők köszönték meg ~Shediboii nek ezt a hozzászólást: Dooz (2023.10.04. 09:12)
  Népszerűség: 2.27%


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  [ 2 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 54 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