Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[forums.alliedmods.net] Golden Player


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7179
  • Lokalizacja:AMXX.PL
Offline

Napisano 20.01.2012 10:37

I have edited VIP to Goldenplayer
i wanted to put map change limit (for example 1 day they can change 8 times)
if anyone knows please help!


PHP Code:

#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
new mpd, mkb, mhb
new g_MsgSync
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
new g_awp_active
new g_menu_active
new round;
new
bool:HasC4[33]
#define Keysrod (1<<0)|(1<<1)|(1<<9) // Keys: 1234567890
#if defined DAMAGE_RECIEVED
new g_MsgSync2
#endif

public plugin_init()
{
register_plugin("VIP Eng Version", "2.05", "Dunno")
mpd = register_cvar("money_per_damage","3")
mkb = register_cvar("money_kill_bonus","200")
mhb = register_cvar("money_hs_bonus","500")
health_add = register_cvar("amx_vip_hp", "15")
health_hs_add = register_cvar("amx_vip_hp_hs", "30")
health_max = register_cvar("amx_vip_max_hp", "100")
g_awp_active = register_cvar("awp_active", "0")
g_menu_active = register_cvar("menu_active", "0")
register_event("Damage","Damage","b")
register_event("DeathMsg","death_msg","a")
register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
register_clcmd("awp","HandleCmd")
register_clcmd("sg550","HandleCmd")
register_clcmd("g3sg1","HandleCmd")
register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
register_event("CurWeapon", "event_CurWeaponn", "be", "1=1")
register_event("CurWeapon", "event_CurWeaponnn", "be", "1=1")
register_clcmd("say /wantvip","ShowMotd")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")
register_event("DeathMsg", "hook_death", "a", "1>0")
register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
g_MsgSync = CreateHudSyncObj()
#if defined DAMAGE_RECIEVED
g_MsgSync2 = CreateHudSyncObj()
#endif
}

public
on_damage(id)
{
new
attacker = get_user_attacker(id)

#if defined DAMAGE_RECIEVED
// id should be connected if this message is sent, but lets check anyway
if ( is_user_connected(id) && is_user_connected(attacker) )
if (
get_user_flags(attacker) & ADMIN_LEVEL_H)
{
new
damage = read_data(2)

set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
#else
if ( is_user_connected(attacker) && if (get_user_flags(attacker) & ADMIN_LEVEL_H) )
{
new
damage = read_data(2)
#endif
set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attacker, g_MsgSync, "%i^n", damage)
}
}

public
Damage(id)
{
new
weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
if(
attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
if (
get_user_flags(attacker) & ADMIN_LEVEL_H)
{
new
money = read_data(2) * get_pcvar_num(mpd)
if(
hitpoint==1) money += get_pcvar_num(mhb)
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
}
}

public
death_msg()
{
if(
read_data(1)<=maxplayers && read_data(1) && read_data(1[color=#007700])!=
[color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]2[/color][color=#007700])) [/color][color=#0000BB]cs_set_user_money[/color][color=#007700]([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700]),[/color][color=#0000BB]cs_get_user_money[/color][color=#007700]([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700])) + [/color][color=#0000BB]get_pcvar_num[/color][color=#007700]([/color][color=#0000BB]mkb[/color][color=#007700]) - [/color][color=#0000BB]300[/color][color=#007700])
}


public [/color][color=#0000BB]fwHamPlayerSpawnPost[/color][color=#007700]() {

new [/color][color=#0000BB]players[/color][color=#007700][[/color][color=#0000BB]32[/color][color=#007700]], [/color][color=#0000BB]player[/color][color=#007700], [/color][color=#0000BB]pnum[/color][color=#007700];
[/color][color=#0000BB]get_players[/color][color=#007700]([/color][color=#0000BB]players[/color][color=#007700], [/color][color=#0000BB]pnum[/color][color=#007700], [/color][color=#DD0000]"a"[/color][color=#007700]);
for(new [/color][color=#0000BB]i [/color][color=#007700]= [/color][color=#0000BB]0[/color][color=#007700]; [/color][color=#0000BB]i [/color][color=#007700]< [/color][color=#0000BB]pnum[/color][color=#007700]; [/color][color=#0000BB]i[/color][color=#007700]++)
{
[/color][color=#0000BB]player [/color][color=#007700]= [/color][color=#0000BB]players[/color][color=#007700][[/color][color=#0000BB]i[/color][color=#007700]];
if([/color][color=#0000BB]is_user_alive[/color][color=#007700]([/color][color=#0000BB]player[/color][color=#007700]) && [/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]player[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700])
{

}
}
return [/color][color=#0000BB]PLUGIN_HANDLED
[/color][color=#007700]}

public [/color][color=#0000BB]event_new_round[/color][color=#007700]()
{
[/color][color=#0000BB]round[/color][color=#007700]++;
new [/color][color=#0000BB]players[/color][color=#007700][[/color][color=#0000BB]32[/color][color=#007700]], [/color][color=#0000BB]player[/color][color=#007700], [/color][color=#0000BB]pnum[/color][color=#007700];
[/color][color=#0000BB]get_players[/color][color=#007700]([/color][color=#0000BB]players[/color][color=#007700], [/color][color=#0000BB]pnum[/color][color=#007700], [/color][color=#DD0000]"a"[/color][color=#007700]);
for(new [/color][color=#0000BB]i [/color][color=#007700]= [/color][color=#0000BB]0[/color][color=#007700]; [/color][color=#0000BB]i [/color][color=#007700]< [/color][color=#0000BB]pnum[/color][color=#007700]; [/color][color=#0000BB]i[/color][color=#007700]++)
{
[/color][color=#0000BB]player [/color][color=#007700]= [/color][color=#0000BB]players[/color][color=#007700][[/color][color=#0000BB]i[/color][color=#007700]];
if([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]player[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700])
{
if (![/color][color=#0000BB]get_pcvar_num[/color][color=#007700]([/color][color=#0000BB]g_menu_active[/color][color=#007700]))
return [/color][color=#0000BB]PLUGIN_CONTINUE
[/color][color=#007700]if([/color][color=#0000BB]round [/color][color=#007700]> [/color][color=#0000BB]2[/color][color=#007700])
{
[/color][color=#0000BB]Showrod[/color][color=#007700]([/color][color=#0000BB]player[/color][color=#007700]);
}
}
}
return [/color][color=#0000BB]PLUGIN_HANDLED
[/color][color=#007700]}

public [/color][color=#0000BB]Event_RoundRestart[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
[/color][color=#0000BB]round[/color][color=#007700]=[/color][color=#0000BB]0[/color][color=#007700];
}

public [/color][color=#0000BB]hook_death[/color][color=#007700]()
{
[/color][color=#FF8000]// Killer id
[/color][color=#0000BB]nKiller [/color][color=#007700]= [/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700])

if ( ([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]3[/color][color=#007700]) == [/color][color=#0000BB]1[/color][color=#007700]) && ([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]5[/color][color=#007700]) == [/color][color=#0000BB]0[/color][color=#007700]) )
{
[/color][color=#0000BB]nHp_add [/color][color=#007700]= [/color][color=#0000BB]get_pcvar_num [/color][color=#007700]([/color][color=#0000BB]health_hs_add[/color][color=#007700])
}
else
[/color][color=#0000BB]nHp_add [/color][color=#007700]= [/color][color=#0000BB]get_pcvar_num [/color][color=#007700]([/color][color=#0000BB]health_add[/color][color=#007700])
[/color][color=#0000BB]nHp_max [/color][color=#007700]= [/color][color=#0000BB]get_pcvar_num [/color][color=#007700]([/color][color=#0000BB]health_max[/color][color=#007700])
[/color][color=#FF8000]// Updating Killer HP
[/color][color=#007700]if(!([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]nKiller[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700]))
return;

[/color][color=#0000BB]nKiller_hp [/color][color=#007700]= [/color][color=#0000BB]get_user_health[/color][color=#007700]([/color][color=#0000BB]nKiller[/color][color=#007700])
[/color][color=#0000BB]nKiller_hp [/color][color=#007700]+= [/color][color=#0000BB]nHp_add
[/color][color=#FF8000]// Maximum HP check
[/color][color=#007700]if ([/color][color=#0000BB]nKiller_hp [/color][color=#007700]> [/color][color=#0000BB]nHp_max[/color][color=#007700]) [/color][color=#0000BB]nKiller_hp [/color][color=#007700]= [/color][color=#0000BB]nHp_max
set_user_health[/color][color=#007700]([/color][color=#0000BB]nKiller[/color][color=#007700], [/color][color=#0000BB]nKiller_hp[/color][color=#007700])
[/color][color=#FF8000]// Hud message "Healed +15/+30 hp"
[/color][color=#0000BB]set_hudmessage[/color][color=#007700]([/color][color=#0000BB]0[/color][color=#007700], [/color][color=#0000BB]255[/color][color=#007700], [/color][color=#0000BB]0[/color][color=#007700], -[/color][color=#0000BB]1.0[/color][color=#007700], [/color][color=#0000BB]0.15[/color][color=#007700], [/color][color=#0000BB]0[/color][color=#007700], [/color][color=#0000BB]1.0[/color][color=#007700], [/color][color=#0000BB]1.0[/color][color=#007700], [/color][color=#0000BB]0.1[/color][color=#007700], [/color][color=#0000BB]0.1[/color][color=#007700], -[/color][color=#0000BB]1[/color][color=#007700])
[/color][color=#0000BB]show_hudmessage[/color][color=#007700]([/color][color=#0000BB]nKiller[/color][color=#007700], [/color][color=#DD0000]"Healed +%d hp"[/color][color=#007700], [/color][color=#0000BB]nHp_add[/color][color=#007700])
[/color][color=#FF8000]// Screen fading
[/color][color=#0000BB]message_begin[/color][color=#007700]([/color][color=#0000BB]MSG_ONE[/color][color=#007700], [/color][color=#0000BB]get_user_msgid[/color][color=#007700]([/color][color=#DD0000]"ScreenFade"[/color][color=#007700]), {[/color][color=#0000BB]0[/color][color=#007700],[/color][color=#0000BB]0[/color][color=#007700],[/color][color=#0000BB]0[/color][color=#007700]}, [/color][color=#0000BB]nKiller[/color][color=#007700])
[/color][color=#0000BB]write_short[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700]<<[/color][color=#0000BB]10[/color][color=#007700])
[/color][color=#0000BB]write_short[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700]<<[/color][color=#0000BB]10[/color][color=#007700])
[/color][color=#0000BB]write_short[/color][color=#007700]([/color][color=#0000BB]0x0000[/color][color=#007700])
[/color][color=#0000BB]write_byte[/color][color=#007700]([/color][color=#0000BB]0[/color][color=#007700])
[/color][color=#0000BB]write_byte[/color][color=#007700]([/color][color=#0000BB]0[/color][color=#007700])
[/color][color=#0000BB]write_byte[/color][color=#007700]([/color][color=#0000BB]200[/color][color=#007700])
[/color][color=#0000BB]write_byte[/color][color=#007700]([/color][color=#0000BB]75[/color][color=#007700])
[/color][color=#0000BB]message_end[/color][color=#007700]()

}

public [/color][color=#0000BB]Showrod[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) {
[/color][color=#0000BB]show_menu[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]Keysrod[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700], -[/color][color=#0000BB]1[/color][color=#007700], [/color][color=#DD0000]"rod"[/color][color=#007700]) [/color][color=#FF8000]// Display menu
[/color][color=#007700]}
public [/color][color=#0000BB]Pressedrod[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]key[/color][color=#007700]) {
[/color][color=#FF8000]/*
*
*
*
*
*/
[/color][color=#007700]switch ([/color][color=#0000BB]key[/color][color=#007700]) {
case [/color][color=#0000BB]0[/color][color=#007700]: {
if ([/color][color=#0000BB]user_has_weapon[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]CSW_C4[/color][color=#007700]) && [/color][color=#0000BB]get_user_team[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) == [/color][color=#0000BB]1[/color][color=#007700])
[/color][color=#0000BB]HasC4[/color][color=#007700][[/color][color=#0000BB]id[/color][color=#007700]] = [/color][color=#0000BB]true[/color][color=#007700];
else
[/color][color=#0000BB]HasC4[/color][color=#007700][[/color][color=#0000BB]id[/color][color=#007700]] = [/color][color=#0000BB]false[/color][color=#007700];

[/color][color=#0000BB]client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_center[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700])

if ([/color][color=#0000BB]HasC4[/color][color=#007700][[/color][color=#0000BB]id[/color][color=#007700]])
{
[/color][color=#0000BB]give_item[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#DD0000]"weapon_c4"[/color][color=#007700]);
[/color][color=#0000BB]cs_set_user_plant[/color][color=#007700]( [/color][color=#0000BB]id [/color][color=#007700]);
}
}
case [/color][color=#0000BB]1[/color][color=#007700]: {
if ([/color][color=#0000BB]user_has_weapon[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]CSW_C4[/color][color=#007700]) && [/color][color=#0000BB]get_user_team[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) == [/color][color=#0000BB]1[/color][color=#007700])
[/color][color=#0000BB]HasC4[/color][color=#007700][[/color][color=#0000BB]id[/color][color=#007700]] = [/color][color=#0000BB]true[/color][color=#007700];
else
[/color][color=#0000BB]HasC4[/color][color=#007700][[/color][color=#0000BB]id[/color][color=#007700]] = [/color][color=#0000BB]false[/color][color=#007700];

[/color][color=#0000BB]client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_center[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700])

if ([/color][color=#0000BB]HasC4[/color][color=#007700][[/color][color=#0000BB]id[/color][color=#007700]])
{
[/color][color=#0000BB]give_item[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#DD0000]"weapon_c4"[/color][color=#007700]);
[/color][color=#0000BB]cs_set_user_plant[/color][color=#007700]( [/color][color=#0000BB]id [/color][color=#007700]);
}
}
case [/color][color=#0000BB]9[/color][color=#007700]: {
}
}
return [/color][color=#0000BB]PLUGIN_CONTINUE
[/color][color=#007700]}

public [/color][color=#0000BB]HandleCmd[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]){
if (![/color][color=#0000BB]get_pcvar_num[/color][color=#007700]([/color][color=#0000BB]g_awp_active[/color][color=#007700]))
return [/color][color=#0000BB]PLUGIN_CONTINUE
[/color][color=#007700]if([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700])
return [/color][color=#0000BB]PLUGIN_CONTINUE
client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_center[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700])
return [/color][color=#0000BB]PLUGIN_HANDLED
[/color][color=#007700]}


public [/color][color=#0000BB]event_CurWeapon[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
if([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]2[/color][color=#007700]) == [/color][color=#0000BB]CSW_AWP[/color][color=#007700])
{
if(!([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700]))
{
[/color][color=#0000BB]client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_center[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700])
[/color][color=#0000BB]client_cmd[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#DD0000]"pick"[/color][color=#007700])
}
}
return [/color][color=#0000BB]PLUGIN_HANDLED
[/color][color=#007700]}

public [/color][color=#0000BB]event_CurWeaponn[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
if([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]2[/color][color=#007700]) == [/color][color=#0000BB]CSW_SG550[/color][color=#007700])
{
if(!([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700]))
{
[/color][color=#0000BB]client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_center[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700])
[/color][color=#0000BB]client_cmd[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#DD0000]"pick"[/color][color=#007700])
}
}
return [/color][color=#0000BB]PLUGIN_HANDLED
[/color][color=#007700]}

public [/color][color=#0000BB]event_CurWeaponnn[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
if([/color][color=#0000BB]read_data[/color][color=#007700]([/color][color=#0000BB]2[/color][color=#007700]) == [/color][color=#0000BB]CSW_G3SG1[/color][color=#007700])
{
if(!([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700]))
{
[/color][color=#0000BB]client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_center[/color][color=#007700], [/color][color=#DD0000]"pick"[/color][color=#007700])
[/color][color=#0000BB]client_cmd[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#DD0000]"pick"[/color][color=#007700])
}
}
return [/color][color=#0000BB]PLUGIN_HANDLED
[/color][color=#007700]}

public [/color][color=#0000BB]ShowMotd[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
[/color][color=#0000BB]show_motd[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#DD0000]"goldenplayer.txt"[/color][color=#007700])
}
public [/color][color=#0000BB]client_authorized[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
[/color][color=#0000BB]set_task[/color][color=#007700]([/color][color=#0000BB]30.0[/color][color=#007700], [/color][color=#DD0000]"PrintText" [/color][color=#007700],[/color][color=#0000BB]id[/color][color=#007700])
}
public [/color][color=#0000BB]PrintText[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
{
[/color][color=#0000BB]client_print[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]print_chat[/color][color=#007700], [/color][color=#DD0000]""[/color][color=#007700])
}

public [/color][color=#0000BB]handle_say[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) {
new [/color][color=#0000BB]said[/color][color=#007700][[/color][color=#0000BB]192[/color][color=#007700]]
[/color][color=#0000BB]read_args[/color][color=#007700]([/color][color=#0000BB]said[/color][color=#007700],[/color][color=#0000BB]192[/color][color=#007700])
if( ( [/color][color=#0000BB]containi[/color][color=#007700]([/color][color=#0000BB]said[/color][color=#007700], [/color][color=#DD0000]"who"[/color][color=#007700]) != -[/color][color=#0000BB]1 [/color][color=#007700]&& [/color][color=#0000BB]containi[/color][color=#007700]([/color][color=#0000BB]said[/color][color=#007700], [/color][color=#DD0000]"admin"[/color][color=#007700]) != -[/color][color=#0000BB]1 [/color][color=#007700]) || [/color][color=#0000BB]contain[/color][color=#007700]([/color][color=#0000BB]said[/color][color=#007700], [/color][color=#DD0000]"/golden"[/color][color=#007700]) != -[/color][color=#0000BB]1 [/color][color=#007700])
[/color][color=#0000BB]set_task[/color][color=#007700]([/color][color=#0000BB]0.1[/color][color=#007700],[/color][color=#DD0000]"print_adminlist"[/color][color=#007700],[/color][color=#0000BB]id[/color][color=#007700])
return [/color][color=#0000BB]PLUGIN_CONTINUE
[/color][color=#007700]}

public [/color][color=#0000BB]print_adminlist[/color][color=#007700]([/color][color=#0000BB]user[/color][color=#007700])
{
new [/color][color=#0000BB]adminnames[/color][color=#007700][[/color][color=#0000BB]33[/color][color=#007700]][[/color][color=#0000BB]32[/color][color=#007700]]
new [/color][color=#0000BB]message[/color][color=#007700][[/color][color=#0000BB]256[/color][color=#007700]]
new [/color][color=#0000BB]contactinfo[/color][color=#007700][[/color][color=#0000BB]256[/color][color=#007700]], [/color][color=#0000BB]contact[/color][color=#007700][[/color][color=#0000BB]112[/color][color=#007700]]
new [/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]count[/color][color=#007700], [/color][color=#0000BB]x[/color][color=#007700], [/color][color=#0000BB]len

[/color][color=#007700]for([/color][color=#0000BB]id [/color][color=#007700]= [/color][color=#0000BB]1 [/color][color=#007700]; [/color][color=#0000BB]id [/color][color=#007700]<= [/color][color=#0000BB]maxplayers [/color][color=#007700]; [/color][color=#0000BB]id[/color][color=#007700]++)
if([/color][color=#0000BB]is_user_connected[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]))
if([/color][color=#0000BB]get_user_flags[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700]) & [/color][color=#0000BB]ADMIN_LEVEL_H[/color][color=#007700])
[/color][color=#0000BB]get_user_name[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]adminnames[/color][color=#007700][[/color][color=#0000BB]count[/color][color=#007700]++], [/color][color=#0000BB]31[/color][color=#007700])

[/color][color=#0000BB]len [/color][color=#007700]= [/color][color=#0000BB]format[/color][color=#007700]([/color][color=#0000BB]message[/color][color=#007700], [/color][color=#0000BB]255[/color][color=#007700], [/color][color=#DD0000]"%s Golden players Online: "[/color][color=#007700],[/color][color=#0000BB]COLOR[/color][color=#007700])
if([/color][color=#0000BB]count [/color][color=#007700]> [/color][color=#0000BB]0[/color][color=#007700]) {
for([/color][color=#0000BB]x [/color][color=#007700]= [/color][color=#0000BB]0 [/color][color=#007700]; [/color][color=#0000BB]x [/color][color=#007700]< [/color][color=#0000BB]count [/color][color=#007700]; [/color][color=#0000BB]x[/color][color=#007700]++) {
[/color][color=#0000BB]len [/color][color=#007700]+= [/color][color=#0000BB]format[/color][color=#007700]([/color][color=#0000BB]message[/color][color=#007700][[/color][color=#0000BB]len[/color][color=#007700]], [/color][color=#0000BB]255[/color][color=#007700]-[/color][color=#0000BB]len[/color][color=#007700], [/color][color=#DD0000]"%s%s "[/color][color=#007700], [/color][color=#0000BB]adminnames[/color][color=#007700][[/color][color=#0000BB]x[/color][color=#007700]], [/color][color=#0000BB]x [/color][color=#007700]< ([/color][color=#0000BB]count[/color][color=#007700]-[/color][color=#0000BB]1[/color][color=#007700]) ? [/color][color=#DD0000]", "[/color][color=#007700]:[/color][color=#DD0000]""[/color][color=#007700])
if([/color][color=#0000BB]len [/color][color=#007700]> [/color][color=#0000BB]96 [/color][color=#007700]) {
[/color][color=#0000BB]print_message[/color][color=#007700]([/color][color=#0000BB]user[/color][color=#007700], [/color][color=#0000BB]message[/color][color=#007700])
[/color][color=#0000BB]len [/color][color=#007700]= [/color][color=#0000BB]format[/color][color=#007700]([/color][color=#0000BB]message[/color][color=#007700], [/color][color=#0000BB]255[/color][color=#007700], [/color][color=#DD0000]"%s "[/color][color=#007700],[/color][color=#0000BB]COLOR[/color][color=#007700])
}
}
[/color][color=#0000BB]print_message[/color][color=#007700]([/color][color=#0000BB]user[/color][color=#007700], [/color][color=#0000BB]message[/color][color=#007700])
}
else {
[/color][color=#0000BB]len [/color][color=#007700]+= [/color][color=#0000BB]format[/color][color=#007700]([/color][color=#0000BB]message[/color][color=#007700][[/color][color=#0000BB]len[/color][color=#007700]], [/color][color=#0000BB]255[/color][color=#007700]-[/color][color=#0000BB]len[/color][color=#007700], [/color][color=#DD0000]"No Golden players online."[/color][color=#007700])
[/color][color=#0000BB]print_message[/color][color=#007700]([/color][color=#0000BB]user[/color][color=#007700], [/color][color=#0000BB]message[/color][color=#007700])
}

[/color][color=#0000BB]get_cvar_string[/color][color=#007700]([/color][color=#DD0000]"amx_contactinfo"[/color][color=#007700], [/color][color=#0000BB]contact[/color][color=#007700], [/color][color=#0000BB]63[/color][color=#007700])
if([/color][color=#0000BB]contact[/color][color=#007700][[/color][color=#0000BB]0[/color][color=#007700]]) {
[/color][color=#0000BB]format[/color][color=#007700]([/color][color=#0000BB]contactinfo[/color][color=#007700], [/color][color=#0000BB]111[/color][color=#007700], [/color][color=#DD0000]"%s Contact Server Admin -- %s"[/color][color=#007700], [/color][color=#0000BB]COLOR[/color][color=#007700], [/color][color=#0000BB]contact[/color][color=#007700])
[/color][color=#0000BB]print_message[/color][color=#007700]([/color][color=#0000BB]user[/color][color=#007700], [/color][color=#0000BB]contactinfo[/color][color=#007700])
}
}

[/color][color=#0000BB]print_message[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700], [/color][color=#0000BB]msg[/color][color=#007700][]) {
[/color][color=#0000BB]message_begin[/color][color=#007700]([/color][color=#0000BB]MSG_ONE[/color][color=#007700], [/color][color=#0000BB]gmsgSayText[/color][color=#007700], {[/color][color=#0000BB]0[/color][color=#007700],[/color][color=#0000BB]0[/color][color=#007700],[/color][color=#0000BB]0[/color][color=#007700]}, [/color][color=#0000BB]id[/color][color=#007700])
[/color][color=#0000BB]write_byte[/color][color=#007700]([/color][color=#0000BB]id[/color][color=#007700])
[/color][color=#0000BB]write_string[/color][color=#007700]([/color][color=#0000BB]msg[/color][color=#007700])
[/color][color=#0000BB]message_end[/color][color=#007700]()
}
[/color][color=#0000BB][/color][/color]



Attached Files Dołączona grafika Get Plugin or Get Source (goldenplayer.sma - 8.2 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych