Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]putin ajutor pentru modificare
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
537
*XavI*
[Mentally Stable]
Status: Offline
(since 31-10-2016 17:53)
Joined: 07 Apr 2014
Posts: 291
,
Topics: 19
Location:
Romania
Reputation:
196.2
Votes
: 7
Posted: 25-05-2015, 22:43:52
| Translate post to:
... (
Click for more languages
)
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#pragma tabsize 0
#define ADMIN_ACCESS ADMIN_LEVEL_H
new const Tag[] = "[VIP]";
new const mTitle[] = "Beneficii Vip";
new max_menu[33];
new money_per_kill_hs,money_per_kill,hp_per_kill_hs,hp_per_kill,limita_menu_use;
public plugin_init()
{
register_plugin("VIP", "1.0", "D3luxe");
register_clcmd("say /vmmenu", "open_menu");
register_clcmd("say /vipmenu", "open_menu");
register_clcmd("say /vreauvip", "open_motd");
register_clcmd("say /vips", "ShowVipsOnline", ADMIN_ALL, "Show Vips Online");
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1);
RegisterHam(Ham_Killed,"player", "Kill_Bonus_VIP");
register_message( get_user_msgid( "ScoreAttrib" ), "VipStatus" );
//cvar
money_per_kill = register_cvar("vip_kill_money","500");
money_per_kill_hs = register_cvar("vip_kill_money_hs","800");
hp_per_kill = register_cvar("vip_kill_hp","15");
hp_per_kill_hs = register_cvar("vip_kill_hp_hs","30");
limita_menu_use = register_cvar("vip_menu_limita","2");
}
public Spawn_player(id)
{
if(is_user_alive(id) && is_user_vip(id))
{
set_user_health(id,150)
set_user_armor(id,100)
max_menu[id] = 0;
}
}
public open_motd(id) {
new CfgDirLoc[32], File[192];
get_configsdir(CfgDirLoc, charsmax(CfgDirLoc));
formatex(File, charsmax(File), "%s/beneficii.html", CfgDirLoc);
show_motd(id,File, mTitle);
}
public client_putinserver(id)
{
if(is_user_vip(id))
set_task(1.5,"VIP_ON");
}
public VIP_ON(id)
{
new name_vip[33];
get_user_name(id,name_vip,32);
ChatColor(0,"!g%s!yVip-ul !team%s !yse conecteaza !",Tag,name_vip)
}
bool:is_user_vip(id)
{
if(id < 0 || id > 32)
return false
if( !(get_user_flags(id) & ADMIN_ACCESS) )
return false
return true
}
public VipStatus(const MsgId, const MsgType, const MsgDest)
{
static id;
id = get_msg_arg_int(1);
if(is_user_vip(id) && !get_msg_arg_int(2))
set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
}
public ShowVipsOnline(id)
{
new message[256], name[32], count = 0;
new len = format(message, charsmax(message), "Vip-uri online: ");
for (new player = 1; player <= get_maxplayers(); player++)
{
if (is_user_connected(player) && is_user_vip(player))
{
get_user_name(player, name, charsmax(name));
if (count && len)
{
len += format(message[len], 255 - len, ", ");
}
len += format(message[len], 255 - len, "%s", name);
if (len > 96) {
client_print(id, print_chat, "%s", message);
len = format(message, charsmax(message), "");
}
count++;
}
}
if (len)
{
if (!count)
{
len += format(message[len], 255 - len, "Nu este nici un vip online.");
}
client_print(id, print_chat, "%s", message);
}
return PLUGIN_HANDLED;
}
public Kill_Bonus_VIP(victim, attacker, shouldgib)
{
if (!is_user_alive(attacker) || !is_user_alive(victim) || get_user_team(attacker) == get_user_team(victim))
return PLUGIN_HANDLED;
if(is_user_vip(attacker) && is_user_connected(attacker))
{
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(money_per_kill_hs));
set_user_health(attacker,get_user_health(attacker) + get_pcvar_num(hp_per_kill_hs));
}else{
cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(money_per_kill));
set_user_health(attacker,get_user_health(attacker) + get_pcvar_num(hp_per_kill));
}
}
return PLUGIN_HANDLED;
}
public open_menu(id)
{
if(!is_user_vip(id))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece nu esti VIP!")
return PLUGIN_HANDLED
}
if(!is_user_alive(id))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece esti mort !")
return PLUGIN_HANDLED
}
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use))
return PLUGIN_HANDLED
}
new menu = menu_create( "Meniu de arme :", "vip_handler" );
switch(get_user_team(id))
{
case 1 : menu_additem(menu, "/yAk47 /r+ /yDeagle /r+ /ySet Grenazi", "1", 0);
case 2 : menu_additem(menu, "/yM4a1 /r+ /yDeagle /r+ /ySet Grenazi", "1", 0);
}
menu_additem(menu, "/rAwP /w+ /rDeagle /w+ /rSet Grenazi", "2", 0);
menu_setprop( menu, MPROP_EXITNAME, "Exit")
menu_display( id, menu, 0);
return PLUGIN_CONTINUE;
}
public vip_handler(id, menu, item, client)
{
if(item == MENU_EXIT || !is_user_alive(id))
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
static data[6], name[64], acs, cllbck, key
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck)
key = str_to_num(data)
switch(key)
{
case 1:
{
if(is_user_alive(id))
{
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use));
return PLUGIN_HANDLED;
}
switch(get_user_team(id))
{
case 1:{
give_item(id,"weapon_ak47");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_AK47,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id] += 1;
}
case 2:{
give_item(id,"weapon_m4a1");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_M4A1,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id] += 1;
}
}
}else{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL VIP !ydeoarece esti MORT!");
return PLUGIN_HANDLED;
}
}
case 2:
{
if(is_user_alive(id))
{
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use));
return PLUGIN_HANDLED
}
give_item(id,"weapon_awp");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_AWP,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id] += 1;
}else{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL VIP !ydeoarece esti MORT!");
return PLUGIN_HANDLED;
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
//stock
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
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, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Am testat eu pluginul facut de tine destroy e bun ,
Te rog ceva poti sa ii adaugi 3 lucruri ?
Adica e foarte bine asa , dar se poate sa faci sa activezi de 4 ori meniul ? Dar doar de 4 ori .
2 ) Vreau ca primele 2 runde sa nu poata accesa nimeni meniul .
3 ) Cand scrii /vipmenu scrie aiurea ,, Se poate sa scrie doar ex " Ak47-deagle+grenazi "
Ca acum le scrie r+ak49+w/ etc ...
Si inca o problema se poate ca pe mapele de 35hp sa interizc meniul de arme ?
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 25-05-2015, 22:58:12
| Translate post to:
... (
Click for more languages
)
Pune-l primul in lista si ai cvar pt utilizare adica la limita menu us pune 4 in loc de 2.si vezi am modificat din greseala /vmmenu in loc de /vmenu.Pt runda ti-l fac maine acm sunt pe tel.
Greseala mea in loc de \ pt a colorado in meniu am pus/...Modific maine, si o sa pun si pt mape,
Ps:Pun si o limita la
HP
primit pe kill?
Retired from Amxmodx
0
0
Back to top
*XavI*
[Mentally Stable]
Status: Offline
(since 31-10-2016 17:53)
Joined: 07 Apr 2014
Posts: 291
,
Topics: 19
Location:
Romania
Reputation:
196.2
Votes
: 7
Posted: 25-05-2015, 23:19:22
| Translate post to:
... (
Click for more languages
)
Deci am setat eu acolo maxim sa fie accesat de 4 ori dar nu merge sa fie doar de 4 ori ,,,poti sa il iei de cate ori vrei ..
Vreau sa fie de maxim 4 ori , dar sa nu poti sa iei in primele 2 ture , Si sa fie interzis pe taote mapele de lame .
+ cand scrii /vreauvip
Vreau mai jos dupa cele 5 informatii ,, sa se treaca id de contact , scris mai mare asa
Vreau sa trec ce e in ghilimele ,
Ex " Pentru a dona contactati id mess love_vyrus "
Astept si multumesc pentru munca depusa .
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 26-05-2015, 13:48:05
| Translate post to:
... (
Click for more languages
)
Vezi asa motd il fac putin mai incolo.
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#pragma tabsize 0
#define ADMIN_ACCESS ADMIN_LEVEL_H
new const Tag[] = "[VIP]";
new const mTitle[] = "Beneficii Vip";
new max_menu[33];
new money_per_kill_hs,money_per_kill,hp_per_kill_hs,hp_per_kill,limita_menu_use;
new round,g_prefixmap;
public plugin_init()
{
register_plugin("VIP", "1.0", "D3luxe");
register_clcmd("say /vmmenu", "open_menu");
register_clcmd("say /vipmenu", "open_menu");
register_clcmd("say /vreauvip", "open_motd");
register_clcmd("say /vips", "ShowVipsOnline", ADMIN_ALL, "Show Vips Online");
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1);
RegisterHam(Ham_Killed,"player", "Kill_Bonus_VIP");
register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w");
register_message( get_user_msgid( "ScoreAttrib" ), "VipStatus" );
//cvar
money_per_kill = register_cvar("vip_kill_money","500");
money_per_kill_hs = register_cvar("vip_kill_money_hs","800");
hp_per_kill = register_cvar("vip_kill_hp","15");
hp_per_kill_hs = register_cvar("vip_kill_hp_hs","30");
limita_menu_use = register_cvar("vip_menu_limita","4");
g_prefixmap = register_cvar("amx_restricted_pre", "ka_");
}
public Spawn_player(id)
{
new Mapa[32],mapprefix[32];
get_mapname(Mapa, charsmax(Mapa))
get_pcvar_string(g_prefixmap, mapprefix, charsmax(mapprefix))
if(is_user_alive(id) && is_user_vip(id) || !(containi(Mapa, mapprefix)))
{
set_user_health(id,150)
set_user_armor(id,100)
}
max_menu[id] = 0;
}
public open_motd(id) {
new CfgDirLoc[32], File[192];
get_configsdir(CfgDirLoc, charsmax(CfgDirLoc));
formatex(File, charsmax(File), "%s/beneficii.html", CfgDirLoc);
show_motd(id,File, mTitle);
}
public client_putinserver(id)
{
if(is_user_vip(id))
set_task(1.5,"VIP_ON");
}
public VIP_ON(id)
{
new name_vip[33];
get_user_name(id,name_vip,32);
ChatColor(0,"!g%s!yVip-ul !team%s !yse conecteaza !",Tag,name_vip)
}
bool:is_user_vip(id)
{
if(id < 0 || id > 32)
return false
if( !(get_user_flags(id) & ADMIN_ACCESS) )
return false
return true
}
public VipStatus(const MsgId, const MsgType, const MsgDest)
{
static id;
id = get_msg_arg_int(1);
if(is_user_vip(id) && !get_msg_arg_int(2))
set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
}
public ShowVipsOnline(id)
{
new message[256], name[32], count = 0;
new len = format(message, charsmax(message), "Vip-uri online: ");
for (new player = 1; player <= get_maxplayers(); player++)
{
if (is_user_connected(player) && is_user_vip(player))
{
get_user_name(player, name, charsmax(name));
if (count && len)
{
len += format(message[len], 255 - len, ", ");
}
len += format(message[len], 255 - len, "%s", name);
if (len > 96) {
client_print(id, print_chat, "%s", message);
len = format(message, charsmax(message), "");
}
count++;
}
}
if (len)
{
if (!count)
{
len += format(message[len], 255 - len, "Nu este nici un vip online.");
}
client_print(id, print_chat, "%s", message);
}
return PLUGIN_HANDLED;
}
public Kill_Bonus_VIP(victim, attacker, shouldgib)
{
if (!is_user_alive(attacker) || !is_user_alive(victim) || get_user_team(attacker) == get_user_team(victim))
return PLUGIN_HANDLED;
if(is_user_vip(attacker) && is_user_connected(attacker))
{
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(money_per_kill_hs));
set_user_health(attacker,get_user_health(attacker) + get_pcvar_num(hp_per_kill_hs));
}else{
cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(money_per_kill));
set_user_health(attacker,get_user_health(attacker) + get_pcvar_num(hp_per_kill));
}
}
return PLUGIN_HANDLED;
}
public event_new_round()
{
round++
return PLUGIN_HANDLED
}
public Event_RoundRestart(id)
{
round=0;
}
public open_menu(id)
{
new Mapa[32],mapprefix[32];
get_mapname(Mapa, charsmax(Mapa))
get_pcvar_string(g_prefixmap, mapprefix, charsmax(mapprefix))
if(containi(Mapa, mapprefix)){
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece acum esti pe o mapa de knife !")
return PLUGIN_HANDLED
}
if(!is_user_vip(id))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece nu esti VIP!")
return PLUGIN_HANDLED
}
if(!is_user_alive(id))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece esti mort !")
return PLUGIN_HANDLED
}
if(round <= 2)
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gin primele 2 runde !")
return PLUGIN_HANDLED
}
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use))
return PLUGIN_HANDLED
}
new menu = menu_create( "Meniu de arme :", "vip_handler" );
switch(get_user_team(id))
{
case 1 : menu_additem(menu, "\yAk47 \r+ \yDeagle \r+ \ySet Grenazi", "1", 0);
case 2 : menu_additem(menu, "\yM4a1 \r+ \yDeagle \r+ \ySet Grenazi", "1", 0);
}
menu_additem(menu, "\rAwP \w+ \rDeagle \w+ \rSet Grenazi", "2", 0);
menu_setprop( menu, MPROP_EXITNAME, "Exit")
menu_display( id, menu, 0);
return PLUGIN_CONTINUE;
}
public vip_handler(id, menu, item, client)
{
if(item == MENU_EXIT || !is_user_alive(id))
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
static data[6], name[64], acs, cllbck, key
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck)
key = str_to_num(data)
switch(key)
{
case 1:
{
if(is_user_alive(id))
{
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use));
return PLUGIN_HANDLED;
}
switch(get_user_team(id))
{
case 1:{
give_item(id,"weapon_ak47");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_AK47,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id]++;
}
case 2:{
give_item(id,"weapon_m4a1");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_M4A1,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id]++;
}
}
}else{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL VIP !ydeoarece esti MORT!");
return PLUGIN_HANDLED;
}
}
case 2:
{
if(is_user_alive(id))
{
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use));
return PLUGIN_HANDLED
}
give_item(id,"weapon_awp");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_AWP,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id]++;
}else{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL VIP !ydeoarece esti MORT!");
return PLUGIN_HANDLED;
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
//stock
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
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, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
motd
Spoiler:
<html>
<style type="text/css">
body
{
background-color: #000000;
font-family:Tahoma;font-size:15px;color:#e5dd14;padding-left:5em;
}
</style>
<body>
<center>
<font face="Algerian" size="2">
<b><br><br>
<font size="5" color="#F08080">BENEFICII VIP</font>
<br><br><br></font></center>
<br>
<font color="red">1</font>. <font color="cyan">Primesti slot pe svr.</font><br>
<font color="red">2</font>. <font color="cyan">Ceilalti useri sunt anuntati cand te conectezi pe svr.</font><br>
<font color="red">3</font>. <font color="cyan">Primesti 150
HP
100 armura la fiecare respawn.</font><br>
<font color="red">4</font>. <font color="cyan">Primesti in tab VIP.</font><br>
<font color="red">5</font>. <font color="cyan">Pe fiecare kill normal primesti +15
HP
si +$500 iar pe kill cu hs +30hp si +$800.</font><br>
<font color="red">5</font>. <font color="cyan">Ai acces la meniul de arme VIP cu /vmenu sau /vipmenu.</font><br><br>
<font size="4" color="green">Pentru a primii VIP contacteaza ownerul la <font color="yellow">love_vyrus Y!M.</font></font><br>
</body></html>
Imi spui daca e ok asa modifica si tu Y!M sau skp ce e acolo nu prea am timp acm ,bafta.
Retired from Amxmodx
0
0
Back to top
*XavI*
[Mentally Stable]
Status: Offline
(since 31-10-2016 17:53)
Joined: 07 Apr 2014
Posts: 291
,
Topics: 19
Location:
Romania
Reputation:
196.2
Votes
: 7
Posted: 30-05-2015, 15:25:22
| Translate post to:
... (
Click for more languages
)
Nu am apucat sa testez inca , ce ai postat aici ,
Poti face sa nu poti accesa meniul prima tura si interdictie la menu items pe mapele cu lame si heuri ?
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 01-06-2015, 10:19:57
| Translate post to:
... (
Click for more languages
)
Am facut ,testeaza.(cu he-uri inca nu revin imd.)
EDIT :Pentru mape de he /knife
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#pragma tabsize 0
#define ADMIN_ACCESS ADMIN_LEVEL_H
new const Tag[] = "[VIP]";
new const mTitle[] = "Beneficii Vip";
new max_menu[33];
new money_per_kill_hs,money_per_kill,hp_per_kill_hs,hp_per_kill,limita_menu_use;
new round,g_prefixmap,g_prefixmaphe;
public plugin_init()
{
register_plugin("VIP", "1.0", "D3luxe");
register_clcmd("say /vmmenu", "open_menu");
register_clcmd("say /vipmenu", "open_menu");
register_clcmd("say /vreauvip", "open_motd");
register_clcmd("say /vips", "ShowVipsOnline", ADMIN_ALL, "Show Vips Online");
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1);
RegisterHam(Ham_Killed,"player", "Kill_Bonus_VIP");
register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w");
register_message( get_user_msgid( "ScoreAttrib" ), "VipStatus" );
//cvar
money_per_kill = register_cvar("vip_kill_money","500");
money_per_kill_hs = register_cvar("vip_kill_money_hs","800");
hp_per_kill = register_cvar("vip_kill_hp","15");
hp_per_kill_hs = register_cvar("vip_kill_hp_hs","30");
limita_menu_use = register_cvar("vip_menu_limita","4");
g_prefixmap = register_cvar("amx_restricted_pre", "ka_");
g_prefixmaphe = register_cvar("amx_restricted_prehe", "he_");
}
public Spawn_player(id)
{
new Mapa[32],mapprefix[32],mapprefix2[32];
get_mapname(Mapa, charsmax(Mapa));
get_pcvar_string(g_prefixmap, mapprefix, charsmax(mapprefix));
get_pcvar_string(g_prefixmaphe, mapprefix2, charsmax(mapprefix2));
if(is_user_alive(id) && is_user_vip(id) || !(containi(Mapa, mapprefix)) || !(containi(Mapa, mapprefix2)))
{
set_user_health(id,150)
set_user_armor(id,100)
}
max_menu[id] = 0;
}
public open_motd(id) {
new CfgDirLoc[32], File[192];
get_configsdir(CfgDirLoc, charsmax(CfgDirLoc));
formatex(File, charsmax(File), "%s/beneficii.html", CfgDirLoc);
show_motd(id,File, mTitle);
}
public client_putinserver(id)
{
if(is_user_vip(id))
set_task(1.5,"VIP_ON");
}
public VIP_ON(id)
{
new name_vip[33];
get_user_name(id,name_vip,32);
ChatColor(0,"!g%s!yVip-ul !team%s !yse conecteaza !",Tag,name_vip)
}
bool:is_user_vip(id)
{
if(id < 0 || id > 32)
return false
if( !(get_user_flags(id) & ADMIN_ACCESS) )
return false
return true
}
public VipStatus(const MsgId, const MsgType, const MsgDest)
{
static id;
id = get_msg_arg_int(1);
if(is_user_vip(id) && !get_msg_arg_int(2))
set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
}
public ShowVipsOnline(id)
{
new message[256], name[32], count = 0;
new len = format(message, charsmax(message), "Vip-uri online: ");
for (new player = 1; player <= get_maxplayers(); player++)
{
if (is_user_connected(player) && is_user_vip(player))
{
get_user_name(player, name, charsmax(name));
if (count && len)
{
len += format(message[len], 255 - len, ", ");
}
len += format(message[len], 255 - len, "%s", name);
if (len > 96) {
client_print(id, print_chat, "%s", message);
len = format(message, charsmax(message), "");
}
count++;
}
}
if (len)
{
if (!count)
{
len += format(message[len], 255 - len, "Nu este nici un vip online.");
}
client_print(id, print_chat, "%s", message);
}
return PLUGIN_HANDLED;
}
public Kill_Bonus_VIP(victim, attacker, shouldgib)
{
if (!is_user_alive(attacker) || !is_user_alive(victim) || get_user_team(attacker) == get_user_team(victim))
return PLUGIN_HANDLED;
if(is_user_vip(attacker) && is_user_connected(attacker))
{
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(money_per_kill_hs));
set_user_health(attacker,get_user_health(attacker) + get_pcvar_num(hp_per_kill_hs));
}else{
cs_set_user_money(attacker,cs_get_user_money(attacker) + get_pcvar_num(money_per_kill));
set_user_health(attacker,get_user_health(attacker) + get_pcvar_num(hp_per_kill));
}
}
return PLUGIN_HANDLED;
}
public event_new_round()
{
round++
return PLUGIN_HANDLED
}
public Event_RoundRestart(id)
{
round=0;
}
public open_menu(id)
{
new Mapa[32],mapprefix[32],mapprefix2[32];
get_mapname(Mapa, charsmax(Mapa));
get_pcvar_string(g_prefixmap, mapprefix, charsmax(mapprefix));
get_pcvar_string(g_prefixmaphe, mapprefix2, charsmax(mapprefix2));
if(containi(Mapa, mapprefix) || containi(Mapa, mapprefix2)){
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece acum esti pe o mapa de knife sau he !")
return PLUGIN_HANDLED
}
if(!is_user_vip(id))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece nu esti VIP!")
return PLUGIN_HANDLED
}
if(!is_user_alive(id))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL!y deoarece esti mort !")
return PLUGIN_HANDLED
}
if(round <= 2)
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gin primele 2 runde !")
return PLUGIN_HANDLED
}
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use))
return PLUGIN_HANDLED
}
new menu = menu_create( "Meniu de arme :", "vip_handler" );
switch(get_user_team(id))
{
case 1 : menu_additem(menu, "\yAk47 \r+ \yDeagle \r+ \ySet Grenazi", "1", 0);
case 2 : menu_additem(menu, "\yM4a1 \r+ \yDeagle \r+ \ySet Grenazi", "1", 0);
}
menu_additem(menu, "\rAwP \w+ \rDeagle \w+ \rSet Grenazi", "2", 0);
menu_setprop( menu, MPROP_EXITNAME, "Exit")
menu_display( id, menu, 0);
return PLUGIN_CONTINUE;
}
public vip_handler(id, menu, item, client)
{
if(item == MENU_EXIT || !is_user_alive(id))
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
static data[6], name[64], acs, cllbck, key
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck)
key = str_to_num(data)
switch(key)
{
case 1:
{
if(is_user_alive(id))
{
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use));
return PLUGIN_HANDLED;
}
switch(get_user_team(id))
{
case 1:{
give_item(id,"weapon_ak47");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_AK47,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id]++;
}
case 2:{
give_item(id,"weapon_m4a1");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_M4A1,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id]++;
}
}
}else{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL VIP !ydeoarece esti MORT!");
return PLUGIN_HANDLED;
}
}
case 2:
{
if(is_user_alive(id))
{
if(max_menu[id] >= get_pcvar_num(limita_menu_use))
{
ChatColor(id, "!g[VIP] !yNu poti accesa !teammeniul VIP !gmai mult !yde %d ori pe runda !",get_pcvar_num(limita_menu_use));
return PLUGIN_HANDLED
}
give_item(id,"weapon_awp");
give_item(id,"weapon_deagle");
cs_set_user_bpammo(id,CSW_DEAGLE,150);
cs_set_user_bpammo(id,CSW_AWP,150);
give_item(id,"weapon_hegrenade");
give_item(id,"weapon_flashgrenade");
give_item(id,"weapon_smokegrenade");
max_menu[id]++;
}else{
ChatColor(id, "!g[VIP] !yNu poti accesa !teamMENIUL VIP !ydeoarece esti MORT!");
return PLUGIN_HANDLED;
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
//stock
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
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, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Retired from Amxmodx
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
destroi112
, 07 August 2015 20:53
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 11-02-2025, 15:04:03
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details