hlmod.hu
https://hlmod.hu/

Healthkit
https://hlmod.hu/viewtopic.php?f=9&t=2843
Oldal: 1 / 1

Szerző:  rericsi8 [2011.12.10. 21:43 ]
Hozzászólás témája:  Healthkit

sziasztok
találtam az angol amx-en egy élet csomagos plugint de nem értem hogy kell telepíteni

ez volt a leírás:

    I wrote that plugin for fun by a request: http://forums.alliedmods.net/showthread.php?t=24832
    I tryed to search for similar plugin on this forums and found nothing like this.
    So if you like this plugin - enjoy.

    Edit:
    - tested on CS successfully
    - on DOD seems like it didn't work
    - not tested on other mods so i mark it as for CS only

    Description:
    This plugin basically provides an ability to spawn HL healthkits.
    If healthkit is collected it would appear again later like in HL.
    Note:Engine module required.
    Commands:
    healthkit_spawn [save] - spawns a healthkit at the origin of a player who typed that command
    if "save" argument is specified then origin would be added to the end of the file
    $configsdir/maps/<currentmap>.cfg (file would be created if it is not exists)
    that would allow to spawn saved healthkits every specific map load
    Note: to avoid error create $configsdir/maps folder if it is not exists.

    healthkit_load <x> <y> <z> - spawns a healthkit at the specified origin

    healthkit_clear - removes all spawned healthkits

    Commands access level is ADMIN_CFG (falg "h") can be redefined (#define ACCESS_LEVEL)

És itt az sma

Kód:
/* AMX Mod X
*   Healthkit
*
* (c) Copyright 2006 by VEN
*
* This file is provided as is (no warranties)
*
*   Description:
*      This plugin basically provides an ability to spawn HL healthkits.
*      If healthkit is collected it would appear again later like in HL.
*      Note: Engine module required.
*
*   Commands:
*      healthkit_spawn [save] - spawns a healthkit at the origin of a player who typed that command
*         if "save" argument is specified then origin would be added to the end of the file
*         $configsdir/maps/<currentmap>.cfg (file would be created if it is not exists)
*         that would allow to spawn saved healthkits every specific map load
*         Note: to avoid error create $configsdir/maps folder if it is not exists.
*
*      healthkit_load <x> <y> <z> - spawns a healthkit at the specified origin
*
*      healthkit_clear - removes all spawned healthkits
*
*      Commands access level is ADMIN_CFG (falg "h") can be redefined (#define ACCESS_LEVEL)
*/

#include <amxmodx>
#include <amxmisc>
#include <engine>

#define ACCESS_LEVEL ADMIN_CFG
new CLASSNAME[] = "item_healthkit"

new FILE[96]

public plugin_init() {
   register_plugin("Healthkit", "0.1", "VEN")
   register_clcmd("healthkit_spawn", "cmd_healthkit_spawn", ACCESS_LEVEL, "[save]")
   register_concmd("healthkit_load", "cmd_healthkit_load", ACCESS_LEVEL, "<x> <y> <z>")
   register_concmd("healthkit_clear", "cmd_healthkit_clear", ACCESS_LEVEL)

   new configs_dir[64], map[32]
   get_configsdir(configs_dir, 63)
   get_mapname(map, 31)
   format(FILE, 95, "%s/maps/%s.cfg", configs_dir, map)
}

public plugin_precache() {
   precache_model("models/healthkit.mdl")
   precache_model("models/healthkitt.mdl")
   precache_sound("misc/healthpickup.wav")
}

public cmd_healthkit_spawn(id, level, cid) {
   if (!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED

   new origin[3]
   get_user_origin(id, origin)
   healthkit_spawn(origin)

   new arg1[6]
   read_argv(1, arg1, 5)
   if (!equali(arg1, "save"))
      return PLUGIN_HANDLED

   new command[48]
   format(command, 47, "healthkit_load %d %d %d", origin[0], origin[1], origin[2])
   write_file(FILE, command)

   return PLUGIN_HANDLED
}

public cmd_healthkit_load(id, level, cid) {
   if (!cmd_access(id, level, cid, 4))
      return PLUGIN_HANDLED

   new arg1[8], arg2[8], arg3[8], origin[3]
   read_argv(1, arg1, 7)
   read_argv(2, arg2, 7)
   read_argv(3, arg3, 7)
   origin[0] = str_to_num(arg1)
   origin[1] = str_to_num(arg2)
   origin[2] = str_to_num(arg3)
   healthkit_spawn(origin)

   return PLUGIN_HANDLED
}

public cmd_healthkit_clear(id, level, cid) {
   if (!cmd_access(id, level, cid, 1))
      return PLUGIN_HANDLED

   new healthkit = -1
   while ((healthkit = find_ent_by_class(healthkit, CLASSNAME)))
      remove_entity(healthkit)

   return PLUGIN_HANDLED
}

healthkit_spawn(origin[3]) {
   new healthkit = create_entity(CLASSNAME)
   if (!healthkit)
      return

   new Float:vec[3]
   IVecFVec(origin, vec)
   entity_set_origin(healthkit, vec)
   DispatchSpawn(healthkit)
}


PLS aki nagyon ért angolul magyarázza el nekem hogy kell ezt telepiteni és használni a szerveren

THANK

Szerző:  kiki [2011.12.10. 21:45 ]
Hozzászólás témája:  Re: Healthkit

Idézet:
Commands:
healthkit_spawn [save] - spawns a healthkit at the origin of a player who typed that command
if "save" argument is specified then origin would be added to the end of the file
$configsdir/maps/<currentmap>.cfg (file would be created if it is not exists)
that would allow to spawn saved healthkits every specific map load
Note: to avoid error create $configsdir/maps folder if it is not exists.

healthkit_load <x> <y> <z> - spawns a healthkit at the specified origin

healthkit_clear - removes all spawned healthkits

Commands access level is ADMIN_CFG (falg "h") can be redefined (#define ACCESS_LEVEL)

Szerző:  rericsi8 [2011.12.10. 21:47 ]
Hozzászólás témája:  Re: Healthkit

nem értelek... :)

Szerző:  IrOn [2011.12.10. 22:38 ]
Hozzászólás témája:  Re: Healthkit

Idézet:
Parancsok:
healthkit_spawn [save] - Healthkit lerakás, ha utanairod a save-t elmenteni configs/maps mappába(akkoreznem:D)

healthkit_load <x> <y> <z> - healthkit betöltés xyz kordinátából

healthkit_clear - Összes healthkit megszüntetése

A parancsokhoz ADMIN_CFG (flag "h") jog szükséges (#define ACCESS_LEVEL <--Sma-ban állítható)

Valahogy így, nem biztos hogy jó, nem tudok angolul

Szerző:  VirTuaL ~` [2011.12.10. 23:05 ]
Hozzászólás témája:  Re: Healthkit

IrOn123 írta:
Idézet:
Parancsok:
healthkit_spawn [save] - Healthkit lerakás, ha utanairod a save-t elmenteni configs/maps mappába(ezt létre kell hoznod)

healthkit_load <x> <y> <z> - healthkit betöltés xyz kordinátából

healthkit_clear - Összes healthkit megszüntetése

A paracsancsokhoz ADMIN_CFG (flag "h") jog szükséges (#define ACCESS_LEVEL <--Sma-ban állítható)

Valahogy így, nem biztos hogy jó, nem tudok angolul


"(ezt létre kell hoznod)" Nem muszáj mert ha nincs,akkor magától létrehozza :D . A többi jó...

Szerző:  Metal [2011.12.11. 10:06 ]
Hozzászólás témája:  Re: Healthkit

http://muszaly.hu/

virtualcfg írta:
IrOn123 írta:
Idézet:
Parancsok:
healthkit_spawn [save] - Healthkit lerakás, ha utanairod a save-t elmenteni configs/maps mappába(ezt létre kell hoznod)

healthkit_load <x> <y> <z> - healthkit betöltés xyz kordinátából

healthkit_clear - Összes healthkit megszüntetése

A paracsancsokhoz ADMIN_CFG (flag "h") jog szükséges (#define ACCESS_LEVEL <--Sma-ban állítható)

Valahogy így, nem biztos hogy jó, nem tudok angolul


"(ezt létre kell hoznod)" Nem muszály mert ha nincs,akkor magától létrehozza :D . A többi jó...

Szerző:  IrOn [2011.12.11. 11:03 ]
Hozzászólás témája:  Re: Healthkit

Nem lesz egy nyelvtan óra topik?

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