hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.25. 13:49



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: nincs regisztrált felhasználó 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  [ 3 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Sapka pontert
HozzászólásElküldve: 2015.12.23. 09:31 
Offline
Lelkes
Avatar

Csatlakozott: 2015.12.15. 15:46
Hozzászólások: 27
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 1 alkalommal
Sziasztok hogy birok olyat csinalni hogy sapkat lehesen pontert venni ?

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Sapka pontert
HozzászólásElküldve: 2015.12.23. 12:12 
Offline
Fanatikus
Avatar

Csatlakozott: 2015.12.05. 20:51
Hozzászólások: 179
Megköszönt másnak: 7 alkalommal
Megköszönték neki: 12 alkalommal
Steam~ írta:
Sziasztok hogy birok olyat csinalni hogy sapkat lehesen pontert venni ?


Hello!
nem tudom hogy működik e, még 3hónapja dobtam össze, nem néztem hogy le e fordul ,stb...

Próba szerencse.

  1. #include < amxmodx >
  2. #include < engine >
  3. #include < cstrike >
  4. #include < hamsandwich >
  5. #include < fun >
  6. #include < fakemeta >
  7. #include < nvault >
  8.  
  9. #define PREFIX "PontertSapka"
  10.  
  11.  
  12. new const sapkaMODEL[ CsTeams ][ ] = {
  13.     "",
  14.     "models/pirossapi.mdl",
  15.     "models/keksapi.mdl",
  16.     ""
  17. };
  18.  
  19. new Sapka[ 33 ];
  20. new pont[ 33 ]
  21.  
  22.  
  23. new  vault
  24. public plugin_init() {
  25.     register_plugin( "Mikulás Sapka Pontért", "1.0", "Levii @ Peace" );
  26.    
  27.     register_clcmd("say /sapka","sapka_menu")
  28.     register_event( "TeamInfo", "EventTeamInfo", "a" );
  29.        
  30.        
  31.     set_task(25.0, "KorUzenet", 0, _, _, "b")
  32.     vault = nvault_open("sapka_mentes");
  33. }
  34. public KorUzenet() {
  35.    
  36.     print_color(0, "!g[%s]!y Mikulás Sapka Pontért, !gHasználat: !t/sapka !gKészítette: !tLevii @ Peace.",PREFIX)
  37.     return PLUGIN_HANDLED;
  38. }
  39. public plugin_precache( )
  40. {
  41.     precache_model( sapkaMODEL[ CS_TEAM_T ] );
  42.     precache_model( sapkaMODEL[ CS_TEAM_CT ] );
  43. }
  44. public client_disconnect( id )
  45.     if( is_valid_ent( Sapka[ id ] ) )
  46.     remove_entity( Sapka[ id ])
  47.  
  48.  
  49. public FwdHamPlayerSpawn( const id )
  50. {
  51.     if( is_user_alive( id ) ) {
  52.         new egyseg = Sapka[ id ];
  53.        
  54.         if( !is_valid_ent( egyseg ) ) {
  55.             if( !( egyseg = Sapka[ id ] = create_entity( "info_target" ) ) )
  56.                 return;
  57.            
  58.             new CsTeams:csapat = cs_get_user_team( id );
  59.            
  60.             if( csapat != CS_TEAM_T && csapat != CS_TEAM_CT )
  61.                 csapat = CS_TEAM_T;
  62.            
  63.             entity_set_model( egyseg, sapkaMODEL[ csapat ] );
  64.             entity_set_int( egyseg, EV_INT_movetype, MOVETYPE_FOLLOW );
  65.             entity_set_edict( egyseg, EV_ENT_aiment, id );
  66.         }
  67.     }
  68. }
  69.  
  70. public EventTeamInfo( ) {
  71.     new id = read_data( 1 ), egyseg = Sapka[ id ];
  72.    
  73.     if( !is_valid_ent( egyseg ) ) {
  74.         if( egyseg > 0 )
  75.             Sapka[ id ] = 0;
  76.        
  77.         return;
  78.     }
  79.    
  80.     new szTeam[ 2 ];
  81.     read_data( 2, szTeam, 1 );
  82.    
  83.     if( szTeam[ 0 ] == 'C' )
  84.         entity_set_model( egyseg, sapkaMODEL[ CS_TEAM_CT ] );
  85.     else
  86.         entity_set_model( egyseg, sapkaMODEL[ CS_TEAM_T ] );
  87. }
  88.  
  89. public sapka_menu(id)
  90. {
  91.     new cim[ 121 ]
  92.     format(cim, charsmax(cim), "\rPontért Sapka vétel ^n \dKészítette: \rLevii @ Peace^n Pontok: %d",pont[id])
  93.     new menu = menu_create(cim, "sapka_h" )
  94.    
  95.     if(Sapka[id] == 0)
  96.         menu_additem(menu,"\yMikulás Sapka \d[\rElérve\d]","1",0)
  97.     else
  98.         menu_additem(menu,"\yMikulás Sapka \d[\r1200 Pont\d]","1",0)
  99.    
  100.    
  101.     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
  102.     menu_display(id, menu, 0)
  103. }
  104. public sapka_h(id, menu, item)
  105. {
  106.     if( item == MENU_EXIT )
  107.     {
  108.         menu_destroy(menu);
  109.         return PLUGIN_HANDLED;
  110.     }
  111.     new data[9], szName[64];
  112.     new access, callback;
  113.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  114.     new key = str_to_num(data);
  115.    
  116.     switch(key)
  117.     {
  118.         case 1:{
  119.             if(pont[id] >= 1200)
  120.             {
  121.                 pont[id] -= 1200
  122.                 Sapka[id] = 1
  123.                 print_color(id, "!g[Információ]!y Sikeres vásárlás.")
  124.             }
  125.             else
  126.             {
  127.                
  128.                 print_color(id, "!g[Információ]!y Nincs elég pontod.")
  129.             }
  130.            
  131.         }
  132.     }
  133.     menu_destroy(menu)
  134.     return PLUGIN_HANDLED
  135.    
  136. }
  137. public death(id)
  138. {
  139.     new killer = read_data(1)
  140.     new victim = read_data(2)
  141.    
  142.     if(killer == victim)
  143.         return PLUGIN_HANDLED
  144.    
  145.     pont[killer]++
  146.    
  147.     return PLUGIN_HANDLED
  148. }
  149. public mentes(id)
  150. {
  151.     new vaultkey[64],vaultdata[256], authid[32]
  152.     get_user_authid(id, authid, 31)
  153.     format(vaultkey,63,"%s-SKIN", authid)
  154.     format(vaultdata,255,"%i#%i#",pont[id],Sapka[id])
  155.     nvault_set(vault,vaultkey,vaultdata)
  156.     return PLUGIN_CONTINUE
  157. }
  158. public betoltes(id)
  159. {
  160.     new vaultkey[64],vaultdata[256], authid[32]
  161.     get_user_authid(id, authid, 31)
  162.     format(vaultkey,63,"%s-SKIN", authid)
  163.     format(vaultdata,255,"%i#%i#",pont[id],Sapka[id])
  164.     nvault_get(vault,vaultkey,vaultdata,255)
  165.     replace_all(vaultdata, 255, "#", " ")
  166.     new str_num[32], skin_num[32]
  167.     parse(vaultdata, str_num, 31, skin_num, 31)
  168.     pont[id] = str_to_num(str_num)
  169.     Sapka[id] = str_to_num(skin_num)
  170.     return PLUGIN_CONTINUE
  171. }
  172. public client_disconnect(id)
  173. {
  174.     mentes(id)
  175. }
  176. public client_connect(id)
  177. {
  178.     betoltes(id)
  179. }
  180. stock print_color(const id, const input[], any:...)
  181. {
  182.     new count = 1, players[32]
  183.     static msg[191]
  184.     vformat(msg, 190, input, 3)
  185.    
  186.     replace_all(msg, 190, "!g", "^4")
  187.     replace_all(msg, 190, "!y", "^1")
  188.     replace_all(msg, 190, "!t", "^3")
  189.    
  190.    
  191.     if (id) players[0] = id; else get_players(players, count, "ch")
  192.     {
  193.     for (new i = 0; i < count; i++)
  194.     {
  195.         if (is_user_connected(players[i]))
  196.         {
  197.             message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  198.             write_byte(players[i])
  199.             write_string(msg)
  200.             message_end()
  201.         }
  202.     }
  203. }
  204.     return PLUGIN_HANDLED
  205. }

_________________
.:[*|P|eac|E|*]:.

Ők köszönték meg Levii@Peace nek ezt a hozzászólást: Steam~ (2015.12.23. 12:36)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Sapka pontert
HozzászólásElküldve: 2015.12.23. 12:35 
Offline
Lelkes
Avatar

Csatlakozott: 2015.12.15. 15:46
Hozzászólások: 27
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 1 alkalommal
Levii@Peace írta:
Steam~ írta:
Sziasztok hogy birok olyat csinalni hogy sapkat lehesen pontert venni ?


Hello!
nem tudom hogy működik e, még 3hónapja dobtam össze, nem néztem hogy le e fordul ,stb...

Próba szerencse.

  1. #include < amxmodx >
  2. #include < engine >
  3. #include < cstrike >
  4. #include < hamsandwich >
  5. #include < fun >
  6. #include < fakemeta >
  7. #include < nvault >
  8.  
  9. #define PREFIX "PontertSapka"
  10.  
  11.  
  12. new const sapkaMODEL[ CsTeams ][ ] = {
  13.     "",
  14.     "models/pirossapi.mdl",
  15.     "models/keksapi.mdl",
  16.     ""
  17. };
  18.  
  19. new Sapka[ 33 ];
  20. new pont[ 33 ]
  21.  
  22.  
  23. new  vault
  24. public plugin_init() {
  25.     register_plugin( "Mikulás Sapka Pontért", "1.0", "Levii @ Peace" );
  26.    
  27.     register_clcmd("say /sapka","sapka_menu")
  28.     register_event( "TeamInfo", "EventTeamInfo", "a" );
  29.        
  30.        
  31.     set_task(25.0, "KorUzenet", 0, _, _, "b")
  32.     vault = nvault_open("sapka_mentes");
  33. }
  34. public KorUzenet() {
  35.    
  36.     print_color(0, "!g[%s]!y Mikulás Sapka Pontért, !gHasználat: !t/sapka !gKészítette: !tLevii @ Peace.",PREFIX)
  37.     return PLUGIN_HANDLED;
  38. }
  39. public plugin_precache( )
  40. {
  41.     precache_model( sapkaMODEL[ CS_TEAM_T ] );
  42.     precache_model( sapkaMODEL[ CS_TEAM_CT ] );
  43. }
  44. public client_disconnect( id )
  45.     if( is_valid_ent( Sapka[ id ] ) )
  46.     remove_entity( Sapka[ id ])
  47.  
  48.  
  49. public FwdHamPlayerSpawn( const id )
  50. {
  51.     if( is_user_alive( id ) ) {
  52.         new egyseg = Sapka[ id ];
  53.        
  54.         if( !is_valid_ent( egyseg ) ) {
  55.             if( !( egyseg = Sapka[ id ] = create_entity( "info_target" ) ) )
  56.                 return;
  57.            
  58.             new CsTeams:csapat = cs_get_user_team( id );
  59.            
  60.             if( csapat != CS_TEAM_T && csapat != CS_TEAM_CT )
  61.                 csapat = CS_TEAM_T;
  62.            
  63.             entity_set_model( egyseg, sapkaMODEL[ csapat ] );
  64.             entity_set_int( egyseg, EV_INT_movetype, MOVETYPE_FOLLOW );
  65.             entity_set_edict( egyseg, EV_ENT_aiment, id );
  66.         }
  67.     }
  68. }
  69.  
  70. public EventTeamInfo( ) {
  71.     new id = read_data( 1 ), egyseg = Sapka[ id ];
  72.    
  73.     if( !is_valid_ent( egyseg ) ) {
  74.         if( egyseg > 0 )
  75.             Sapka[ id ] = 0;
  76.        
  77.         return;
  78.     }
  79.    
  80.     new szTeam[ 2 ];
  81.     read_data( 2, szTeam, 1 );
  82.    
  83.     if( szTeam[ 0 ] == 'C' )
  84.         entity_set_model( egyseg, sapkaMODEL[ CS_TEAM_CT ] );
  85.     else
  86.         entity_set_model( egyseg, sapkaMODEL[ CS_TEAM_T ] );
  87. }
  88.  
  89. public sapka_menu(id)
  90. {
  91.     new cim[ 121 ]
  92.     format(cim, charsmax(cim), "\rPontért Sapka vétel ^n \dKészítette: \rLevii @ Peace^n Pontok: %d",pont[id])
  93.     new menu = menu_create(cim, "sapka_h" )
  94.    
  95.     if(Sapka[id] == 0)
  96.         menu_additem(menu,"\yMikulás Sapka \d[\rElérve\d]","1",0)
  97.     else
  98.         menu_additem(menu,"\yMikulás Sapka \d[\r1200 Pont\d]","1",0)
  99.    
  100.    
  101.     menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
  102.     menu_display(id, menu, 0)
  103. }
  104. public sapka_h(id, menu, item)
  105. {
  106.     if( item == MENU_EXIT )
  107.     {
  108.         menu_destroy(menu);
  109.         return PLUGIN_HANDLED;
  110.     }
  111.     new data[9], szName[64];
  112.     new access, callback;
  113.     menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
  114.     new key = str_to_num(data);
  115.    
  116.     switch(key)
  117.     {
  118.         case 1:{
  119.             if(pont[id] >= 1200)
  120.             {
  121.                 pont[id] -= 1200
  122.                 Sapka[id] = 1
  123.                 print_color(id, "!g[Információ]!y Sikeres vásárlás.")
  124.             }
  125.             else
  126.             {
  127.                
  128.                 print_color(id, "!g[Információ]!y Nincs elég pontod.")
  129.             }
  130.            
  131.         }
  132.     }
  133.     menu_destroy(menu)
  134.     return PLUGIN_HANDLED
  135.    
  136. }
  137. public death(id)
  138. {
  139.     new killer = read_data(1)
  140.     new victim = read_data(2)
  141.    
  142.     if(killer == victim)
  143.         return PLUGIN_HANDLED
  144.    
  145.     pont[killer]++
  146.    
  147.     return PLUGIN_HANDLED
  148. }
  149. public mentes(id)
  150. {
  151.     new vaultkey[64],vaultdata[256], authid[32]
  152.     get_user_authid(id, authid, 31)
  153.     format(vaultkey,63,"%s-SKIN", authid)
  154.     format(vaultdata,255,"%i#%i#",pont[id],Sapka[id])
  155.     nvault_set(vault,vaultkey,vaultdata)
  156.     return PLUGIN_CONTINUE
  157. }
  158. public betoltes(id)
  159. {
  160.     new vaultkey[64],vaultdata[256], authid[32]
  161.     get_user_authid(id, authid, 31)
  162.     format(vaultkey,63,"%s-SKIN", authid)
  163.     format(vaultdata,255,"%i#%i#",pont[id],Sapka[id])
  164.     nvault_get(vault,vaultkey,vaultdata,255)
  165.     replace_all(vaultdata, 255, "#", " ")
  166.     new str_num[32], skin_num[32]
  167.     parse(vaultdata, str_num, 31, skin_num, 31)
  168.     pont[id] = str_to_num(str_num)
  169.     Sapka[id] = str_to_num(skin_num)
  170.     return PLUGIN_CONTINUE
  171. }
  172. public client_disconnect(id)
  173. {
  174.     mentes(id)
  175. }
  176. public client_connect(id)
  177. {
  178.     betoltes(id)
  179. }
  180. stock print_color(const id, const input[], any:...)
  181. {
  182.     new count = 1, players[32]
  183.     static msg[191]
  184.     vformat(msg, 190, input, 3)
  185.    
  186.     replace_all(msg, 190, "!g", "^4")
  187.     replace_all(msg, 190, "!y", "^1")
  188.     replace_all(msg, 190, "!t", "^3")
  189.    
  190.    
  191.     if (id) players[0] = id; else get_players(players, count, "ch")
  192.     {
  193.     for (new i = 0; i < count; i++)
  194.     {
  195.         if (is_user_connected(players[i]))
  196.         {
  197.             message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  198.             write_byte(players[i])
  199.             write_string(msg)
  200.             message_end()
  201.         }
  202.     }
  203. }
  204.     return PLUGIN_HANDLED
  205. }

koszi :)

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 3 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