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
 

Zdjęcie

Deathrun Vip


  • Zamknięty Temat jest zamknięty
12 odpowiedzi w tym temacie

#1 kissio1990

    Pomocny

  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:49
  • Imię:Krzysiek
  • Lokalizacja:Elbląg
Offline

Napisano 18.04.2011 11:23

Witam ;)
Chciałbym żeby ktoś zrobił mi plugin ;)
Chodzi o V.I.P na DR.
Chciałbym żeby V.I.P dawał takie możliwości jak:

1.Gravity.
2.Speed.
3.Usp z 5 nabojami. (Dla Terrorists)
4.Granat zamrażający
5.Noktowizor

Ponad to chciałbym żeby po wpisaniu komendy /vip wyświetlało się co ten V.I.P daje oraz po wciśnięciu TAB przy nicku było napisane V.I.P ;)
Aha i żeby był pod flagę T
Z góry dzięki i Pozdrawiam ;)

Użytkownik kissio1990 edytował ten post 18.04.2011 11:26

  • +
  • -
  • 0

F4natic.eu Zapraszam !! ;D

Dołączona grafika


U NAS ZAWSZE NAJLEPSZY ROOUNDSOUND

Robię Rs'y na zamówienie!! Zainteresowany ? Pisz GG: 346303


#2 Milek

    Powracam..

  • Power User

Reputacja: 97
Zaawansowany

  • Postów:528
  • GG:
  • Steam:steam
  • Lokalizacja:Anglia
Offline

Napisano 18.04.2011 11:41

http://amxx.pl/topic...8-deathrun-vip/

Uzyj tego, jest bardzo podobny :)
  • +
  • -
  • 0

#3 kissio1990

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:49
  • Imię:Krzysiek
  • Lokalizacja:Elbląg
Offline

Napisano 18.04.2011 13:39

Właśnie podobny... a ja potrzebuje dokładnie takiego jak napisałem wyżej...
po 1 nie potrzebuje dodawania hp czy armora bo to tak trochę bez sensu jak ktoś da free jest runda na kosy a on sobie dodaje hp...
po 2 nie potrzebuje deagla tylko usp ponieważ z deagla możesz bić przez ściany i to tez jest trochę bez sensu jak zabijasz przez ściany ;)
po 3 jest pod flagę A a ja potrzebuje pod flagę T
po 4 nie ma komendy /vip
po 5 kolo nicku nie ma napisane V.I.P ;)

Dodano 19 kwiecień 2011 - 21:41:
Znajdzie się ktoś kto to zrobi ?
To dla mnie bardzo ważne... ;/
  • +
  • -
  • 0

F4natic.eu Zapraszam !! ;D

Dołączona grafika


U NAS ZAWSZE NAJLEPSZY ROOUNDSOUND

Robię Rs'y na zamówienie!! Zainteresowany ? Pisz GG: 346303


#4 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 20.04.2011 06:45

Zrobione
cvary :
dr_vip_gravity 500 - określa gravite
dr_vip_speed 500 - określa speeda
Kod :
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <engine>


#define PLUGIN "Deathrun vip"
#define VERSION "1.0"
#define AUTHOR "michal"

new cvar_speed
new cvar_gravity

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam(Ham_Spawn, "player", "menu", 1);
cvar_gravity = register_cvar("dr_vip_gravity", "500")
cvar_speed = register_cvar("dr_vip_speed", "500")
}
public menu1(id)
{
if (get_user_flags(id) & ADMIN_LEVEL_H) 
{
menu(id)
}
}
public menu(id)
{
    new menu = menu_create("\rVip menu", "wybieranie")

    menu_additem(menu, "\wGrawitacja", "1", 0)
    menu_additem(menu, "\wPredkosc", "2", 0)
    menu_additem(menu, "\wUsp (z 5 nabojami tylko dla terro)", "3", 0) 
    menu_additem(menu, "\wGranat Zamrazajacy", "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:{
new Float: gravity
gravity	= get_pcvar_float(cvar_gravity) / 800
set_user_gravity(id, gravity)
menu_destroy(menu)
return PLUGIN_HANDLED
}
        
case 2:{
new Float: speed
speed	= get_pcvar_float(cvar_speed)
set_user_maxspeed(id, speed)
menu_destroy(menu)
return PLUGIN_HANDLED
}
        
case 3:{
if(cs_get_user_team(id) == CS_TEAM_T)
{
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);
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}	
case 4:{
give_item(id, "weapon_smokegrenade")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        case 5:{
            give_item(id, "item_nvgs") 
            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()
}

Użytkownik speedkill123 edytował ten post 20.04.2011 06:46

  • +
  • -
  • 0

If you can dream it, you can do it.


#5 kissio1990

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:49
  • Imię:Krzysiek
  • Lokalizacja:Elbląg
Offline

Napisano 20.04.2011 09:01

Wszystko ładnie plugin działa ale.. jest trochę niedociągnięć ;P
po 1 vipa ma każdy... a miało być pod flagę T ;)
po 2 nie ma granatu zamrażającego tylko smoke ;)
po 3 fajnie by było żeby się pokazywało jaki vip co wybrał ;) (tego zapomniałem dodać wyżej ;P )
po 4 noktowizor nie działa ;)

Jak mi to ktoś poprawi to normalnie będę sikał z radości ;)
  • +
  • -
  • 0

F4natic.eu Zapraszam !! ;D

Dołączona grafika


U NAS ZAWSZE NAJLEPSZY ROOUNDSOUND

Robię Rs'y na zamówienie!! Zainteresowany ? Pisz GG: 346303


#6 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 20.04.2011 15:56

Chyba naprawiony ! ale zamrazajacego granatu nie umiałem zrobić opis dodałem wszystko powinno działac :)
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <engine>


#define PLUGIN "Deathrun vip"
#define VERSION "1.0"
#define AUTHOR "michal"

new cvar_speed
new cvar_gravity
new SayTxT

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
SayTxT = get_user_msgid("SayText");
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam(Ham_Spawn, "player", "abc", 1);
cvar_gravity = register_cvar("dr_vip_gravity", "500")
cvar_speed = register_cvar("dr_vip_speed", "500")
}
public abc(id){
if (get_user_flags(id) & ADMIN_LEVEL_H) 
{
menu(id)
}
}
public menu(id)
{
    new menu = menu_create("\rVip menu", "wybieranie")

    menu_additem(menu, "\wGrawitacja", "1", 0)
    menu_additem(menu, "\wPredkosc", "2", 0)
    menu_additem(menu, "\wUsp (z 5 nabojami tylko dla terro)", "3", 0) 
    menu_additem(menu, "\wGranat Zamrazajacy", "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:{
new Float: gravity
gravity	= get_pcvar_float(cvar_gravity) / 800
set_user_gravity(id, gravity)
client_printcolor(id, "/g Wybrales grawitacje")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        
case 2:{
new Float: speed
speed	= get_pcvar_float(cvar_speed)
set_user_maxspeed(id, speed)
client_printcolor(id, "/g Wybrales predkosc")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        
case 3:{
if(cs_get_user_team(id) == CS_TEAM_T)
{
client_printcolor(id, "/g 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);
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}	
case 4:{
give_item(id, "weapon_smokegrenade")
client_printcolor(id, "/g Wybrales Smoka")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        case 5:{
cs_set_user_nvg(id) 
client_printcolor(id, "/g Wybrales Noktowizor")
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();
		}
}

  • +
  • -
  • 1

If you can dream it, you can do it.


#7 ;((

    Super Hero

  • Użytkownik

Reputacja: 347
Wszechpomocny

  • Postów:1 157
  • Lokalizacja:Aha
Offline

Napisano 20.04.2011 16:03

granat zamrazajacy to musisz wgrac inny plugin.. Freeze Traps
  • +
  • -
  • 0

#8 kissio1990

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:49
  • Imię:Krzysiek
  • Lokalizacja:Elbląg
Offline

Napisano 20.04.2011 16:23

Ok dzięki MISTRZU ;)
działa ;)
  • +
  • -
  • 0

F4natic.eu Zapraszam !! ;D

Dołączona grafika


U NAS ZAWSZE NAJLEPSZY ROOUNDSOUND

Robię Rs'y na zamówienie!! Zainteresowany ? Pisz GG: 346303


#9 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 20.04.2011 16:29

Teraz juz działa na flage "t" ?
działa noktowizor ?
  • +
  • -
  • 0

If you can dream it, you can do it.


#10 kissio1990

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:49
  • Imię:Krzysiek
  • Lokalizacja:Elbląg
Offline

Napisano 20.04.2011 17:02

tak jest pod t i działa noktowizor ;)

Tylko jeszcze jedna sprawa jest ;P
bo zamiast vip menu jest napisane rvip menu ;P
i przy wszystkim do wybrania jest w tzn np. wgrawitacja czy wszybkosc
niżej podałem link na którym to widać ;)

ImageShack� - Online Photo and Video Hosting

Użytkownik kissio1990 edytował ten post 20.04.2011 17:02

  • +
  • -
  • 0

F4natic.eu Zapraszam !! ;D

Dołączona grafika


U NAS ZAWSZE NAJLEPSZY ROOUNDSOUND

Robię Rs'y na zamówienie!! Zainteresowany ? Pisz GG: 346303


#11 skipper

    Nowy

  • Użytkownik

Reputacja: 5
Nowy

  • Postów:8
  • Imię:Jakub
  • Lokalizacja:Warszawa
Offline

Napisano 20.04.2011 17:22


/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <engine>


#define PLUGIN "Deathrun vip"
#define VERSION "1.0"
#define AUTHOR "michal"

new cvar_speed
new cvar_gravity
new SayTxT

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
SayTxT = get_user_msgid("SayText");
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam(Ham_Spawn, "player", "abc", 1);
cvar_gravity = register_cvar("dr_vip_gravity", "500")
cvar_speed = register_cvar("dr_vip_speed", "500")
}
public abc(id){
if (get_user_flags(id) & ADMIN_LEVEL_H)
{
menu(id)
}
}
public menu(id)
{
new menu = menu_create("\rVip menu", "wybieranie")

menu_additem(menu, "Grawitacja", "1", 0)
menu_additem(menu, "Predkosc", "2", 0)
menu_additem(menu, "Usp (z 5 nabojami tylko dla terro)", "3", 0)
menu_additem(menu, "Granat Zamrazajacy", "4", 0)
menu_additem(menu, "Noktowizor", "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:{
new Float: gravity
gravity = get_pcvar_float(cvar_gravity) / 800
set_user_gravity(id, gravity)
client_printcolor(id, "/g Wybrales grawitacje")
menu_destroy(menu)
return PLUGIN_HANDLED
}

case 2:{
new Float: speed
speed = get_pcvar_float(cvar_speed)
set_user_maxspeed(id, speed)
client_printcolor(id, "/g Wybrales predkosc")
menu_destroy(menu)
return PLUGIN_HANDLED
}

case 3:{
if(cs_get_user_team(id) == CS_TEAM_T)
{
client_printcolor(id, "/g 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);
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 4:{
give_item(id, "weapon_smokegrenade")
client_printcolor(id, "/g Wybrales Smoka")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 5:{
cs_set_user_nvg(id)
client_printcolor(id, "/g Wybrales Noktowizor")
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();
}
}



Mógłbyś chociaż dać reputa speedkillowi za to menu
  • +
  • -
  • 1

#12 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 20.04.2011 17:39

Napis vip menu na czerwono napisy czyli grawitacja na biało :)
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <engine>


#define PLUGIN "Deathrun vip"
#define VERSION "1.0"
#define AUTHOR "michal"

new cvar_speed
new cvar_gravity
new SayTxT

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
SayTxT = get_user_msgid("SayText");
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
RegisterHam(Ham_Spawn, "player", "abc", 1);
cvar_gravity = register_cvar("dr_vip_gravity", "500")
cvar_speed = register_cvar("dr_vip_speed", "500")
}
public abc(id){
if (get_user_flags(id) & ADMIN_LEVEL_H) 
{
menu(id)
}
}
public menu(id)
{
    new menu = menu_create("\rVip menu", "wybieranie")

    menu_additem(menu, "/w Grawitacja", "1", 0)
    menu_additem(menu, "/w Predkosc", "2", 0)
    menu_additem(menu, "/w Usp (z 5 nabojami tylko dla terro)", "3", 0) 
    menu_additem(menu, "/w Granat Zamrazajacy", "4", 0)
    menu_additem(menu, "/w Noktowizor", "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:{
new Float: gravity
gravity = get_pcvar_float(cvar_gravity) / 800
set_user_gravity(id, gravity)
client_printcolor(id, "/g Wybrales grawitacje")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        
case 2:{
new Float: speed
speed   = get_pcvar_float(cvar_speed)
set_user_maxspeed(id, speed)
client_printcolor(id, "/g Wybrales predkosc")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        
case 3:{
if(cs_get_user_team(id) == CS_TEAM_T)
{
client_printcolor(id, "/g 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);
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}       
case 4:{
give_item(id, "weapon_smokegrenade")
client_printcolor(id, "/g Wybrales Smoka")
menu_destroy(menu)
return PLUGIN_HANDLED
}
        case 5:{
cs_set_user_nvg(id) 
client_printcolor(id, "/g Wybrales Noktowizor")
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();
                }
}

  • +
  • -
  • 1

If you can dream it, you can do it.


#13 kissio1990

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:49
  • Imię:Krzysiek
  • Lokalizacja:Elbląg
Offline

Napisano 21.04.2011 07:45

OK już ładnie ;)
Dziękuje ;)
  • +
  • -
  • 0

F4natic.eu Zapraszam !! ;D

Dołączona grafika


U NAS ZAWSZE NAJLEPSZY ROOUNDSOUND

Robię Rs'y na zamówienie!! Zainteresowany ? Pisz GG: 346303





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

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