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 55khl8caubok dodana przez ToJaTwojTelefon, 19.03.2012 21:39
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.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta_util>
#include <engine>
 
 
#define PLUGIN "Deathrun vip"
#define VERSION "2.0"
#define AUTHOR "michal"
 
 
#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 )
 
new SayTxT
 
#define ADMIN_CHECK ADMIN_LEVEL_H
 
new const ok[] = "misc/dr/ok.wav"
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText
 
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "Bacon_Spawn", 1 );
RegisterHam(Ham_Spawn, "player", "Spawn", 1);
SayTxT = get_user_msgid("SayText");  
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}
public plugin_precache() {
        precache_model("models/player/smith/smith.mdl")
        precache_sound(ok)
 
        return PLUGIN_CONTINUE
}
public Spawn(id){
if (get_user_flags(id) & ADMIN_LEVEL_H) 
{
if(is_user_alive(id))
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
set_task(5.0,"menu",id)	
}
if(cs_get_user_team(id) == CS_TEAM_CT)
{
set_task(5.0,"menu1",id)
}
}
}
}
public menu(id)
{
    new menu = menu_create("r.::Vip menu::.", "wybieranie")
 
    menu_additem(menu, "w65 rHp", "6", 0)
    menu_additem(menu, "y100 rPancerzu ", "7", 0)
    menu_additem(menu, "rGrawitacja", "1", 0)
    menu_additem(menu, "wPredkosc", "2", 0)
    menu_additem(menu, "yDeagle z 5 nabojami", "3", 0) 
    menu_additem(menu, "rGranat Oslepiajacy + Wybuchowy", "4", 0)
    menu_additem(menu, "wNoktowizor", "5", 0)
 
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
 
    menu_display(id, menu, 0)
 
}
 
public wybieranie(id, menu, item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new data[6], iName[64]
    new acces, callback
    menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
 
    new key = str_to_num(data)
 
    switch(key)
    {
case 1:{
fm_set_user_gravity(id, 0.5)
client_printcolor(id, "/ctr[VIP] Wybrales grawitacje")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
 
case 2:{
fm_set_user_maxspeed(id, 500.0)
client_printcolor(id, "/ctr[VIP] Wybrales predkosc")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
 
case 3:{
client_printcolor(id, "/ctr[VIP] Wybrales Deagle z 5 nabojami")
client_cmd(id, "spk %s", ok)
give_item(id, "weapon_deagle")
new weapon_id = find_ent_by_owner(-1, "weapon_deagle", id);
if(weapon_id)
{
cs_set_weapon_ammo(weapon_id, 5);
}
menu_destroy(menu)
return PLUGIN_HANDLED
}       
case 4:{
fm_give_item(id, "weapon_hegrenade")
fm_give_item(id, "weapon_flashbang")
client_printcolor(id, "/ctr[VIP] Wybrales Granata Wybuchowego + Oslepiajacego")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
        case 5:{
cs_set_user_nvg(id) 
client_printcolor(id, "/ctr[VIP] Wybrales Noktowizor")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
        }
        case 6:{
set_user_health(id, get_user_health(id) + 65);
client_printcolor(id, "/ctr[VIP] Wybrales 65 Hp")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
        }
        case 7:{
set_user_armor(id, get_user_armor(id) + 100)
client_printcolor(id, "/ctr[VIP] Wybrales 100 Pancerzu")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
        }
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
public menu1(id)
{
    new menu = menu_create("r.::Vip menu::.", "wybieranie1")
 
    menu_additem(menu, "w65 rHp", "6", 0)
    menu_additem(menu, "y100 rPancerzu ", "7", 0)
    menu_additem(menu, "rGrawitacja", "1", 0)
    menu_additem(menu, "wPredkosc", "2", 0)
    menu_additem(menu, "yUsp z 5 nabojami", "3", 0) 
    menu_additem(menu, "rGranat Zamrazajacy", "4", 0)
    menu_additem(menu, "w30% Widocznosci", "5", 0)
 
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
 
    menu_display(id, menu, 0)
 
}
 
public wybieranie1(id, menu, item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new data[6], iName[64]
    new acces, callback
    menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
 
    new key = str_to_num(data)
 
    switch(key)
    {
case 1:{
fm_set_user_gravity( id,0.5)
client_printcolor(id, "/ctr[VIP] Wybrales grawitacje")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
 
case 2:{
fm_set_user_maxspeed(id, 500.0)
client_printcolor(id, "/ctr[VIP] Wybrales predkosc")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
 
case 3:{
client_printcolor(id, "/ctr[VIP] Wybrales Usp z 5 nabojami")
give_item(id, "weapon_usp")
new weapon_id = find_ent_by_owner(-1, "weapon_usp", id);
if(weapon_id)
{
cs_set_weapon_ammo(weapon_id, 5);
}
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}       
case 4:{
fm_give_item(id, "weapon_smokegrenade")
client_printcolor(id, "/ctr[VIP] Wybrales Granat Zamrazajacy")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
}
        case 5:{
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 30);
client_cmd(id, "spk %s", ok)
client_printcolor(id, "/ctr[VIP] Wybrales Niewidzialnosc")
menu_destroy(menu)
return PLUGIN_HANDLED
        }
        case 6:{
set_user_health(id, get_user_health(id) + 65);
client_printcolor(id, "/ctr[VIP] Wybrales 65 Hp")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
        }
        case 7:{
set_user_armor(id, get_user_armor(id) + 100)
client_printcolor(id, "/ctr[VIP] Wybrales 100 Pancerzu")
client_cmd(id, "spk %s", ok)
menu_destroy(menu)
return PLUGIN_HANDLED
        }
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
 
public handle_say(id) {
        new said[192]
        read_args(said,192)
        if( ( containi(said, "who") != -1 && containi(said, "/vips") != -1 ) || contain(said, "/vip") != -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 Vipy 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 vipow online")
                print_message(user, message)
        }
 
        get_cvar_string("amx_contactinfo", contact, 63)
        if(contact[0])  {
                format(contactinfo, 111, "%s Contact Server Admin -- %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()
}
stock client_printcolor(const id, const input[], any:...)
{
        new count = 1, players[32];
        static msg[191];
        vformat(msg,190,input,3);
        replace_all(msg,190,"/g","^4");// green txt
        replace_all(msg,190,"/y","^1");// orange txt
        replace_all(msg,190,"/ctr","^3");// team txt
        replace_all(msg,190,"/w","^0");// team txt
        if (id) players[0] = id; else get_players(players,count,"ch");
        for (new i = 0; i < count; i++)
                if (is_user_connected(players[i]))
                {
                        message_begin(MSG_ONE_UNRELIABLE, SayTxT, _, players[i]);
                        write_byte(players[i]);
                        write_string(msg);
                        message_end();
                }
}
public Bacon_Spawn(id) {
        if (get_user_flags(id) & ADMIN_LEVEL_H) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "smith")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "smith")
                }
                else {
                        cs_reset_user_model(id)
                }
        }
}
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 );
    }
}
 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1045 f0 fs16 n par }
*/
 

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