hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.06.16. 09:19



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Bing [Bot], 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  [ 17 hozzászólás ]  Oldal Előző 1 2
Szerző Üzenet
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.03. 18:08 
Offline
Signore Senior
Avatar

Csatlakozott: 2011.09.09. 17:39
Hozzászólások: 4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
Még nincs hangulatom megcsinálni.. Majd hétvégin xd


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.03. 18:28 
Offline
Őskövület
Avatar

Csatlakozott: 2012.02.07. 23:34
Hozzászólások: 2192
Megköszönt másnak: 27 alkalommal
Megköszönték neki: 55 alkalommal
Ebből se lesz semmi xD

_________________
[sma]CMD:fear(playerid, params[]){ new str[5]; if(!sscanf(params, "s[5]", str)){ if(egyezik(str, "find")) Msg(playerid, "A-a!");}  return 1;}[/sma]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.07. 08:09 
Offline
Signore Senior
Avatar

Csatlakozott: 2011.09.09. 17:39
Hozzászólások: 4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
Na úgy naggyából megírtam, tesztelni nem volt időm. Van pár tagmismatch foggalmam sincs miért. Aki tudja kijavítja xd Jelenleg ha bármit megveszel, örökre lesz. Ezt te majd nvault-ba tod szerkesztgetni :D Majd ha lesz időm megcsinálom normálisan. xd

Kód:
  1.  

  2. /* Plugin generated by AMXX-Studio */

  3.  

  4. #include <amxmodx>

  5. #include <amxmisc>

  6. #include <fun>

  7. #include <engine>

  8. #include <cstrike>

  9. #include <nvault>

  10.  

  11. #define PLUGIN "New Plug-In"

  12. #define VERSION "1.0"

  13. #define AUTHOR "Rendszergazda"

  14.  

  15. #define PARACHUTE_LEVEL ADMIN_ALL

  16.  

  17. #define FL_WATERJUMP    (1<<11)

  18. #define FL_ONGROUND     (1<<9)

  19.  

  20. new points[33];

  21.  

  22. new pBunny, pMulti, pParac, pAK, pM4, pAWP, pVIP

  23.  

  24. new bool:gBunny[33], bool:gMulti[33], bool:gVIP[33];

  25.  

  26. new g_vault

  27. new jumpnum[33] = 0

  28. new bool:dojump[33] = false

  29.  

  30.  

  31. new bool:has_parachute[33]

  32. new para_ent[33]

  33. new gCStrike = 0

  34. new pDetach, pFallSpeed, pEnabled;

  35.  

  36. public client_connect(id)

  37. {

  38.         LoadInformation(id);

  39.         if(gVIP[id])

  40.         {

  41.                 gBunny[id] = true; gMulti[id] = true; has_parachute[id] = true;

  42.         }

  43. }

  44.  

  45. public client_disconnect(id)

  46. {

  47.         SaveInformation(id);

  48. }

  49. public client_PreThink(id)

  50. {

  51.         bunny(id);

  52.         multi(id);

  53.         parac(id);

  54. }

  55.  

  56. public parac(id)

  57. {

  58.         if (!get_pcvar_num(pEnabled)) return

  59.         if (!is_user_alive(id) || !has_parachute[id]) return

  60.  

  61.         new Float:fallspeed = get_pcvar_float(pFallSpeed) * -1.0

  62.         new Float:frame

  63.  

  64.         new button = get_user_button(id)

  65.         new oldbutton = get_user_oldbutton(id)

  66.         new flags = get_entity_flags(id)

  67.  

  68.         if (para_ent[id] > 0 && (flags & FL_ONGROUND)) {

  69.  

  70.                 if (get_pcvar_num(pDetach)) {

  71.  

  72.                         if (get_user_gravity(id) == 0.1) set_user_gravity(id, 1.0)

  73.  

  74.                         if (entity_get_int(para_ent[id],EV_INT_sequence) != 2) {

  75.                                 entity_set_int(para_ent[id], EV_INT_sequence, 2)

  76.                                 entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)

  77.                                 entity_set_float(para_ent[id], EV_FL_frame, 0.0)

  78.                                 entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)

  79.                                 entity_set_float(para_ent[id], EV_FL_animtime, 0.0)

  80.                                 entity_set_float(para_ent[id], EV_FL_framerate, 0.0)

  81.                                 return

  82.                         }

  83.  

  84.                         frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0

  85.                         entity_set_float(para_ent[id],EV_FL_fuser1,frame)

  86.                         entity_set_float(para_ent[id],EV_FL_frame,frame)

  87.  

  88.                         if (frame > 254.0) {

  89.                                 remove_entity(para_ent[id])

  90.                                 para_ent[id] = 0

  91.                         }

  92.                 }

  93.                 else {

  94.                         remove_entity(para_ent[id])

  95.                         set_user_gravity(id, 1.0)

  96.                         para_ent[id] = 0

  97.                 }

  98.  

  99.                 return

  100.         }

  101.  

  102.         if (button & IN_USE) {

  103.  

  104.                 new Float:velocity[3]

  105.                 entity_get_vector(id, EV_VEC_velocity, velocity)

  106.  

  107.                 if (velocity[2] < 0.0) {

  108.  

  109.                         if(para_ent[id] <= 0) {

  110.                                 para_ent[id] = create_entity("info_target")

  111.                                 if(para_ent[id] > 0) {

  112.                                         entity_set_string(para_ent[id],EV_SZ_classname,"parachute")

  113.                                         entity_set_edict(para_ent[id], EV_ENT_aiment, id)

  114.                                         entity_set_edict(para_ent[id], EV_ENT_owner, id)

  115.                                         entity_set_int(para_ent[id], EV_INT_movetype, MOVETYPE_FOLLOW)

  116.                                         entity_set_model(para_ent[id], "models/parachute.mdl")

  117.                                         entity_set_int(para_ent[id], EV_INT_sequence, 0)

  118.                                         entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)

  119.                                         entity_set_float(para_ent[id], EV_FL_frame, 0.0)

  120.                                         entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)

  121.                                 }

  122.                         }

  123.  

  124.                         if (para_ent[id] > 0) {

  125.  

  126.                                 entity_set_int(id, EV_INT_sequence, 3)

  127.                                 entity_set_int(id, EV_INT_gaitsequence, 1)

  128.                                 entity_set_float(id, EV_FL_frame, 1.0)

  129.                                 entity_set_float(id, EV_FL_framerate, 1.0)

  130.                                 set_user_gravity(id, 0.1)

  131.  

  132.                                 velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed

  133.                                 entity_set_vector(id, EV_VEC_velocity, velocity)

  134.  

  135.                                 if (entity_get_int(para_ent[id],EV_INT_sequence) == 0) {

  136.  

  137.                                         frame = entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0

  138.                                         entity_set_float(para_ent[id],EV_FL_fuser1,frame)

  139.                                         entity_set_float(para_ent[id],EV_FL_frame,frame)

  140.  

  141.                                         if (frame > 100.0) {

  142.                                                 entity_set_float(para_ent[id], EV_FL_animtime, 0.0)

  143.                                                 entity_set_float(para_ent[id], EV_FL_framerate, 0.4)

  144.                                                 entity_set_int(para_ent[id], EV_INT_sequence, 1)

  145.                                                 entity_set_int(para_ent[id], EV_INT_gaitsequence, 1)

  146.                                                 entity_set_float(para_ent[id], EV_FL_frame, 0.0)

  147.                                                 entity_set_float(para_ent[id], EV_FL_fuser1, 0.0)

  148.                                         }

  149.                                 }

  150.                         }

  151.                 }

  152.                 else if (para_ent[id] > 0) {

  153.                         remove_entity(para_ent[id])

  154.                         set_user_gravity(id, 1.0)

  155.                         para_ent[id] = 0

  156.                 }

  157.         }

  158.         else if ((oldbutton & IN_USE) && para_ent[id] > 0 ) {

  159.                 remove_entity(para_ent[id])

  160.                 set_user_gravity(id, 1.0)

  161.                 para_ent[id] = 0

  162.         }

  163. }

  164.  

  165. public multi(id)

  166. {

  167.         if(!is_user_alive(id) && !gMulti[id]) return PLUGIN_CONTINUE

  168.         new nbut = get_user_button(id)

  169.         new obut = get_user_oldbutton(id)

  170.         if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))

  171.         {

  172.                 if(jumpnum[id] < 1)

  173.                 {

  174.                         dojump[id] = true

  175.                         jumpnum[id]++

  176.                         return PLUGIN_CONTINUE

  177.                 }

  178.         }

  179.         if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))

  180.         {

  181.                 jumpnum[id] = 0

  182.                 return PLUGIN_CONTINUE

  183.         }

  184.         return PLUGIN_CONTINUE

  185. }

  186.  

  187. public client_PostThink(id)

  188. {

  189.         if(!is_user_alive(id) && !gMulti[id]) return PLUGIN_CONTINUE

  190.         if(dojump[id] == true)

  191.         {

  192.                 new Float:velocity[3]  

  193.                 entity_get_vector(id,EV_VEC_velocity,velocity)

  194.                 velocity[2] = random_float(265.0,285.0)

  195.                 entity_set_vector(id,EV_VEC_velocity,velocity)

  196.                 dojump[id] = false

  197.                 return PLUGIN_CONTINUE

  198.         }

  199.         return PLUGIN_CONTINUE

  200. }      

  201.  

  202.  

  203. public bunny(id)

  204. {

  205.         if (!gBunny[id])

  206.                 return PLUGIN_CONTINUE

  207.  

  208.         entity_set_float(id, EV_FL_fuser2, 0.0)

  209.  

  210.         if (!gBunny[id])

  211.                 return PLUGIN_CONTINUE

  212.         if (entity_get_int(id, EV_INT_button) & 2)

  213.         {

  214.                 new flags = entity_get_int(id, EV_INT_flags)

  215.  

  216.                 if (flags & FL_WATERJUMP)

  217.                         return PLUGIN_CONTINUE

  218.                 if ( entity_get_int(id, EV_INT_waterlevel) >= 2 )

  219.                         return PLUGIN_CONTINUE

  220.                 if ( !(flags & FL_ONGROUND) )

  221.                         return PLUGIN_CONTINUE

  222.  

  223.                 new Float:velocity[3]

  224.                 entity_get_vector(id, EV_VEC_velocity, velocity)

  225.                 velocity[2] += 250.0

  226.                 entity_set_vector(id, EV_VEC_velocity, velocity)

  227.  

  228.                 entity_set_int(id, EV_INT_gaitsequence, 6)

  229.         }

  230.         return PLUGIN_CONTINUE

  231. }

  232.  

  233. public plugin_natives()

  234. {

  235.         set_module_filter("module_filter")

  236.         set_native_filter("native_filter")

  237. }

  238.  

  239. public module_filter(const module[])

  240. {

  241.         if (!cstrike_running() && equali(module, "cstrike")) {

  242.                 return PLUGIN_HANDLED

  243.         }

  244.  

  245.         return PLUGIN_CONTINUE

  246. }

  247.  

  248. public native_filter(const name[], index, trap)

  249. {

  250.         if (!trap) return PLUGIN_HANDLED

  251.  

  252.         return PLUGIN_CONTINUE

  253. }

  254.  

  255. public plugin_precache()

  256. {

  257.         precache_model("models/parachute.mdl")

  258. }

  259.  

  260.  

  261. public plugin_init() {

  262.         register_plugin(PLUGIN, VERSION, AUTHOR);

  263.         register_event("DeathMsg", "onDeath", "a", "1>0");

  264.         register_clcmd("say /menu", "menu");

  265.         register_clcmd("say_team /menu", "menu");

  266.         register_clcmd("/menu", "menu");

  267.         register_clcmd("menu", "menu");

  268.        

  269.         pBunny = register_cvar("ps_bunny_cost", "50");

  270.         pMulti = register_cvar("ps_multi_cost", "100");

  271.         pParac = register_cvar("ps_parac_cost", "50");

  272.         pAK = register_cvar("ps_ak_cost", "7");

  273.         pM4 = register_cvar("ps_m4_cost", "10");

  274.         pAWP = register_cvar("ps_awp_cost", "20");

  275.         pVIP = register_cvar("ps_vip_cost", "800");

  276.        

  277.        

  278.         pEnabled = register_cvar("sv_parachute", "1" )

  279.         pFallSpeed = register_cvar("parachute_fallspeed", "100")

  280.         pDetach = register_cvar("parachute_detach", "1")

  281.        

  282.         if (gCStrike)

  283.         {

  284.  

  285.                 register_concmd("amx_parachute", "admin_give_parachute", PARACHUTE_LEVEL, "<nick, #userid or @team>" )

  286.         }

  287.        

  288.        

  289. }

  290.  

  291. public onDeath()

  292. {

  293.         new killer = read_data(1);

  294.         new victim = read_data(2);

  295.         if(killer != victim)

  296.         {

  297.                 points[killer]++

  298.                 set_hudmessage(0, 255, 0, 0.05, 0.88, 2, 6.0, 12.0)

  299.                 show_hudmessage(killer, "Kaptal 1 pontot! Menuhoz ird be, hogy /menu.")

  300.         }

  301. }

  302.  

  303. public menu(id)

  304. {

  305.         new menu = menu_create("Valassz targyat!", "handler");

  306.         menu_additem(menu, "Bunnyhop", "0", 0);

  307.         menu_additem(menu, "Dupla ugras", "1", 0);

  308.         menu_additem(menu, "Ejtoernyo", "2", 0);

  309.         menu_additem(menu, "AK-47 Kalasnikov", "3", 0);

  310.         menu_additem(menu, "M4A1 Colt", "4", 0);

  311.         menu_additem(menu, "AWP Magnum Sniper", "5", 0);

  312.         menu_additem(menu, "*V.I.P.*", "6", 0);

  313.         menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

  314.         menu_display(id, menu);

  315. }

  316.  

  317. public handler(id, menu, item)

  318. {

  319.         if(item == MENU_EXIT)

  320.         {

  321.                 menu_destroy(menu);

  322.         }

  323.         new szCommand[6] , szName[64]; new access , callback;

  324.         menu_item_getinfo(menu , item , access , szCommand , 5 , szName , 63 , callback);

  325.         new i = str_to_num(szCommand)

  326.         switch(i)

  327.         {

  328.                 case 0:

  329.                 {

  330.                         if(points[id] >= get_pcvar_num(pBunny))

  331.                         {

  332.                                 gBunny[id] = true;

  333.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pBunny));

  334.                         }

  335.                         else

  336.                         {

  337.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  338.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  339.                         }

  340.                        

  341.                 }

  342.                 case 1:

  343.                 {

  344.                         if(points[id] >= get_pcvar_num(pMulti))

  345.                         {

  346.                                 gMulti[id] = true;

  347.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pMulti));

  348.                         }

  349.                         else

  350.                         {

  351.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  352.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  353.                         }

  354.                        

  355.                 }

  356.                 case 2:

  357.                 {

  358.                         if(points[id] >= get_pcvar_num(pParac))

  359.                         {

  360.                                 has_parachute[id] = true;

  361.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pParac));

  362.                         }

  363.                         else

  364.                         {

  365.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  366.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  367.                         }

  368.                        

  369.                 }

  370.                 case 3:

  371.                 {

  372.                         if(points[id] >= get_pcvar_num(pAK))

  373.                         {

  374.                                 give_item(id, "weapon_ak47");

  375.                                 give_item(id, "ammo_762nato");

  376.                                 give_item(id, "ammo_762nato");

  377.                                 give_item(id, "ammo_762nato");

  378.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pAK));

  379.                         }

  380.                         else

  381.                         {

  382.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  383.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  384.                         }

  385.                 }

  386.                 case 4:

  387.                 {

  388.                         if(points[id] >= get_pcvar_num(pM4))

  389.                         {

  390.                                 give_item(id, "weapon_m4a1");

  391.                                 give_item(id, "ammo_556nato");

  392.                                 give_item(id, "ammo_556nato");

  393.                                 give_item(id, "ammo_556nato");

  394.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pM4));

  395.                         }

  396.                         else

  397.                         {

  398.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  399.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  400.                         }              

  401.                 }

  402.                 case 5:

  403.                 {

  404.                         if(points[id] >= get_pcvar_num(pAWP))

  405.                         {

  406.                                 give_item(id, "weapon_awp");

  407.                                 give_item(id, "ammo_338magnum");

  408.                                 give_item(id, "ammo_338magnum");

  409.                                 give_item(id, "ammo_338magnum");

  410.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pAWP));

  411.                         }

  412.                         else

  413.                         {

  414.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  415.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  416.                         }

  417.                        

  418.                 }

  419.                 case 6:

  420.                 {

  421.                         if(points[id] >= get_pcvar_num(pVIP))

  422.                         {

  423.                                 gVIP[id] = true;

  424.                                 gBunny[id] = true; gMulti[id] = true; has_parachute[id] = true;

  425.                                 cs_set_user_money(id, cs_get_user_money(id) - get_pcvar_num(pVIP));

  426.                         }

  427.                         else

  428.                         {

  429.                                 set_hudmessage(255, 0, 0, 0.30, 0.41, 1, 6.0, 4.0)

  430.                                 show_hudmessage(id, "Nincs eleg penzed a vasarlashoz!")

  431.                         }

  432.                 }

  433.         }

  434. }

  435. public LoadInformation(id)

  436. {

  437.     new name[32]

  438.    

  439.     get_user_name(id, name, 31)

  440.    

  441.     new vaultkey[64],vaultdata[256]

  442.    

  443.    

  444.     format(vaultkey,63,"%sPONTSYSTEM", name)

  445.    

  446.     format(vaultdata,255,"%i#%i#%i#%i#", gBunny[id], gMulti[id], gVIP[id], has_parachute[id])

  447.    

  448.    

  449.     nvault_get(g_vault,vaultkey,vaultdata,255)

  450.    

  451.     replace_all(vaultdata, 255, "#", " ")

  452.    

  453.     new nbunny[33], nmulti[33], nvip[33], nparac[33];

  454.    

  455.     parse(vaultdata, nbunny, 32, nmulti, 32, nvip, 32, nparac, 32)

  456.    

  457.     gBunny[id] = str_to_num(nbunny)

  458.    

  459.     gMulti[id] = str_to_num(nmulti)

  460.    

  461.     gVIP[id] = str_to_num(nvip)

  462.    

  463.     has_parachute[id] = str_to_num(nparac)

  464.    

  465.     return PLUGIN_CONTINUE

  466.        

  467. }

  468.  

  469. public SaveInformation(id)

  470. {

  471.     new name[32]

  472.     get_user_name(id, name, 31)

  473.  

  474.     new vaultkey[64],vaultdata[256]

  475.    

  476.     format(vaultkey,63,"%sPONTSYSTEM", name)

  477.    

  478.     format(vaultdata,255,"%i#%i#%i#%i#", gBunny[id], gMulti[id], gVIP[id], has_parachute[id])

  479.  

  480.    

  481.  

  482.     nvault_set(g_vault,vaultkey,vaultdata)

  483.     return PLUGIN_CONTINUE

  484. }

  485.  

  486.  


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.07. 09:58 
Offline
Tiszteletbeli

Csatlakozott: 2010.02.04. 19:12
Hozzászólások: 3528
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 180 alkalommal
Kód:
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>
#include <nvault>
 
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Rendszergazda"
 
#define PARACHUTE_LEVEL ADMIN_ALL
 
#define FL_WATERJUMP    (1<<11)
#define FL_ONGROUND     (1<<9)
 
new points[33];
 
new 
pBunnypMultipParacpAKpM4pAWPpVIP
 
new gBunny[33], gMulti[33], gVIP[33];
 
new 
g_vault
new jumpnum[33] = 0
new bool:dojump[33] = false
 
 
new has_parachute[33]
new 
para_ent[33]
new 
gCStrike 0
new pDetachpFallSpeedpEnabled;
 
public 
client_connect(id)
{
        
LoadInformation(id);
        if(
gVIP[id])
        {
                
gBunny[id] = truegMulti[id] = truehas_parachute[id] = true;
        }
}
 
public 
client_disconnect(id)
{
        
SaveInformation(id);
}
public 
client_PreThink(id)
{
        
bunny(id);
        
multi(id);
        
parac(id);
}
 
public 
parac(id)
{
        if (!
get_pcvar_num(pEnabled)) return
        if (!
is_user_alive(id) || !has_parachute[id]) return
 
        new 
Float:fallspeed get_pcvar_float(pFallSpeed) * -1.0
        
new Float:frame
 
        
new button get_user_button(id)
        new 
oldbutton get_user_oldbutton(id)
        new 
flags get_entity_flags(id)
 
        if (
para_ent[id] > && (flags FL_ONGROUND)) {
 
                if (
get_pcvar_num(pDetach)) {
 
                        if (
get_user_gravity(id) == 0.1set_user_gravity(id1.0)
 
                        if (
entity_get_int(para_ent[id],EV_INT_sequence) != 2) {
                                
entity_set_int(para_ent[id], EV_INT_sequence2)
                                
entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                                
entity_set_float(para_ent[id], EV_FL_frame0.0)
                                
entity_set_float(para_ent[id], EV_FL_fuser10.0)
                                
entity_set_float(para_ent[id], EV_FL_animtime0.0)
                                
entity_set_float(para_ent[id], EV_FL_framerate0.0)
                                return
                        }
 
                        
frame entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0
                        entity_set_float
(para_ent[id],EV_FL_fuser1,frame)
                        
entity_set_float(para_ent[id],EV_FL_frame,frame)
 
                        if (
frame 254.0) {
                                
remove_entity(para_ent[id])
                                
para_ent[id] = 0
                        
}
                }
                else {
                        
remove_entity(para_ent[id])
                        
set_user_gravity(id1.0)
                        
para_ent[id] = 0
                
}
 
                return
        }
 
        if (
button IN_USE) {
 
                new 
Float:velocity[3]
                
entity_get_vector(idEV_VEC_velocityvelocity)
 
                if (
velocity[2] < 0.0) {
 
                        if(
para_ent[id] <= 0) {
                                
para_ent[id] = create_entity("info_target")
                                if(
para_ent[id] > 0) {
                                        
entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
                                        
entity_set_edict(para_ent[id], EV_ENT_aimentid)
                                        
entity_set_edict(para_ent[id], EV_ENT_ownerid)
                                        
entity_set_int(para_ent[id], EV_INT_movetypeMOVETYPE_FOLLOW)
                                        
entity_set_model(para_ent[id], "models/parachute.mdl")
                                        
entity_set_int(para_ent[id], EV_INT_sequence0)
                                        
entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                                        
entity_set_float(para_ent[id], EV_FL_frame0.0)
                                        
entity_set_float(para_ent[id], EV_FL_fuser10.0)
                                }
                        }
 
                        if (
para_ent[id] > 0) {
 
                                
entity_set_int(idEV_INT_sequence3)
                                
entity_set_int(idEV_INT_gaitsequence1)
                                
entity_set_float(idEV_FL_frame1.0)
                                
entity_set_float(idEV_FL_framerate1.0)
                                
set_user_gravity(id0.1)
 
                                
velocity[2] = (velocity[2] + 40.0 fallspeed) ? velocity[2] + 40.0 fallspeed
                                entity_set_vector
(idEV_VEC_velocityvelocity)
 
                                if (
entity_get_int(para_ent[id],EV_INT_sequence) == 0) {
 
                                        
frame entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0
                                        entity_set_float
(para_ent[id],EV_FL_fuser1,frame)
                                        
entity_set_float(para_ent[id],EV_FL_frame,frame)
 
                                        if (
frame 100.0) {
                                                
entity_set_float(para_ent[id], EV_FL_animtime0.0)
                                                
entity_set_float(para_ent[id], EV_FL_framerate0.4)
                                                
entity_set_int(para_ent[id], EV_INT_sequence1)
                                                
entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                                                
entity_set_float(para_ent[id], EV_FL_frame0.0)
                                                
entity_set_float(para_ent[id], EV_FL_fuser10.0)
                                        }
                                }
                        }
                }
                else if (
para_ent[id] > 0) {
                        
remove_entity(para_ent[id])
                        
set_user_gravity(id1.0)
                        
para_ent[id] = 0
                
}
        }
        else if ((
oldbutton IN_USE) && para_ent[id] > ) {
                
remove_entity(para_ent[id])
                
set_user_gravity(id1.0)
                
para_ent[id] = 0
        
}
}
 
public 
multi(id)
{
        if(!
is_user_alive(id) && !gMulti[id]) return PLUGIN_CONTINUE
        
new nbut get_user_button(id)
        new 
obut get_user_oldbutton(id)
        if((
nbut IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut IN_JUMP))
        {
                if(
jumpnum[id] < 1)
                {
                        
dojump[id] = true
                        jumpnum
[id]++
                        return 
PLUGIN_CONTINUE
                
}
        }
        if((
nbut IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
        {
                
jumpnum[id] = 0
                
return PLUGIN_CONTINUE
        
}
        return 
PLUGIN_CONTINUE
}
 
public 
client_PostThink(id)
{
        if(!
is_user_alive(id) && !gMulti[id]) return PLUGIN_CONTINUE
        
if(dojump[id] == true)
        {
                new 
Float:velocity[3]  
                
entity_get_vector(id,EV_VEC_velocity,velocity)
                
velocity[2] = random_float(265.0,285.0)
                
entity_set_vector(id,EV_VEC_velocity,velocity)
                
dojump[id] = false
                
return PLUGIN_CONTINUE
        
}
        return 
PLUGIN_CONTINUE
}      
 
 
public 
bunny(id)
{
        if (!
gBunny[id])
                return 
PLUGIN_CONTINUE
 
        entity_set_float
(idEV_FL_fuser20.0)
 
        if (!
gBunny[id])
                return 
PLUGIN_CONTINUE
        
if (entity_get_int(idEV_INT_button) & 2)
        {
                new 
flags entity_get_int(idEV_INT_flags)
 
                if (
flags FL_WATERJUMP)
                        return 
PLUGIN_CONTINUE
                
if ( entity_get_int(idEV_INT_waterlevel) >= )
                        return 
PLUGIN_CONTINUE
                
if ( !(flags FL_ONGROUND) )
                        return 
PLUGIN_CONTINUE
 
                
new Float:velocity[3]
                
entity_get_vector(idEV_VEC_velocityvelocity)
                
velocity[2] += 250.0
                entity_set_vector
(idEV_VEC_velocityvelocity)
 
                
entity_set_int(idEV_INT_gaitsequence6)
        }
        return 
PLUGIN_CONTINUE
}
 
public 
plugin_natives()
{
        
set_module_filter("module_filter")
        
set_native_filter("native_filter")
}
 
public 
module_filter(const module[])
{
        if (!
cstrike_running() && equali(module"cstrike")) {
                return 
PLUGIN_HANDLED
        
}
 
        return 
PLUGIN_CONTINUE
}
 
public 
native_filter(const name[], indextrap)
{
        if (!
trap) return PLUGIN_HANDLED
 
        
return PLUGIN_CONTINUE
}
 
public 
plugin_precache()
{
        
precache_model("models/parachute.mdl")
}
 
 
public 
plugin_init() {
        
register_plugin(PLUGINVERSIONAUTHOR);
        
register_event("DeathMsg""onDeath""a""1>0");
        
register_clcmd("say /menu""menu");
        
register_clcmd("say_team /menu""menu");
        
register_clcmd("/menu""menu");
        
register_clcmd("menu""menu");
       
        
pBunny register_cvar("ps_bunny_cost""50");
        
pMulti register_cvar("ps_multi_cost""100");
        
pParac register_cvar("ps_parac_cost""50");
        
pAK register_cvar("ps_ak_cost""7");
        
pM4 register_cvar("ps_m4_cost""10");
        
pAWP register_cvar("ps_awp_cost""20");
        
pVIP register_cvar("ps_vip_cost""800");
       
       
        
pEnabled register_cvar("sv_parachute""1" )
        
pFallSpeed register_cvar("parachute_fallspeed""100")
        
pDetach register_cvar("parachute_detach""1")
       
        if (
gCStrike)
        {
 
                
register_concmd("amx_parachute""admin_give_parachute"PARACHUTE_LEVEL"<nick, #userid or @team>" )
        }
       
       
}
 
public 
onDeath()
{
        new 
killer read_data(1);
        new 
victim read_data(2);
        if(
killer != victim)
        {
                
points[killer]++
                
set_hudmessage(025500.050.8826.012.0)
                
show_hudmessage(killer"Kaptal 1 pontot! Menuhoz ird be, hogy /menu.")
        }
}
 
public 
menu(id)
{
        new 
menu menu_create("Valassz targyat!""handler");
        
menu_additem(menu"Bunnyhop""0"0);
        
menu_additem(menu"Dupla ugras""1"0);
        
menu_additem(menu"Ejtoernyo""2"0);
        
menu_additem(menu"AK-47 Kalasnikov""3"0);
        
menu_additem(menu"M4A1 Colt""4"0);
        
menu_additem(menu"AWP Magnum Sniper""5"0);
        
menu_additem(menu"*V.I.P.*""6"0);
        
menu_setprop(menuMPROP_EXITMEXIT_ALL);
        
menu_display(idmenu);
}
 
public 
handler(idmenuitem)
{
        if(
item == MENU_EXIT)
        {
                
menu_destroy(menu);
        }
        new 
szCommand[6] , szName[64]; new access callback;
        
menu_item_getinfo(menu item access szCommand szName 63 callback);
        new 
str_to_num(szCommand)
        switch(
i)
        {
                case 
0:
                {
                        if(
points[id] >= get_pcvar_num(pBunny))
                        {
                                
gBunny[id] = true;
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pBunny));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }
                       
                }
                case 
1:
                {
                        if(
points[id] >= get_pcvar_num(pMulti))
                        {
                                
gMulti[id] = true;
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pMulti));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }
                       
                }
                case 
2:
                {
                        if(
points[id] >= get_pcvar_num(pParac))
                        {
                                
has_parachute[id] = true;
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pParac));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }
                       
                }
                case 
3:
                {
                        if(
points[id] >= get_pcvar_num(pAK))
                        {
                                
give_item(id"weapon_ak47");
                                
give_item(id"ammo_762nato");
                                
give_item(id"ammo_762nato");
                                
give_item(id"ammo_762nato");
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pAK));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }
                }
                case 
4:
                {
                        if(
points[id] >= get_pcvar_num(pM4))
                        {
                                
give_item(id"weapon_m4a1");
                                
give_item(id"ammo_556nato");
                                
give_item(id"ammo_556nato");
                                
give_item(id"ammo_556nato");
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pM4));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }              
                }
                case 
5:
                {
                        if(
points[id] >= get_pcvar_num(pAWP))
                        {
                                
give_item(id"weapon_awp");
                                
give_item(id"ammo_338magnum");
                                
give_item(id"ammo_338magnum");
                                
give_item(id"ammo_338magnum");
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pAWP));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }
                       
                }
                case 
6:
                {
                        if(
points[id] >= get_pcvar_num(pVIP))
                        {
                                
gVIP[id] = true;
                                
gBunny[id] = truegMulti[id] = truehas_parachute[id] = true;
                                
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(pVIP));
                        }
                        else
                        {
                                
set_hudmessage(255000.300.4116.04.0)
                                
show_hudmessage(id"Nincs eleg penzed a vasarlashoz!")
                        }
                }
        }
}
public 
LoadInformation(id)
{
    new 
name[32]
   
    
get_user_name(idname31)
   
    new 
vaultkey[64],vaultdata[256]
   
   
    
format(vaultkey,63,"%sPONTSYSTEM"name)
   
    
format(vaultdata,255,"%i#%i#%i#%i#"gBunny[id], gMulti[id], gVIP[id], has_parachute[id])
   
   
    
nvault_get(g_vault,vaultkey,vaultdata,255)
   
    
replace_all(vaultdata255"#"" ")
   
    new 
nbunny[33], nmulti[33], nvip[33], nparac[33];
   
    
parse(vaultdatanbunny32nmulti32nvip32nparac32)
   
    
gBunny[id] = str_to_num(nbunny)
   
    
gMulti[id] = str_to_num(nmulti)
   
    
gVIP[id] = str_to_num(nvip)
   
    
has_parachute[id] = str_to_num(nparac)
   
    return 
PLUGIN_CONTINUE
       
}
 
public 
SaveInformation(id)
{
    new 
name[32]
    
get_user_name(idname31)
 
    new 
vaultkey[64],vaultdata[256]
   
    
format(vaultkey,63,"%sPONTSYSTEM"name)
   
    
format(vaultdata,255,"%i#%i#%i#%i#"gBunny[id], gMulti[id], gVIP[id], has_parachute[id])
 
   
 
    
nvault_set(g_vault,vaultkey,vaultdata)
    return 
PLUGIN_CONTINUE

_________________
http://www.ebateam.eu/


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.07. 14:53 
Offline
Őskövület
Avatar

Csatlakozott: 2012.02.07. 23:34
Hozzászólások: 2192
Megköszönt másnak: 27 alkalommal
Megköszönték neki: 55 alkalommal
Ehhez fel kell raknom a bunnyhoppot , ejtőernyőt a szerverre? vagy ez a plugin tartalmazza őket és külön nem kell felraknom?
Egyébként köszönöm ! :D

_________________
[sma]CMD:fear(playerid, params[]){ new str[5]; if(!sscanf(params, "s[5]", str)){ if(egyezik(str, "find")) Msg(playerid, "A-a!");}  return 1;}[/sma]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.07. 14:56 
Offline
Signore Senior
Avatar

Csatlakozott: 2011.09.09. 17:39
Hozzászólások: 4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
Tartalmaz mindent.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Pont rendszer + cuccok
HozzászólásElküldve: 2012.05.07. 15:51 
Offline
Őskövület
Avatar

Csatlakozott: 2012.02.07. 23:34
Hozzászólások: 2192
Megköszönt másnak: 27 alkalommal
Megköszönték neki: 55 alkalommal
Leteszteltem a plugint. Tökéletesen müködik minden! :D Köszönöm mindenkinek! :)

_________________
[sma]CMD:fear(playerid, params[]){ new str[5]; if(!sscanf(params, "s[5]", str)){ if(egyezik(str, "find")) Msg(playerid, "A-a!");}  return 1;}[/sma]


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  [ 17 hozzászólás ]  Oldal Előző 1 2


Ki van itt

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