hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.28. 17:28



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Google [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: Régi & új Főmenü
HozzászólásElküldve: 2022.09.23. 14:09 
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!

viewtopic.php?f=10&t=31115&hilit=B%C5%91v%C3%ADt%C3%A9s


Ebben a kódban található Főmenü részt szeretném ebbe a kódba! Köszönöm előre is ! :)


  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fakemeta>
  4. #include <cstrike>
  5. #include <sqlx>
  6.  
  7. #define PLUGIN "New Plug-In"
  8. #define VERSION "1.0"
  9. #define AUTHOR "author"
  10.  
  11. #define KILL_POINT 1
  12. #define HEADSHOT_POINT 5
  13. #define Tablename "Hlmodra_tabla_1" //SQL Tábla neve!//
  14.  
  15. enum _:GunDatas {
  16.     M4A1,
  17.     AK47,
  18.     AWP,
  19.     SCOUT,
  20.     FAMAS,
  21.     GALIL,
  22.     AUG,
  23.     M3,
  24.     XM1014,
  25.     KNIFE,
  26.     DEAGLE,
  27.     USP,
  28.     GLOCK
  29. }
  30. new g_SelectedGun[33][GunDatas], g_uPoints[33][GunDatas], g_Wpn[33];
  31. new sSteamID[64];
  32. new FunMentes[33];
  33.  
  34. new const gMenuPrefix[] = "\w[<<< Night~Warrior >>>]~\y»\yFun";
  35. new const gChatPrefix[] = "[<<< Night~Warrior >>>]"
  36.  
  37. enum _:DATA {
  38.     GunName[64],
  39.     ModelName[64],
  40.     Points[8]
  41. }
  42. new const WeaponM4A1[][DATA] = {
  43.     {"M4A1 | Default", "models/v_m4a1.mdl", 0, },
  44. }
  45. new const WeaponAK47[][DATA] = {
  46.     {"AK47 | Default", "models/v_ak47.mdl", 0, },
  47. }
  48. new const WeaponAWP[][DATA] = {
  49.     {"AWP | Default", "models/v_awp.mdl", 0, },
  50. }
  51. new const WeaponSCOUT[][DATA] = {
  52.     {"SCOUT | Default", "models/v_scout.mdl", 0, },
  53. }
  54. new const WeaponFAMAS[][DATA] = {
  55.     {"FAMAS | Default", "models/v_famas.mdl", 0, },
  56. }
  57. new const WeaponGALIL[][DATA] = {
  58.     {"GALIL | Default", "models/v_galil.mdl", 0, },
  59. }
  60. new const WeaponAUG[][DATA] = {
  61.     {"AUG | Default", "models/v_aug.mdl", 0, },
  62. }
  63. new const WeaponM3[][DATA] = {
  64.     {"M3 | Default", "models/v_m3.mdl", 0, },
  65. }
  66. new const WeaponXM1014[][DATA] = {
  67.     {"XM1014 | Default", "models/v_xm1014.mdl", 0, },
  68. }
  69. new const WeaponKNIFE[][DATA] = {
  70.     {"KNIFE | Default", "models/v_knife.mdl", 0, },
  71. }
  72. new const WeaponDEAGLE[][DATA] = {
  73.     {"DEAGLE | Default", "models/v_deagle.mdl", 0, },
  74. }
  75. new const WeaponUSP[][DATA] = {
  76.     {"USP | Default", "models/v_usp.mdl", 0, },
  77. }
  78. new const WeaponGLOCK[][DATA] = {
  79.     {"GLOCK18 | Default", "models/v_glock18.mdl", 0, },
  80. }  
  81. new const MainStrings[][] = {
  82.     "M4A1 Skinek",
  83.     "AK47 Skinek",
  84.     "AWP Skinek",
  85.     "SCOUT Skinek",
  86.     "FAMAS Skinek",
  87.     "GALIL Skinek",
  88.     "AUG Skinek",
  89.     "M3 Skinek",
  90.     "XM1014 Skinek",
  91.     "KNIFE Skinek",
  92.     "DEAGLE Skinek",
  93.     "USP Skinek",
  94.     "GLOCK18 Skinek"
  95. }
  96. public plugin_init() {
  97.     register_plugin(PLUGIN, VERSION, AUTHOR)
  98.     register_clcmd("say /menu", "openMainMenu")
  99.     register_clcmd("say /add", "Addolas")
  100.     register_impulse(201, "openMainMenu");
  101.     register_event("DeathMsg","Halal","a")
  102.     register_event("CurWeapon", "evChangeWeapon", "be", "1=1")
  103. }
  104. public Addolas(id)
  105. {
  106.     g_uPoints[id][M4A1] += 50
  107.     g_uPoints[id][AK47] += 50
  108.     g_uPoints[id][AWP] += 50
  109.     g_uPoints[id][SCOUT] += 50
  110.     g_uPoints[id][FAMAS] += 50
  111.     g_uPoints[id][GALIL] += 50
  112.     g_uPoints[id][AUG] += 50
  113.     g_uPoints[id][M3] += 50
  114.     g_uPoints[id][XM1014] += 50
  115.     g_uPoints[id][KNIFE] += 50
  116.     g_uPoints[id][DEAGLE] += 50
  117.     g_uPoints[id][USP] += 50
  118.     g_uPoints[id][GLOCK] += 50;
  119. }
  120. public plugin_precache() { 
  121.     for(new i;i < sizeof(WeaponM4A1); i++) precache_model(WeaponM4A1[i][ModelName])
  122.     for(new i;i < sizeof(WeaponAK47); i++) precache_model(WeaponAK47[i][ModelName])
  123.     for(new i;i < sizeof(WeaponAWP); i++) precache_model(WeaponAWP[i][ModelName])
  124.     for(new i;i < sizeof(WeaponSCOUT); i++) precache_model(WeaponSCOUT[i][ModelName])
  125.     for(new i;i < sizeof(WeaponFAMAS); i++) precache_model(WeaponFAMAS[i][ModelName])
  126.     for(new i;i < sizeof(WeaponGALIL); i++) precache_model(WeaponGALIL[i][ModelName])
  127.     for(new i;i < sizeof(WeaponAUG); i++) precache_model(WeaponAUG[i][ModelName])
  128.     for(new i;i < sizeof(WeaponM3); i++) precache_model(WeaponM3[i][ModelName])
  129.     for(new i;i < sizeof(WeaponXM1014); i++) precache_model(WeaponXM1014[i][ModelName])
  130.     for(new i;i < sizeof(WeaponKNIFE); i++) precache_model(WeaponKNIFE[i][ModelName])
  131.     for(new i;i < sizeof(WeaponDEAGLE); i++) precache_model(WeaponDEAGLE[i][ModelName])
  132.     for(new i;i < sizeof(WeaponUSP); i++) precache_model(WeaponUSP[i][ModelName])
  133.     for(new i;i < sizeof(WeaponGLOCK); i++) precache_model(WeaponGLOCK[i][ModelName])
  134. }
  135. public evChangeWeapon(id) {
  136.     switch(get_user_weapon(id)) {
  137.         case CSW_M4A1: entity_set_string(id, EV_SZ_viewmodel, WeaponM4A1[g_SelectedGun[id][M4A1]][ModelName]);
  138.             case CSW_AK47: entity_set_string(id, EV_SZ_viewmodel, WeaponAK47[g_SelectedGun[id][AK47]][ModelName]);
  139.             case CSW_AWP: entity_set_string(id, EV_SZ_viewmodel, WeaponAWP[g_SelectedGun[id][AWP]][ModelName]);
  140.             case CSW_SCOUT: entity_set_string(id, EV_SZ_viewmodel, WeaponSCOUT[g_SelectedGun[id][SCOUT]][ModelName]);
  141.             case CSW_FAMAS: entity_set_string(id, EV_SZ_viewmodel, WeaponFAMAS[g_SelectedGun[id][FAMAS]][ModelName]);
  142.             case CSW_GALIL: entity_set_string(id, EV_SZ_viewmodel, WeaponGALIL[g_SelectedGun[id][GALIL]][ModelName]);
  143.             case CSW_AUG: entity_set_string(id, EV_SZ_viewmodel, WeaponAUG[g_SelectedGun[id][AUG]][ModelName]);
  144.             case CSW_M3: entity_set_string(id, EV_SZ_viewmodel, WeaponM3[g_SelectedGun[id][M3]][ModelName]);
  145.             case CSW_XM1014: entity_set_string(id, EV_SZ_viewmodel, WeaponXM1014[g_SelectedGun[id][XM1014]][ModelName]);
  146.             case CSW_KNIFE: entity_set_string(id, EV_SZ_viewmodel, WeaponKNIFE[g_SelectedGun[id][KNIFE]][ModelName]);
  147.             case CSW_DEAGLE: entity_set_string(id, EV_SZ_viewmodel, WeaponDEAGLE[g_SelectedGun[id][DEAGLE]][ModelName]);
  148.             case CSW_USP: entity_set_string(id, EV_SZ_viewmodel, WeaponUSP[g_SelectedGun[id][USP]][ModelName]);
  149.             case CSW_GLOCK18: entity_set_string(id, EV_SZ_viewmodel, WeaponGLOCK[g_SelectedGun[id][GLOCK]][ModelName]);
  150.         }
  151.     return PLUGIN_CONTINUE
  152. }
  153. public Halal() {
  154.    
  155.     new iAttacker = read_data(1)
  156.     new iVictim = read_data(2)
  157.     new iHs = read_data(3)
  158.    
  159.     if(iAttacker == iVictim || iAttacker == 0) return PLUGIN_HANDLED
  160.     new iPoints = iHs ? HEADSHOT_POINT : KILL_POINT
  161.    
  162.     switch(get_user_weapon(iAttacker)) {
  163.         case CSW_M4A1: g_uPoints[iAttacker][M4A1] += iPoints
  164.             case CSW_AK47: g_uPoints[iAttacker][AK47] += iPoints
  165.             case CSW_AWP: g_uPoints[iAttacker][AWP] += iPoints
  166.             case CSW_SCOUT: g_uPoints[iAttacker][SCOUT] += iPoints
  167.             case CSW_FAMAS: g_uPoints[iAttacker][FAMAS] += iPoints
  168.             case CSW_GALIL: g_uPoints[iAttacker][GALIL] += iPoints
  169.             case CSW_AUG: g_uPoints[iAttacker][AUG] += iPoints
  170.             case CSW_M3: g_uPoints[iAttacker][M3] += iPoints
  171.             case CSW_XM1014: g_uPoints[iAttacker][XM1014] += iPoints
  172.             case CSW_KNIFE: g_uPoints[iAttacker][KNIFE] += iPoints
  173.             case CSW_DEAGLE: g_uPoints[iAttacker][DEAGLE] += iPoints
  174.             case CSW_USP: g_uPoints[iAttacker][USP] += iPoints
  175.             case CSW_GLOCK18: g_uPoints[iAttacker][GLOCK] += iPoints
  176.         }
  177.     set_hudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
  178.     show_hudmessage(iAttacker, "+%i Pont", iPoints);
  179.     return PLUGIN_CONTINUE;
  180. }
  181. public openMainMenu(id) {
  182.     new szMenu[121], String[6]
  183.     formatex(szMenu, charsmax(szMenu), "%s \wFőMenü", gChatPrefix);
  184.     new menu = menu_create(szMenu, "hMainMenu");
  185.    
  186.     for(new i ;i < sizeof(MainStrings); i++) {
  187.         num_to_str(i, String, 5)
  188.         formatex(szMenu, charsmax(szMenu), MainStrings[i]);
  189.         menu_additem(menu, szMenu, String);
  190.     }
  191.     menu_display(id, menu, 0);
  192.     return PLUGIN_HANDLED;
  193. }
  194. public hMainMenu(id, menu, item) {
  195.     if(item == MENU_EXIT) {
  196.         menu_destroy(menu);
  197.         return PLUGIN_HANDLED;
  198.     }
  199.     g_Wpn[id] = item+1
  200.     openSkinMenu(id)
  201.     menu_destroy(menu);
  202.     return PLUGIN_HANDLED;
  203. }
  204. public openSkinMenu(id) {
  205.     new szMenu[121], szMenu2[64], String[6]
  206.     if(g_Wpn[id] == 1) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][M4A1])
  207.     else if(g_Wpn[id] == 2) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][AK47])
  208.         else if(g_Wpn[id] == 3) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][AWP])
  209.         else if(g_Wpn[id] == 4) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][SCOUT])
  210.         else if(g_Wpn[id] == 5) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][FAMAS])
  211.         else if(g_Wpn[id] == 6) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][GALIL])
  212.         else if(g_Wpn[id] == 7) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][AUG])
  213.         else if(g_Wpn[id] == 8) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][M3])
  214.         else if(g_Wpn[id] == 9) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][XM1014])
  215.         else if(g_Wpn[id] == 10) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][KNIFE])
  216.         else if(g_Wpn[id] == 11) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][DEAGLE])
  217.         else if(g_Wpn[id] == 12) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][USP])
  218.         else if(g_Wpn[id] == 13) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix, MainStrings[g_Wpn[id]-1], g_uPoints[id][GLOCK])
  219.         new menu = menu_create(szMenu, "hSkinChooser");
  220.     if(g_Wpn[id] == 1) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  221.     MainStrings[g_Wpn[id]-1], g_uPoints[id][M4A1])
  222.     if(g_Wpn[id] == 2) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  223.     MainStrings[g_Wpn[id]-1], g_uPoints[id][AK47])
  224.     if(g_Wpn[id] == 3) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  225.     MainStrings[g_Wpn[id]-1], g_uPoints[id][AWP])
  226.     if(g_Wpn[id] == 4) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  227.     MainStrings[g_Wpn[id]-1], g_uPoints[id][SCOUT])
  228.     if(g_Wpn[id] == 5) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  229.     MainStrings[g_Wpn[id]-1], g_uPoints[id][FAMAS])
  230.     if(g_Wpn[id] == 6) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  231.     MainStrings[g_Wpn[id]-1], g_uPoints[id][GALIL])
  232.     if(g_Wpn[id] == 7) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  233.     MainStrings[g_Wpn[id]-1], g_uPoints[id][AUG])
  234.     if(g_Wpn[id] == 8) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  235.     MainStrings[g_Wpn[id]-1], g_uPoints[id][M3])
  236.     if(g_Wpn[id] == 9) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  237.     MainStrings[g_Wpn[id]-1], g_uPoints[id][XM1014])
  238.     if(g_Wpn[id] == 10) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  239.     MainStrings[g_Wpn[id]-1], g_uPoints[id][KNIFE])
  240.     if(g_Wpn[id] == 11) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  241.     MainStrings[g_Wpn[id]-1], g_uPoints[id][DEAGLE])
  242.     if(g_Wpn[id] == 12) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  243.     MainStrings[g_Wpn[id]-1], g_uPoints[id][USP])
  244.     if(g_Wpn[id] == 13) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\wPontjaid: \y%i\d", gChatPrefix,
  245.     MainStrings[g_Wpn[id]-1], g_uPoints[id][GLOCK])
  246.    
  247.     if(g_Wpn[id] == 1) {
  248.         for(new i; i < sizeof(WeaponM4A1); i++) {
  249.             num_to_str(i, String, 5)
  250.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponM4A1[i][Points]);
  251.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponM4A1[i][GunName], g_SelectedGun[id][M4A1] == i ? "\y{Kiválasztva}": szMenu2);
  252.             menu_additem(menu, szMenu, String);
  253.         }
  254.     }
  255.     else if(g_Wpn[id] == 2) {
  256.         for(new i; i < sizeof(WeaponAK47); i++) {
  257.             num_to_str(i, String, 5)
  258.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponAK47[i][Points]);
  259.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponAK47[i][GunName], g_SelectedGun[id][AK47] == i ? "\y{Kiválasztva}": szMenu2);
  260.             menu_additem(menu, szMenu, String);
  261.         }
  262.     }
  263.     else if(g_Wpn[id] == 3) {
  264.         for(new i; i < sizeof(WeaponAWP); i++) {
  265.             num_to_str(i, String, 5)
  266.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponAWP[i][Points]);
  267.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponAWP[i][GunName], g_SelectedGun[id][AWP] == i ? "\y{Kiválasztva}": szMenu2);
  268.             menu_additem(menu, szMenu, String);
  269.         }
  270.     }
  271.     else if(g_Wpn[id] == 4) {
  272.         for(new i; i < sizeof(WeaponSCOUT); i++) {
  273.             num_to_str(i, String, 5)
  274.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponSCOUT[i][Points]);
  275.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponSCOUT[i][GunName], g_SelectedGun[id][SCOUT] == i ? "\y{Kiválasztva}": szMenu2);
  276.             menu_additem(menu, szMenu, String);
  277.         }
  278.     }
  279.     else if(g_Wpn[id] == 5) {
  280.         for(new i; i < sizeof(WeaponFAMAS); i++) {
  281.             num_to_str(i, String, 5)
  282.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponFAMAS[i][Points]);
  283.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponFAMAS[i][GunName], g_SelectedGun[id][FAMAS] == i ? "\y{Kiválasztva}": szMenu2);
  284.             menu_additem(menu, szMenu, String);
  285.         }
  286.     }
  287.     else if(g_Wpn[id] == 6) {
  288.         for(new i; i < sizeof(WeaponGALIL); i++) {
  289.             num_to_str(i, String, 5)
  290.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponGALIL[i][Points]);
  291.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponGALIL[i][GunName], g_SelectedGun[id][GALIL] == i ? "\y{Kiválasztva}": szMenu2);
  292.             menu_additem(menu, szMenu, String);
  293.         }
  294.     }
  295.     else if(g_Wpn[id] == 7) {
  296.         for(new i; i < sizeof(WeaponAUG); i++) {
  297.             num_to_str(i, String, 5)
  298.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponAUG[i][Points]);
  299.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponAUG[i][GunName], g_SelectedGun[id][AUG] == i ? "\y{Kiválasztva}": szMenu2);
  300.             menu_additem(menu, szMenu, String);
  301.         }
  302.     }
  303.     else if(g_Wpn[id] == 8) {
  304.         for(new i; i < sizeof(WeaponM3); i++) {
  305.             num_to_str(i, String, 5)
  306.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponM3[i][Points]);
  307.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponM3[i][GunName], g_SelectedGun[id][M3] == i ? "\y{Kiválasztva}": szMenu2);
  308.             menu_additem(menu, szMenu, String);
  309.         }
  310.     }
  311.     else if(g_Wpn[id] == 9) {
  312.         for(new i; i < sizeof(WeaponXM1014); i++) {
  313.             num_to_str(i, String, 5)
  314.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponXM1014[i][Points]);
  315.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponXM1014[i][GunName], g_SelectedGun[id][XM1014] == i ? "\y{Kiválasztva}": szMenu2);
  316.             menu_additem(menu, szMenu, String);
  317.         }
  318.     }
  319.     else if(g_Wpn[id] == 10) {
  320.         for(new i; i < sizeof(WeaponKNIFE); i++) {
  321.             num_to_str(i, String, 5)
  322.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponKNIFE[i][Points]);
  323.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponKNIFE[i][GunName], g_SelectedGun[id][KNIFE] == i ? "\y{Kiválasztva}": szMenu2);
  324.             menu_additem(menu, szMenu, String);
  325.         }
  326.     }
  327.     else if(g_Wpn[id] == 11) {
  328.         for(new i; i < sizeof(WeaponDEAGLE); i++) {
  329.             num_to_str(i, String, 5)
  330.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponDEAGLE[i][Points]);
  331.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponDEAGLE[i][GunName], g_SelectedGun[id][DEAGLE] == i ? "\y{Kiválasztva}": szMenu2);
  332.             menu_additem(menu, szMenu, String);
  333.         }
  334.     }
  335.     else if(g_Wpn[id] == 12) {
  336.         for(new i; i < sizeof(WeaponUSP); i++) {
  337.             num_to_str(i, String, 5)
  338.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponUSP[i][Points]);
  339.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponUSP[i][GunName], g_SelectedGun[id][USP] == i ? "\y{Kiválasztva}": szMenu2);
  340.             menu_additem(menu, szMenu, String);
  341.         }
  342.     }
  343.     else if(g_Wpn[id] == 13) {
  344.         for(new i; i < sizeof(WeaponGLOCK); i++) {
  345.             num_to_str(i, String, 5)
  346.             formatex(szMenu2, charsmax(szMenu2), "\r{%i} Ölés", WeaponGLOCK[i][Points]);
  347.             formatex(szMenu, charsmax(szMenu), "%s %s", WeaponGLOCK[i][GunName], g_SelectedGun[id][GLOCK] == i ? "\y{Kiválasztva}": szMenu2);
  348.             menu_additem(menu, szMenu, String);
  349.         }
  350.     }
  351.     menu_display(id, menu, 0);
  352.     return PLUGIN_HANDLED;
  353. }
  354. public hSkinChooser(id, menu, item) {
  355.     if(item == MENU_EXIT)
  356.     {
  357.         menu_destroy(menu);
  358.         return PLUGIN_CONTINUE;
  359.     }
  360.     switch(g_Wpn[id]) {
  361.         case 1: {
  362.             if(g_uPoints[id][M4A1] >= WeaponM4A1[item][Points]) {
  363.                 g_SelectedGun[id][M4A1] = item
  364.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  365.             }
  366.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  367.         }
  368.         case 2: {
  369.             if(g_uPoints[id][AK47] >= WeaponAK47[item][Points]) {
  370.                 g_SelectedGun[id][AK47] = item
  371.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  372.             }
  373.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  374.         }
  375.         case 3: {
  376.             if(g_uPoints[id][AWP] >= WeaponAWP[item][Points]) {
  377.                 g_SelectedGun[id][AWP] = item
  378.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  379.             }
  380.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  381.         }
  382.         case 4: {
  383.             if(g_uPoints[id][SCOUT] >= WeaponSCOUT[item][Points]) {
  384.                 g_SelectedGun[id][SCOUT] = item
  385.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  386.             }
  387.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  388.         }
  389.         case 5: {
  390.             if(g_uPoints[id][FAMAS] >= WeaponFAMAS[item][Points]) {
  391.                 g_SelectedGun[id][FAMAS] = item
  392.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  393.             }
  394.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  395.         }
  396.         case 6: {
  397.             if(g_uPoints[id][GALIL] >= WeaponGALIL[item][Points]) {
  398.                 g_SelectedGun[id][GALIL] = item
  399.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  400.             }
  401.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  402.         }
  403.         case 7: {
  404.             if(g_uPoints[id][AUG] >= WeaponAUG[item][Points]) {
  405.                 g_SelectedGun[id][AUG] = item
  406.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  407.             }
  408.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  409.         }
  410.         case 8: {
  411.             if(g_uPoints[id][M3] >= WeaponM3[item][Points]) {
  412.                 g_SelectedGun[id][M3] = item
  413.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  414.             }
  415.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  416.         }
  417.         case 9: {
  418.             if(g_uPoints[id][XM1014] >= WeaponXM1014[item][Points]) {
  419.                 g_SelectedGun[id][XM1014] = item
  420.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  421.             }
  422.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  423.         }
  424.         case 10: {
  425.             if(g_uPoints[id][KNIFE] >= WeaponKNIFE[item][Points]) {
  426.                 g_SelectedGun[id][KNIFE] = item
  427.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  428.             }
  429.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  430.         }
  431.         case 11: {
  432.             if(g_uPoints[id][DEAGLE] >= WeaponDEAGLE[item][Points]) {
  433.                 g_SelectedGun[id][DEAGLE] = item
  434.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  435.             }
  436.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  437.         }
  438.         case 12: {
  439.             if(g_uPoints[id][USP] >= WeaponUSP[item][Points]) {
  440.                 g_SelectedGun[id][USP] = item
  441.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  442.             }
  443.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  444.         }
  445.         case 13: {
  446.             if(g_uPoints[id][GLOCK] >= WeaponGLOCK[item][Points]) {
  447.                 g_SelectedGun[id][GLOCK] = item
  448.                 client_print_color(id, print_team_blue, "^4%s ^1Sikeresen aktiváltad a skint!", gChatPrefix);
  449.             }
  450.             else client_print_color(id, print_team_blue, "^4%s ^1Sajnálom, nincs elegendő ^3pontod^3!", gChatPrefix);
  451.         }
  452.     }
  453.     menu_destroy(menu);
  454.     return PLUGIN_HANDLED;
  455. }
  456. public client_putinserver(id)
  457. {
  458.     if(is_user_bot(id))
  459.         return;
  460.    
  461.     FunMentes[id] = 1;
  462.     g_uPoints[id][M4A1] = 0;
  463.     g_uPoints[id][AK47] = 0;
  464.     g_uPoints[id][AWP] = 0;
  465.     g_uPoints[id][SCOUT] = 0;
  466.     g_uPoints[id][FAMAS] = 0;
  467.     g_uPoints[id][GALIL] = 0;
  468.     g_uPoints[id][AUG] = 0;
  469.     g_uPoints[id][M3] = 0;
  470.     g_uPoints[id][XM1014] = 0;
  471.     g_uPoints[id][KNIFE] = 0;
  472.     g_uPoints[id][DEAGLE] = 0;
  473.     g_uPoints[id][USP] = 0;
  474.     g_uPoints[id][GLOCK] = 0;
  475.     g_SelectedGun[id][M4A1] = 0;
  476.     g_SelectedGun[id][AK47] = 0;
  477.     g_SelectedGun[id][AWP] = 0;
  478.     g_SelectedGun[id][SCOUT] = 0;
  479.     g_SelectedGun[id][FAMAS] = 0;
  480.     g_SelectedGun[id][GALIL] = 0;
  481.     g_SelectedGun[id][AUG] = 0;
  482.     g_SelectedGun[id][M3] = 0;
  483.     g_SelectedGun[id][XM1014] = 0;
  484.     g_SelectedGun[id][KNIFE] = 0;
  485.     g_SelectedGun[id][DEAGLE] = 0;
  486.     g_SelectedGun[id][USP] = 0;
  487.     g_SelectedGun[id][GLOCK] = 0;
  488.    
  489.     SelectDataTable(id);
  490. }
  491. public client_disconnected(id)
  492. {
  493.     if(is_user_bot(id))
  494.         return;
  495.    
  496.     FunMentes[id] = 0;
  497.     TableUpdate(id);
  498. }
  499. new Handle:g_SqlTuple;
  500. public plugin_cfg()
  501. {
  502.     //Kiszolgáló | Felhasználó | Jelszó | Adatbázis
  503.    
  504.     g_SqlTuple = SQL_MakeDbTuple("maria.srkhost.eu", "", "", "s17878_newszerver");
  505.     CreateTable();
  506. }
  507. public CreateTable(){
  508.     new iLen;
  509.     static sQuery[10048];
  510.    
  511.     iLen += formatex(sQuery[iLen], charsmax(sQuery), "CREATE TABLE IF NOT EXISTS `%s` ", Tablename);
  512.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "( ");
  513.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`Id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,");
  514.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`SteamId` varchar(64) NOT NULL,");
  515.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsM4A1` int(11) NOT NULL,");
  516.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsAK47` int(11) NOT NULL,");
  517.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsAWP` int(11) NOT NULL,");
  518.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsSCOUT` int(11) NOT NULL,");
  519.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsFAMAS` int(11) NOT NULL,");
  520.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsGALIL` int(11) NOT NULL,");
  521.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsAUG` int(11) NOT NULL,");
  522.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsM3` int(11) NOT NULL,");
  523.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsXM1014` int(11) NOT NULL,");
  524.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsKNIFE` int(11) NOT NULL,");
  525.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsDEAGLE` int(11) NOT NULL,");
  526.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsUSP` int(11) NOT NULL,");
  527.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_uPointsGLOCK` int(11) NOT NULL,");
  528.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunM4A1` int(11) NOT NULL,");
  529.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunAK47` int(11) NOT NULL,");
  530.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunAWP` int(11) NOT NULL,");
  531.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunSCOUT` int(11) NOT NULL,");
  532.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunFAMAS` int(11) NOT NULL,");
  533.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunGALIL` int(11) NOT NULL,");
  534.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunAUG` int(11) NOT NULL,");
  535.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunM3` int(11) NOT NULL,");
  536.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunXM1014` int(11) NOT NULL,");
  537.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunKNIFE` int(11) NOT NULL,");
  538.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunDEAGLE` int(11) NOT NULL,");
  539.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunUSP` int(11) NOT NULL,");
  540.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`g_SelectedGunGLOCK` int(11) NOT NULL)");
  541.    
  542.     SQL_ThreadQuery(g_SqlTuple, "TableCreateThread", sQuery);
  543. }
  544. public TableUpdate(id)
  545. {
  546.     static sQuery[10048];
  547.     new iLen, sSteamID[64];
  548.     get_user_authid(id, sSteamID, charsmax(sSteamID));
  549.    
  550.     iLen += formatex(sQuery[iLen], charsmax(sQuery), "UPDATE `%s` SET ", Tablename);
  551.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsM4A1 = ^"%i^",", g_uPoints[id][M4A1]);
  552.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsAK47 = ^"%i^",", g_uPoints[id][AK47]);
  553.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsAWP = ^"%i^",", g_uPoints[id][AWP]);
  554.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsSCOUT = ^"%i^",", g_uPoints[id][SCOUT]);
  555.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsFAMAS = ^"%i^",", g_uPoints[id][FAMAS]);
  556.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsGALIL = ^"%i^",", g_uPoints[id][GALIL]);
  557.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsAUG = ^"%i^",", g_uPoints[id][AUG]);
  558.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsM3 = ^"%i^",", g_uPoints[id][M3]);
  559.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsXM1014 = ^"%i^",", g_uPoints[id][XM1014]);
  560.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsKNIFE = ^"%i^",", g_uPoints[id][KNIFE]);
  561.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsDEAGLE = ^"%i^",", g_uPoints[id][DEAGLE]);
  562.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsUSP = ^"%i^",", g_uPoints[id][USP]);
  563.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_uPointsGLOCK = ^"%i^",", g_uPoints[id][GLOCK]);
  564.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunAK47 = ^"%i^",", g_SelectedGun[id][AK47]);
  565.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunAWP = ^"%i^",", g_SelectedGun[id][AWP]);
  566.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunSCOUT = ^"%i^",", g_SelectedGun[id][SCOUT]);
  567.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunFAMAS = ^"%i^",", g_SelectedGun[id][FAMAS]);
  568.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunGALIL = ^"%i^",", g_SelectedGun[id][GALIL]);
  569.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunAUG = ^"%i^",", g_SelectedGun[id][AUG]);
  570.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunM3 = ^"%i^",", g_SelectedGun[id][M3]);
  571.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunXM1014 = ^"%i^",", g_SelectedGun[id][XM1014]);
  572.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunKNIFE = ^"%i^",", g_SelectedGun[id][KNIFE]);
  573.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunDEAGLE = ^"%i^",", g_SelectedGun[id][DEAGLE]);
  574.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunUSP = ^"%i^",", g_SelectedGun[id][USP]);
  575.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunGLOCK = ^"%i^",", g_SelectedGun[id][GLOCK]);
  576.    
  577.     iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "g_SelectedGunM4A1 = ^"%i^" WHERE `SteamId` = ^"%s^";", g_SelectedGun[id][M4A1], sSteamID);
  578.     SQL_ThreadQuery(g_SqlTuple, "QuerySetDataTable", sQuery);
  579. }
  580. public TableCreateThread(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
  581. {
  582.     if(iFailState == TQUERY_CONNECT_FAILED)
  583.         set_fail_state("[Create] Nem lehet csatlakozni az adatbazishoz!");
  584.     else if(iFailState == TQUERY_QUERY_FAILED)
  585.         set_fail_state("[Create] Lekerdezesi hiba");
  586.     if(iErrcode)
  587.         log_amx("[Create] Hiba:**!! %s !!**", sError);
  588. }
  589. public TableInsert(id)
  590. {
  591.     static sQuery[10048], sSteamID[64];
  592.    
  593.     get_user_authid(id, sSteamID, charsmax(sSteamID));
  594.     formatex(sQuery, charsmax(sQuery), "INSERT INTO `%s` (`SteamId`) VALUES (^"%s^");", Tablename, sSteamID);
  595.     SQL_ThreadQuery(g_SqlTuple, "QuerySetDataTable", sQuery);
  596. }
  597. public SelectDataTable(id)
  598. {
  599.     static sQuery[10048];
  600.     new sData[1], sSteamID[64];
  601.     sData[0] = id;
  602.    
  603.     get_user_authid(id, sSteamID, charsmax(sSteamID));
  604.    
  605.     formatex(sQuery, charsmax(sQuery), "SELECT * FROM `%s` WHERE SteamId = ^"%s^";", Tablename, sSteamID);
  606.     SQL_ThreadQuery(g_SqlTuple, "QuerySelectDataTable", sQuery, sData, 2);
  607. }
  608. public QuerySelectDataTable(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
  609. {
  610.     if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
  611.     {
  612.         log_amx("[Insert] Hiba:**!! %s !!**", sError);
  613.         return;
  614.     }
  615.     else
  616.     {
  617.         new id = sData[0];
  618.        
  619.         if(SQL_NumRows(sQuery) > 0)
  620.         {
  621.             g_uPoints[id][M4A1] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsM4A1"));
  622.             g_uPoints[id][AK47] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsAK47"));
  623.             g_uPoints[id][AWP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsAWP"));
  624.             g_uPoints[id][SCOUT] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsSCOUT"));
  625.             g_uPoints[id][FAMAS] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsFAMAS"));
  626.             g_uPoints[id][GALIL] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsGALIL"));
  627.             g_uPoints[id][AUG] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsAUG"));
  628.             g_uPoints[id][M3] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsM3"));
  629.             g_uPoints[id][XM1014] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsXM1014"));
  630.             g_uPoints[id][KNIFE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsKNIFE"));
  631.             g_uPoints[id][DEAGLE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsDEAGLE"));
  632.             g_uPoints[id][USP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsUSP"));
  633.             g_uPoints[id][GLOCK] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_uPointsGLOCK"));
  634.             g_SelectedGun[id][M4A1] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunM4A1"));
  635.             g_SelectedGun[id][AK47] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunAK47"));
  636.             g_SelectedGun[id][AWP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunAWP"));
  637.             g_SelectedGun[id][SCOUT] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunSCOUT"));
  638.             g_SelectedGun[id][FAMAS] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunFAMAS"));
  639.             g_SelectedGun[id][GALIL] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunGALIL"));
  640.             g_SelectedGun[id][AUG] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunAUG"));
  641.             g_SelectedGun[id][M3] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunM3"));
  642.             g_SelectedGun[id][XM1014] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunXM1014"));
  643.             g_SelectedGun[id][KNIFE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunKNIFE"));
  644.             g_SelectedGun[id][DEAGLE] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunDEAGLE"));
  645.             g_SelectedGun[id][USP] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunUSP"));
  646.             g_SelectedGun[id][GLOCK] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "g_SelectedGunGLOCK"));
  647.         }
  648.         else
  649.             TableInsert(id);
  650.     }
  651. }
  652. public QuerySetDataTable(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
  653. {
  654.     if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
  655.     {
  656.         log_amx("[SetData] Hiba:**!! %s !!**", sError);
  657.         return;
  658.     }
  659. }


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 8 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