| Autor |
Mesaj |
Antonio
Administrator

Data inscrierii: 11/Feb/2010 Mesaje: 21
|
|
-|AfkBomb|- |
|
Descriere: Daca jucatorul care are bomba este AFK (sta degeaba) acest plugin ii arunca bomba pentru ca ceilalti jucatori sa o poata lua.
Descarcare: [URL=http://www.netdrive.ws/160208.html] Download aici! [/URL]
Nume: AFK Bomb
Versiune: 0.1
Cod:
#include <amxmodx>
#define MIN_AFK_TIME 20 // I use this incase stupid admins accidentally set mp_afktime to something silly.
#define CHECK_FREQ 5 // This is also the warning message frequency.
new g_oldangles[33][3]
new g_afktime[33]
new bool:g_spawned[33] = {true, ...}
public plugin_init() {
register_plugin("AFK Bomb Drop","1.0","FireW@ll")
register_cvar("afk_version", "1.0a", FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
register_cvar("mp_afktime", "20") // Drop bomb if AFK longer than this time
register_cvar("mp_afkminplayers", "1") // at least this many players on the server
set_task(float(CHECK_FREQ),"checkPlayers",_,_,_,"b")
register_event("ResetHUD", "playerSpawned", "be")
}
public checkPlayers() {
for (new i = 1; i <get_maxplayers>= minplayers) {
new maxafktime = get_cvar_num("mp_afktime")
if (maxafktime <MIN_AFK_TIME> maxafktime) {
new name[32]
get_user_name(id, name, 31)
client_cmd(id,"drop weapon_c4 ")
}
}
}
public client_putinserver(id) {
g_afktime[id] = 0
return PLUGIN_HANDLED
}
public playerSpawned(id) {
g_spawned[id] = false
new sid[1]
sid[0] = id
set_task(0.75, "delayedSpawn",_, sid, 1) // Give the player time to drop to the floor when spawning
return PLUGIN_HANDLED
}
public delayedSpawn(sid[]) {
get_user_origin(sid[0], g_oldangles[sid[0]])
g_spawned[sid[0]] = true
return PLUGIN_HANDLED
}
Instalare:
1. Fisierul afkbomb.sma il puneti in addons/amxmodx/scripting
2. Fisierul afkbomb.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
afkbomb.amxx
|
|
| 13/02/2010 00:11 |
|
 |
|
|
Nu puteti crea un subiect nou in acest forum Nu puteti raspunde in subiectele acestui forum Nu puteti modifica mesajele proprii din acest forum Nu puteti sterge mesajele proprii din acest forum Nu puteti vota in chestionarele din acest forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|
|