AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help edit Server Informer plugin (make only for dead and spec) (https://forums.alliedmods.net/showthread.php?t=175093)

pizzaman_ 12-30-2011 01:40

help edit Server Informer plugin (make only for dead and spec)
 
hi there, my first post and already looking for help lol

I pretty sure this will be easy, not to me bth I dont know anything about scripting :cry:

[IMG]http://img42.**************/img42/7048/pluginsh.jpg[/IMG]

can you edit .sma of that plugin to be show only for dead players and spec?

another thing i use GHW_Custom_Nextmap.amxx and is set to show when ppl write nextmap: [AMXX] Nextmap not chosen yet

but in the picture shows map de_nuke so delete nextmap message or whatever is called of this plugin

Quote:

#include <amxmodx>
#include <cstrike>
#include <engine>

#define PLUGIN_NAME "Server Informer"
#define PLUGIN_AUTHOR "Sho0ter edit by .csF Group"
#define PLUGIN_VERSION "1.0 Public"

#define INFORMERTID 100503

new PcvarInformer
new PcvarServerMode
new PcvarAdminIcq
new PcvarServerIp
new g_MaxClients
new g_HudText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_dictionary("server_info.txt")

set_task(1.0, "Informer", INFORMERTID, "", 0, "b")

PcvarServerMode = register_cvar("csf_server_mode", "PUBLIC", FCVAR_SERVER)
PcvarServerIp = register_cvar("csf_server_ip", "127.0.0.1", FCVAR_SERVER)
PcvarAdminIcq = register_cvar("csf_admin_icq", "623238176", FCVAR_SERVER)
PcvarInformer = register_cvar("csf_info", "1")
g_MaxClients = get_global_int(GL_maxClients)
g_HudText = CreateHudSyncObj()
}

public Informer()
{
if(!get_pcvar_num(PcvarInformer))
{
remove_task(INFORMERTID)
return PLUGIN_HANDLED
}
new id, acts, cts, all, CurrentTime[32], NextMap[32], Terrorist[32], names[33][32], Message[512]
for(id = 1; id <= g_MaxClients; id++)
{
if(!is_user_connected(id))
{
continue
}
else if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
{
acts++
cts++
all ++
get_user_name(id, names[acts], 31)
}
else if(!is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
{
cts++
all++
}
else if(cs_get_user_team(id) == CS_TEAM_T && !is_user_bot(id))
{
get_user_name(id, Terrorist, 63)
all++
}
else
{
all++
}
}
for(id = 1; id <= g_MaxClients; id++)
{
new Len, ServerMod[32], AdminIcq[32], ServerIp[32]
get_pcvar_string(PcvarServerMode, ServerMod, 31)
Len += format(Message[Len], 511 - Len, "^n%L: %L", LANG_PLAYER, "SERVERMOD", LANG_PLAYER, ServerMod)
get_time("%H:%M:%S", CurrentTime, 31)
Len += format(Message[Len], 511 - Len, "^n%L: %s", LANG_PLAYER, "CURRENTTIME", CurrentTime)
if(get_cvar_float("mp_timelimit"))
{
new a = get_timeleft()
Len += format(Message[Len], 511 - Len, "^n%L: %d:%02d", LANG_PLAYER, "TLEFT", (a / 60), (a % 60))
}
else
{
Len += format(Message[Len], 511 - Len, "^n%L: %L", LANG_PLAYER, "TLEFT", LANG_PLAYER, "LASTR")
}
get_cvar_string("amx_nextmap", NextMap, 31)
Len += format(Message[Len], 511 - Len, "^n%L: %s", LANG_PLAYER, "NMAP", NextMap)
Len += format(Message[Len], 511 - Len, "^n%L: %d/%d", LANG_PLAYER, "APLAYERS", all, g_MaxClients)
get_pcvar_string(PcvarAdminIcq, AdminIcq, 31)
Len += format(Message[Len], 511 - Len, "^n%L: %s", LANG_PLAYER, "ADMINICQ", AdminIcq)
get_pcvar_string(PcvarServerIp, ServerIp, 31)
Len += format(Message[Len], 511 - Len, "^n%L: %s", LANG_PLAYER, "SERVERIP", ServerIp)
if(acts > 3)
{
set_hudmessage(100, 100, 100, 0.01, 0.18, 0, 1.0, 1.0)
}
else if(acts == 3)
{
set_hudmessage(100, 100, 100, 0.01, 0.18, 0, 1.0, 1.0)
}
else if(acts == 2)
{
set_hudmessage(100, 100, 100, 0.01, 0.18, 0, 1.0, 1.0)
}
else
{
set_hudmessage(100, 100, 100, 0.01, 0.18, 1, 1.0, 1.0)
}
ShowSyncHudMsg(id, g_HudText, "%s", Message)
}
return PLUGIN_CONTINUE
}
here is .sma and thx to all

fysiks 12-30-2011 01:55

Re: help edit Server Informer plugin (make only for dead and spec)
 
1 Attachment(s)
Rename it to whatever you need. Next time, attach the .sma file to your post.

pizzaman_ 12-30-2011 02:42

Re: help edit Server Informer plugin (make only for dead and spec)
 
:D thx


All times are GMT -4. The time now is 16:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.