Skocz do zawartości

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
 

Wklejka hlyrkukqd3sc dodana przez MariuszeŁ, 29.09.2012 19:48
Typ:



1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
 
#define PLUGIN "PaintBall VIP"
#define VERSION "1.0"
#define AUTHOR "NieZnany"
 
#define ADMIN_CHECK ADMIN_LEVEL_H
 
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
 
new maxplayers
new gmsgSayText
 
#define ADMIN_VIP           ADMIN_LEVEL_H
#define SCOREATTRIB_NONE        0
#define SCOREATTRIB_DEAD        (1<<0)
#define SCOREATTRIB_BOMB        (1<<1)
#define SCOREATTRIB_VIP         (1<<2)
 
public plugin_init() 
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
 
        register_clcmd("say /vip","ShowMotd")
        register_clcmd("say /infovip","ShowMotd")
        register_clcmd("say /info","ShowMotd")
        register_clcmd("say /vipinfo","ShowMotd")
        register_clcmd("say_team /vip","ShowMotd")
        register_clcmd("say_team /infovip","ShowMotd")
        register_clcmd("say_team /info","ShowMotd")
        register_clcmd("say_team /vipinfo","ShowMotd")
 
        RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
        register_plugin("VIP Admin", "0.0.1", "Exolent");
        register_message(get_user_msgid("ScoreAttrib"), "MessageScoreAttrib");
 
 
 
 
        maxplayers = get_maxplayers()
        gmsgSayText = get_user_msgid("SayText")
        register_clcmd("say", "handle_say")
        register_clcmd("say_team", "handle_say")
        register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}
 
public fwHamPlayerSpawnPost(id)
{       
        if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
        {
                if(task_exists(id + 666))
                        remove_task(id + 666);
 
                set_task(2.0, "doGiveGrenades", id + 666);
        }
}
 
public doGiveGrenades(task_id)
{
        new id = task_id -= 666;
 
        if(id > get_maxplayers() || id < 1)
                return PLUGIN_HANDLED;
 
        set_user_health(id, 200);
        give_item(id, "weapon_smokegrenade");
        give_item(id, "weapon_hegrenade");
        give_item(id, "item_thighpack");
        set_user_gravity(id, 0.6);
        cs_set_user_bpammo(id, CSW_MP5NAVY, 200);
 
        return PLUGIN_CONTINUE;
}
 
public ShowMotd(id) 
        show_motd(id, "vip.txt")
 
public handle_say(id) 
{
        new said[192]
        read_args(said,192)
        if( ( containi(said, "who") != -1 && containi(said, "vipy") != -1 ) || contain(said, "/vipy") != -1 )
                set_task(0.1,"print_adminlist",id)
        return PLUGIN_CONTINUE
}
 
public print_adminlist(user) 
{
        new adminnames[33][32]
        new message[256]
        new contactinfo[256], contact[112]
        new id, count, x, len
 
        for(id = 1 ; id <= maxplayers ; id++)
                if(is_user_connected(id))
                        if(get_user_flags(id) & ADMIN_CHECK)
                                get_user_name(id, adminnames[count++], 31)
 
        len = format(message, 255, "%s VIP'y online: ",COLOR)
        if(count > 0) {
                for(x = 0 ; x < count ; x++) {
                        len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
                        if(len > 96 ) {
                                print_message(user, message)
                                len = format(message, 255, "%s ",COLOR)
                        }
                }
                print_message(user, message)
        }
        else {
                len += format(message[len], 255-len, "Brak VIP'ow online.")
                print_message(user, message)
        }
 
        get_cvar_string("amx_contactinfo", contact, 63)
        if(contact[0])  {
                format(contactinfo, 111, "%s Kontakt z H@ znajdziesz na forum www.GdyniaCs.Eu %s", COLOR, contact)
                print_message(user, contactinfo)
        }
}
 
print_message(id, msg[]) 
{
        message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
        write_byte(id)
        write_string(msg)
        message_end()
}
public plugin_precache() {
        precache_model("models/player/gdpbct/vipct.mdl")
        precache_model("models/player/gdpbtt/viptt.mdl")
 
        return PLUGIN_CONTINUE
}
 
public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "viptt")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "vipct")
                }
                else {
                        cs_reset_user_model(id)
                }
        }
 
        return PLUGIN_CONTINUE
}
 
public MessageScoreAttrib(iMsgID, iDest, iReceiver)
{   
        new iPlayer = get_msg_arg_int(1);
        if( is_user_connected( iPlayer )   && ( get_user_flags( iPlayer ) & ADMIN_VIP ) )
        {
                set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );  
        }
}
 
 

Dodanych wklejek: 11179
Powered By (Pav32) Pastebin © 2011