It is currently 19 Sep 2018 12:00



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 Vrei un plugin VIP? Aici îl găsești 
Author Message
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2848
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
@ChristianEvo
| Afiseaza codul
#define VIP_FLAG	"t"	// FLAGUL VIPULUI (vezi mai sus lista flagurilor)
#define ORA_INCEPUT 22 // INTERVALUL ORAR (INCEPUT)
#define ORA_SFARSIT 10 // INTERVALUL ORAR (SFARSIT)


@Jucks: Am dat edit la post: cereri-pluginuri/vrei-plugin-vip-aici-t357061-12.html#p2725635

_________________
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage

Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
Creez pluginuri contra cost


05 Sep 2018 20:54
Profile multumesc YIM WWW
Online
Membru, skill +3
Membru, skill +3
User avatar

Joined: 20 May 2016 16:28
Posts: 1462
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: GO.TRIED.RO
Fond eXtream: 0
YONTU wrote:
@ChristianEvo
| Afiseaza codul
#define VIP_FLAG	"t"	// FLAGUL VIPULUI (vezi mai sus lista flagurilor)
#define ORA_INCEPUT 22 // INTERVALUL ORAR (INCEPUT)
#define ORA_SFARSIT 10 // INTERVALUL ORAR (SFARSIT)


@Jucks: Am dat edit la post: cereri-pluginuri/vrei-plugin-vip-aici-t357061-12.html#p2725635

Tot așa apare albastrul ăla care acoperă ecranul, eu voiam ca în video care ți am dat mai sus sa nu fie deranjat și sa.fie ca acolo ca pe mulți îi deranjează când fac kill
+ Îți dă Deagle din prima , eu vreau când ia din meniu , a 3 a runda sa rămâna pistolul respectiv pe care îl avea și când ia armele din meniul vip sa il arunce și sa îi dea deagle

_________________
Detinator : # Go.Tried.Ro #


05 Sep 2018 22:14
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 13 Jul 2015 14:57
Posts: 206
Detinator Steam: Da
CS Status: BB Force
Detinator server CS: BB.InDungi.Ro
SteamID: ChristianEvo
Fond eXtream: 0
Imi poti adauga Defuse Kit la CT ? (am uitat sa mentionez in prima cerere..)

| Afiseaza codul
/*
CREDITE:
ConnorMcLeod - pentru bullet damage
twistedeuphoria - pentru multi jump
cheap_suit - cateva bucati de cod extrase din biohazard
*/


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

// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[CSGO.RANGFORT.RO]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "evo_style@yahoo.com";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("bit"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------

#define PLUGIN_NAME "VIP System"
#define PLUGIN_NAME_PAUSED "VIP System [OPRIT]"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YONTU"

#define is_user_valid(%1) (1 <= %1 <= max_players)

enum cvars
{
hp_spawn = 0,
ap_spawn,
money_spawn,
hp_kill,
hp_hs,
ap_kill,
ap_hs,
hp_max,
money_kill,
money_hs,
show_vip_tab,
show_bullet_dmg,
multi_jump,
noflash
}

new cvar[cvars], rounds = 0;
new max_players;
new bool:g_bJump[33] = false, g_JumpNum[33] = 0;
new g_iPlayerPos[33], g_iPlayerCol[33];

// NU SCHIMBA
new const Float:g_flCoords[][] =
{
{0.50, 0.40},
{0.56, 0.44},
{0.60, 0.50},
{0.56, 0.56},
{0.50, 0.60},
{0.44, 0.56},
{0.40, 0.50},
{0.44, 0.44}
}

// NU SCHIMBA VALORILE DEJA EXISTENTE. Poti adauga mai multe culori, respectand matricea
new const g_iColors[][] =
{
{0, 127, 255}, // blue
{255, 127, 0}, // orange
{127, 0, 255}, // purple
{255, 0, 0}, // red
{255, 100, 150}, // pink
{0, 255, 0} // green
}

public plugin_init()
{
new path[64];
get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path, charsmax(path), "%s/vip_maps.ini", path);

new file = fopen(path, "r+");

if(!file_exists(path))
{
write_file(path, "; VIP-UL ESTE DEZACTIVAT PE URMATOARELE HARTI: ");
write_file(path, "; Exemplu de adaugare HARTA:^n; ^"harta^"^n^nfy_snow^ncss_bycastor");
}

new mapname[32];
get_mapname(mapname, charsmax(mapname));

new text[121], maptext[32], bool:remove_vip = false;
while(!feof(file))
{
fgets(file, text, charsmax(text));
trim(text);

if(text[0] == ';' || !strlen(text))
{
continue;
}

parse(text, maptext, charsmax(maptext));

if(equal(maptext, mapname))
{
log_amx("Am dezactivat pluginul 'VIP' pe harta %s.", maptext);
remove_vip = true;
break;
}

}
fclose(file);

if(!remove_vip)
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_event("DeathMsg", "event_DeathMsg", "a");
register_event("Damage", "event_Damage", "b", "2>0", "3=0");
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
register_event("TextMsg", "event_textmsg", "a", "2=#Game_will_restart_in")

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);

register_message(get_user_msgid("ScoreAttrib"), "msg_ScoreAttrib");
register_message(get_user_msgid("ScreenFade"), "msg_ScreenFade");

register_clcmd("say /vips", "CmdVipsOnline");
register_clcmd("say_team /vips", "CmdVipsOnline");
register_clcmd("say vips", "CmdVipsOnline");
register_clcmd("say_team vips", "CmdVipsOnline");

register_clcmd("say infovip", "CmdPrintAttributes");
register_clcmd("say_team infovip", "CmdPrintAttributes");
register_clcmd("say /infovip", "CmdPrintAttributes");
register_clcmd("say_team /infovip", "CmdPrintAttributes");

cvar[hp_spawn] = register_cvar("vip_hp_spawn", "120"); // 0 = dezactivat
cvar[ap_spawn] = register_cvar("vip_ap_spawn", "120"); // 0 = dezactivat
cvar[money_spawn] = register_cvar("vip_money_spawn", "0"); // 0 = dezactivat
cvar[show_vip_tab] = register_cvar("vip_show_tab", "1"); // 0 = dezactivat
cvar[show_bullet_dmg] = register_cvar("vip_show_bullet_dmg", "1"); // 0 = dezactivat
cvar[multi_jump] = register_cvar("vip_multijump", "1"); // 0 = dezactivat. Daca valoarea cvar-ului este 1, vei sari de 2 ori. Orice valoare pui, va fi +1 jump
cvar[hp_kill] = register_cvar("vip_hp_kill", "10"); // 0 = dezactivat
cvar[hp_hs] = register_cvar("vip_hp_hs", "15"); // 0 = dezactivat
cvar[ap_kill] = register_cvar("vip_ap_kill", "10"); // 0 = dezactivat
cvar[ap_hs] = register_cvar("vip_ap_hs", "15"); // 0 = dezactivat
cvar[hp_max] = register_cvar("vip_hp_max", "120"); // 0 = viata infinita
cvar[money_kill] = register_cvar("vip_money_kill", "150"); // 0 = dezactivat
cvar[money_hs] = register_cvar("vip_money_hs", "300"); // 0 = dezactivat
cvar[noflash] = register_cvar("vip_noflash", "1"); // 0 = dezactivat

max_players = get_maxplayers();
}
else
{
register_plugin(PLUGIN_NAME_PAUSED, PLUGIN_VERSION, PLUGIN_AUTHOR);
pause("ade");
}

register_cvar("vip_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
set_cvar_string("vip_", PLUGIN_VERSION);
}

public client_putinserver(id)
{
g_JumpNum[id] = 0;
g_bJump[id] = false;
}

public CmdVipsOnline(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

new adminnames[33][32], message[256], i, count, len;
len = format(message, charsmax(message), "!4%s!3 VIPS ONLINE: ", TAG);
for(i = 1 ; i <= max_players; i++)
{
if(is_user_connected(i) && is_user_vip(i))
get_user_name(i, adminnames[count++], charsmax(adminnames[]));
}

if(count > 0)
{
for(i = 0; i < count; i++)
{
len += format(message[len], 255 -len, "!4%s!1%s ", adminnames[i], i < (count -1) ? " | " : "");
}
ColorChat(id, message);
}
else
{
len += format(message[len], 255 -len, "!4No one !")
ColorChat(id, message);
}

return PLUGIN_CONTINUE;
}

public CmdPrintAttributes(id)
{
if(!is_user_connected(id)) return;
show_motd(id, "vip.txt", "Beneficii VIP");
}

public client_PreThink(id)
{
new cache = get_pcvar_num(cvar[multi_jump]);
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

new nbut = get_user_button(id);
new obut = get_user_oldbutton(id);

if(cache != 0)
{
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(g_JumpNum[id] < cache)
{
g_bJump[id] = true;
g_JumpNum[id]++;
return PLUGIN_CONTINUE;
}
}

if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
g_JumpNum[id] = 0;
return PLUGIN_CONTINUE;
}
}
return PLUGIN_CONTINUE;
}

public client_PostThink(id)
{
new jump_num = get_pcvar_num(cvar[multi_jump]);
if(!jump_num)
return PLUGIN_CONTINUE;

if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

if(g_bJump[id])
{
new Float:fVelocity[3];
entity_get_vector(id, EV_VEC_velocity, fVelocity);
fVelocity[2] = random_float(265.0, 285.0);
entity_set_vector(id, EV_VEC_velocity, fVelocity);

g_bJump[id] = false;
return PLUGIN_CONTINUE;
}

return PLUGIN_CONTINUE;
}

public event_DeathMsg()
{
new killer = read_data(1), hs = read_data(3);
if(is_user_alive(killer) && is_user_vip(killer))
{
if(killer == read_data(2)) return PLUGIN_HANDLED;

if(hs && !user_has_weapon(killer, CSW_HEGRENADE)) give_item(killer, "weapon_hegrenade");

new cache = hs ? get_pcvar_num(cvar[hp_hs]) : get_pcvar_num(cvar[hp_kill]);
if(cache != 0) set_user_health(killer, min(get_user_health(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[ap_hs]) : get_pcvar_num(cvar[ap_kill]);
if(cache != 0) set_user_armor(killer, min(get_user_armor(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[money_hs]) : get_pcvar_num(cvar[money_kill]);
if(cache != 0) cs_set_user_money(killer, min(cs_get_user_money(killer) + cache, 16000));
}

return PLUGIN_CONTINUE;
}

public event_Damage(victim)
{
if(!get_pcvar_num(cvar[show_bullet_dmg]))
return PLUGIN_CONTINUE;

new id = get_user_attacker(victim);
if(is_user_valid(id))
{
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_HANDLED;

if(read_data(4) || read_data(5) || read_data(6))
{
new iPos = ++g_iPlayerPos[id];
if(iPos == sizeof(g_flCoords))
iPos = g_iPlayerPos[id] = 0;

new iCol = ++g_iPlayerCol[id];
if(iCol == sizeof(g_iColors))
iCol = g_iPlayerCol[id] = 0;

set_hudmessage(g_iColors[iCol][0], g_iColors[iCol][1], g_iColors[iCol][2], Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1);
show_hudmessage(id, "%d", read_data(2));
}
}

return PLUGIN_CONTINUE;
}

public event_NewRound()
{
rounds++;
}

public event_textmsg()
{
rounds = 0;
}

public fw_PlayerSpawnPost(id)
{
if(is_user_vip(id) && is_user_alive(id))
{
set_task(0.25, "give_items", id + 212);
return HAM_IGNORED;
}

return HAM_IGNORED;
}

public give_items(taskid)
{
new id = taskid - 212;
if(!is_user_alive(id))
return;

new cache = get_pcvar_num(cvar[hp_spawn])
if(cache != 0) set_user_health(id, cache);

cache = get_pcvar_num(cvar[ap_spawn]);
if(cache != 0) cs_set_user_armor(id, cache, CS_ARMOR_VESTHELM);

cache = get_pcvar_num(cvar[money_spawn]);
if(cache != 0) cs_set_user_money(id, min(cs_get_user_money(id) + cache, 16000));

if(rounds >= 3) ShowVipMenu(id);
}

public msg_ScoreAttrib(msgid, dest, id)
{
if(!get_pcvar_num(cvar[show_vip_tab]))
return PLUGIN_CONTINUE;

new id = get_msg_arg_int(1);
if(is_user_connected(id) && is_user_vip(id))
set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? (1<<2) : (1<<0));

return PLUGIN_CONTINUE;
}

public msg_ScreenFade(msgid, dest, id)
{
if(!get_pcvar_num(cvar[noflash]))
return PLUGIN_HANDLED;

if(is_user_connected(id) && is_user_vip(id))
{
static data[4];
data[0] = get_msg_arg_int(4);
data[1] = get_msg_arg_int(5);
data[2] = get_msg_arg_int(6);
data[3] = get_msg_arg_int(7);

if(data[0] == 255 && data[1] == 255 && data[2] == 255 && data[3] > 199)
return PLUGIN_HANDLED;
}

return PLUGIN_CONTINUE;
}

public ShowVipMenu(id)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED;

if(!is_user_vip(id))
{
ColorChat(id, "!4%s!1 Imi pare rau, dar nu ai acces la meniul pentru!3 membrii VIP!1.", TAG);
ColorChat(id, "!4%s!1 Poti cumpara VIP, contactand adresa Y!M:!3 %s!1.", TAG, CONTACT);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
drop_weapons(id, 2);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);

new menu = menu_create("\r[CSGO.RANGFORT.RO] \yMeniu Arme VIP", "VipMenuHandler");
menu_additem(menu, "\yM4A1 \d+ \rEchipament", "1");
menu_additem(menu, "\yAK47 \d+ \rEchipament", "2");
menu_additem(menu, "\yAWP \d+ \rEchipament", "3");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);

return PLUGIN_CONTINUE;
}

public VipMenuHandler(id, menu, item)
{
if(!is_user_connected(id) || item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
drop_weapons(id, 1);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 120);

ColorChat(id, "!4%s!1 Ai ales!3 M4A1!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}

case 1:
{
drop_weapons(id, 1);
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 120);

ColorChat(id, "!4%s!1 Ai ales!3 AK47!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}

case 2:
{
drop_weapons(id, 1);
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 30);

ColorChat(id, "!4%s!1 Ai ales!3 AWP!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}
}

menu_destroy(menu);
return PLUGIN_HANDLED;
}

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

// Drop primary/secondary weapons
stock drop_weapons(id, dropwhat)
{
// Get user weapons
static weapons[32], num, i, weaponid, wname[32];
num = 0; // reset passed weapons count (bugfix)
get_user_weapons(id, weapons, num);

// Loop through them and drop primaries or secondaries
for (i = 0; i < num; i++)
{
// Prevent re-indexing the array
weaponid = weapons[i];

if((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
{
// Get weapon entity
get_weaponname(weaponid, wname, charsmax(wname));
engclient_cmd(id, "drop", wname);
}
}
}

stock ColorChat(id, String[], any:...)
{
static szMesage[192];
vformat(szMesage, charsmax(szMesage), String, 3);

replace_all(szMesage, charsmax(szMesage), "!1", "^1");
replace_all(szMesage, charsmax(szMesage), "!3", "^3");
replace_all(szMesage, charsmax(szMesage), "!4", "^4");

static g_msg_SayText = 0;
if(!g_msg_SayText)
g_msg_SayText = get_user_msgid("SayText");

new Players[32], iNum = 1, i;

if(id) Players[0] = id;
else get_players(Players, iNum, "ch");

for(--iNum; iNum >= 0; iNum--)
{
i = Players[iNum];

message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
write_byte(i);
write_string(szMesage);
message_end();
}
}


06 Sep 2018 17:42
Profile multumesc YIM WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 05 Jun 2016 23:04
Posts: 909
Detinator Steam: Da
Detinator server CS: GO/CSGO.WARED.RO
SteamID: DevilBoy_eXe
Reputatie: Moderator ajutator
Fond eXtream: 0
Nick : DevilBoy.eXe
Server Name : CSGO / GO.WARED.RO
Mod Server : CSGO MOD / CSGO REMAKE
Flag : bit
Beneficii VIP :

-HP : 15 la frag normal ,30 la hs + un he free ( sa nu poate detine mai mult de 1he odata ) (vreau sa aiba cvar)
-AP : 15 la frag normal ,30 la hs (vreau sa aiba cvar)
-150 $ bonus la frag normal ,maxim 16000 $ (vreau sa aiba cvar)
-300 $ bonus la hs (vreau sa aiba cvar)
-Sa nu ia fall dmg vip-ul
-Doble Jump doar pentru membrii VIP
-Sa nu creasca / depaseasca viata mai mult de 150
-Sa poata sa foloseasca admin chat
-ViP-ul sa fie imun la flash-uri (vreau sa aiba cvar)
//
-Menu VIP
Meniu Principal:
1.Arme Golden:
1.M4A1 ,Deagle si set grenade (dmg multiplu (setat prin cvar) + skin pe arma primara si cea secundara)
2.AK47 ,deagle si set grenade (dmg multiplu (setat prin cvar) + skin pe arma primara si cea secundara)
3.AWP ,deagle si set grenade (dmg multiplu (setat prin cvar) + skin pe arma primara si cea secundara)
2.Arme Normale:
1.M4A1 ,Deagle si set grenade (skin pe arma primara si cea secundara diferit fata de cele golden)
2.AK47 ,deagle si set grenade (skin pe arma primara si cea secundara diferit fata de cele golden)
3.AWP ,deagle si set grenade (skin pe arma primara si cea secundara diferit fata de cele golden)
3.Cash Increase:
1. +100$
2. +500$
3. +1000$
4. Super Saiyan (se poate folosi doar odata pe mapa si va face urmatoarele(on/off prin cvar)):
-Dropeaza armele tuturor playerilor (sau le da strip si dupa le seteza knife cum vrei tu)
-Toti playeri vor primi flash (culoare galbena daca se poate)
-Se va afisa mesaj in chat:
VIP-ul x a devenit un Super Saiyan!
-VIP-ul care a activat puterea va primi:
- Gravitatie mica
- Viteza de miscare
- Gloante nelimitate
-Meniul Trail unde sa exite difere culori la trail si no trail
//
-VIP free intre orele predefinite de mine prin cvar
-VIP-ul sa aiba glow dar foarte slab
-Sa apara tag-ul VIP in TAB
-Meniul sa nu fie disponibil in unele mape (le setez eu in sursa sau fisier txt/ini)
-VIP-ul incepe runda cu 125HP 125AP 1400$ (vreau sa aiba cvar)
-Sa arate damge-ul facut in timp real
-Sa isi reseteze doar decesele
-VIP-i sa aiba model diferit fata de ceilalti playeri
-Meniu Bhop ( daca vrei sa fie on sau off )
-Sansa de respawn (vreau sa aiba cvar)
-Mesaj când primește Respawn
Ai primit Respawn în aceasta runda !!!
- Mesaj la conectare in chat

_________________
ImageImage
Tranzactii efectuate:
| Afiseaza codul
Toti au dat primi!
https://i.imgur.com/8pob2nT.png
https://i.imgur.com/I3aaoAn.png
https://i.imgur.com/oa1IASc.png
https://i.imgur.com/cPHpfcm.png
https://i.imgur.com/QoAsi2x.png
http://prntscr.com/j4yumf
https://image.prntscr.com/image/sTnbhKN7SgGANI7rrRMYqA.png
https://i.imgur.com/Uyq3P48.png
https://image.prntscr.com/image/3vu6JMW_TjS2-iloHe9xRA.png


Last edited by DevilBoy.eXe on 12 Sep 2018 20:48, edited 1 time in total.



06 Sep 2018 17:44
Profile multumesc YIM WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2848
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
ChristianEvo wrote:
Imi poti adauga Defuse Kit la CT ? (am uitat sa mentionez in prima cerere..)

| Afiseaza codul
/*
CREDITE:
ConnorMcLeod - pentru bullet damage
twistedeuphoria - pentru multi jump
cheap_suit - cateva bucati de cod extrase din biohazard
*/


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

// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[CSGO.RANGFORT.RO]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "evo_style@yahoo.com";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("bit"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------

#define PLUGIN_NAME "VIP System"
#define PLUGIN_NAME_PAUSED "VIP System [OPRIT]"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YONTU"

#define is_user_valid(%1) (1 <= %1 <= max_players)

enum cvars
{
hp_spawn = 0,
ap_spawn,
money_spawn,
hp_kill,
hp_hs,
ap_kill,
ap_hs,
hp_max,
money_kill,
money_hs,
show_vip_tab,
show_bullet_dmg,
multi_jump,
noflash
}

new cvar[cvars], rounds = 0;
new max_players;
new bool:g_bJump[33] = false, g_JumpNum[33] = 0;
new g_iPlayerPos[33], g_iPlayerCol[33];

// NU SCHIMBA
new const Float:g_flCoords[][] =
{
{0.50, 0.40},
{0.56, 0.44},
{0.60, 0.50},
{0.56, 0.56},
{0.50, 0.60},
{0.44, 0.56},
{0.40, 0.50},
{0.44, 0.44}
}

// NU SCHIMBA VALORILE DEJA EXISTENTE. Poti adauga mai multe culori, respectand matricea
new const g_iColors[][] =
{
{0, 127, 255}, // blue
{255, 127, 0}, // orange
{127, 0, 255}, // purple
{255, 0, 0}, // red
{255, 100, 150}, // pink
{0, 255, 0} // green
}

public plugin_init()
{
new path[64];
get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path, charsmax(path), "%s/vip_maps.ini", path);

new file = fopen(path, "r+");

if(!file_exists(path))
{
write_file(path, "; VIP-UL ESTE DEZACTIVAT PE URMATOARELE HARTI: ");
write_file(path, "; Exemplu de adaugare HARTA:^n; ^"harta^"^n^nfy_snow^ncss_bycastor");
}

new mapname[32];
get_mapname(mapname, charsmax(mapname));

new text[121], maptext[32], bool:remove_vip = false;
while(!feof(file))
{
fgets(file, text, charsmax(text));
trim(text);

if(text[0] == ';' || !strlen(text))
{
continue;
}

parse(text, maptext, charsmax(maptext));

if(equal(maptext, mapname))
{
log_amx("Am dezactivat pluginul 'VIP' pe harta %s.", maptext);
remove_vip = true;
break;
}

}
fclose(file);

if(!remove_vip)
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_event("DeathMsg", "event_DeathMsg", "a");
register_event("Damage", "event_Damage", "b", "2>0", "3=0");
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
register_event("TextMsg", "event_textmsg", "a", "2=#Game_will_restart_in")

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);

register_message(get_user_msgid("ScoreAttrib"), "msg_ScoreAttrib");
register_message(get_user_msgid("ScreenFade"), "msg_ScreenFade");

register_clcmd("say /vips", "CmdVipsOnline");
register_clcmd("say_team /vips", "CmdVipsOnline");
register_clcmd("say vips", "CmdVipsOnline");
register_clcmd("say_team vips", "CmdVipsOnline");

register_clcmd("say infovip", "CmdPrintAttributes");
register_clcmd("say_team infovip", "CmdPrintAttributes");
register_clcmd("say /infovip", "CmdPrintAttributes");
register_clcmd("say_team /infovip", "CmdPrintAttributes");

cvar[hp_spawn] = register_cvar("vip_hp_spawn", "120"); // 0 = dezactivat
cvar[ap_spawn] = register_cvar("vip_ap_spawn", "120"); // 0 = dezactivat
cvar[money_spawn] = register_cvar("vip_money_spawn", "0"); // 0 = dezactivat
cvar[show_vip_tab] = register_cvar("vip_show_tab", "1"); // 0 = dezactivat
cvar[show_bullet_dmg] = register_cvar("vip_show_bullet_dmg", "1"); // 0 = dezactivat
cvar[multi_jump] = register_cvar("vip_multijump", "1"); // 0 = dezactivat. Daca valoarea cvar-ului este 1, vei sari de 2 ori. Orice valoare pui, va fi +1 jump
cvar[hp_kill] = register_cvar("vip_hp_kill", "10"); // 0 = dezactivat
cvar[hp_hs] = register_cvar("vip_hp_hs", "15"); // 0 = dezactivat
cvar[ap_kill] = register_cvar("vip_ap_kill", "10"); // 0 = dezactivat
cvar[ap_hs] = register_cvar("vip_ap_hs", "15"); // 0 = dezactivat
cvar[hp_max] = register_cvar("vip_hp_max", "120"); // 0 = viata infinita
cvar[money_kill] = register_cvar("vip_money_kill", "150"); // 0 = dezactivat
cvar[money_hs] = register_cvar("vip_money_hs", "300"); // 0 = dezactivat
cvar[noflash] = register_cvar("vip_noflash", "1"); // 0 = dezactivat

max_players = get_maxplayers();
}
else
{
register_plugin(PLUGIN_NAME_PAUSED, PLUGIN_VERSION, PLUGIN_AUTHOR);
pause("ade");
}

register_cvar("vip_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
set_cvar_string("vip_", PLUGIN_VERSION);
}

public client_putinserver(id)
{
g_JumpNum[id] = 0;
g_bJump[id] = false;
}

public CmdVipsOnline(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

new adminnames[33][32], message[256], i, count, len;
len = format(message, charsmax(message), "!4%s!3 VIPS ONLINE: ", TAG);
for(i = 1 ; i <= max_players; i++)
{
if(is_user_connected(i) && is_user_vip(i))
get_user_name(i, adminnames[count++], charsmax(adminnames[]));
}

if(count > 0)
{
for(i = 0; i < count; i++)
{
len += format(message[len], 255 -len, "!4%s!1%s ", adminnames[i], i < (count -1) ? " | " : "");
}
ColorChat(id, message);
}
else
{
len += format(message[len], 255 -len, "!4No one !")
ColorChat(id, message);
}

return PLUGIN_CONTINUE;
}

public CmdPrintAttributes(id)
{
if(!is_user_connected(id)) return;
show_motd(id, "vip.txt", "Beneficii VIP");
}

public client_PreThink(id)
{
new cache = get_pcvar_num(cvar[multi_jump]);
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

new nbut = get_user_button(id);
new obut = get_user_oldbutton(id);

if(cache != 0)
{
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(g_JumpNum[id] < cache)
{
g_bJump[id] = true;
g_JumpNum[id]++;
return PLUGIN_CONTINUE;
}
}

if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
g_JumpNum[id] = 0;
return PLUGIN_CONTINUE;
}
}
return PLUGIN_CONTINUE;
}

public client_PostThink(id)
{
new jump_num = get_pcvar_num(cvar[multi_jump]);
if(!jump_num)
return PLUGIN_CONTINUE;

if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

if(g_bJump[id])
{
new Float:fVelocity[3];
entity_get_vector(id, EV_VEC_velocity, fVelocity);
fVelocity[2] = random_float(265.0, 285.0);
entity_set_vector(id, EV_VEC_velocity, fVelocity);

g_bJump[id] = false;
return PLUGIN_CONTINUE;
}

return PLUGIN_CONTINUE;
}

public event_DeathMsg()
{
new killer = read_data(1), hs = read_data(3);
if(is_user_alive(killer) && is_user_vip(killer))
{
if(killer == read_data(2)) return PLUGIN_HANDLED;

if(hs && !user_has_weapon(killer, CSW_HEGRENADE)) give_item(killer, "weapon_hegrenade");

new cache = hs ? get_pcvar_num(cvar[hp_hs]) : get_pcvar_num(cvar[hp_kill]);
if(cache != 0) set_user_health(killer, min(get_user_health(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[ap_hs]) : get_pcvar_num(cvar[ap_kill]);
if(cache != 0) set_user_armor(killer, min(get_user_armor(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[money_hs]) : get_pcvar_num(cvar[money_kill]);
if(cache != 0) cs_set_user_money(killer, min(cs_get_user_money(killer) + cache, 16000));
}

return PLUGIN_CONTINUE;
}

public event_Damage(victim)
{
if(!get_pcvar_num(cvar[show_bullet_dmg]))
return PLUGIN_CONTINUE;

new id = get_user_attacker(victim);
if(is_user_valid(id))
{
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_HANDLED;

if(read_data(4) || read_data(5) || read_data(6))
{
new iPos = ++g_iPlayerPos[id];
if(iPos == sizeof(g_flCoords))
iPos = g_iPlayerPos[id] = 0;

new iCol = ++g_iPlayerCol[id];
if(iCol == sizeof(g_iColors))
iCol = g_iPlayerCol[id] = 0;

set_hudmessage(g_iColors[iCol][0], g_iColors[iCol][1], g_iColors[iCol][2], Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1);
show_hudmessage(id, "%d", read_data(2));
}
}

return PLUGIN_CONTINUE;
}

public event_NewRound()
{
rounds++;
}

public event_textmsg()
{
rounds = 0;
}

public fw_PlayerSpawnPost(id)
{
if(is_user_vip(id) && is_user_alive(id))
{
set_task(0.25, "give_items", id + 212);
return HAM_IGNORED;
}

return HAM_IGNORED;
}

public give_items(taskid)
{
new id = taskid - 212;
if(!is_user_alive(id))
return;

new cache = get_pcvar_num(cvar[hp_spawn])
if(cache != 0) set_user_health(id, cache);

cache = get_pcvar_num(cvar[ap_spawn]);
if(cache != 0) cs_set_user_armor(id, cache, CS_ARMOR_VESTHELM);

cache = get_pcvar_num(cvar[money_spawn]);
if(cache != 0) cs_set_user_money(id, min(cs_get_user_money(id) + cache, 16000));

if(rounds >= 3) ShowVipMenu(id);
}

public msg_ScoreAttrib(msgid, dest, id)
{
if(!get_pcvar_num(cvar[show_vip_tab]))
return PLUGIN_CONTINUE;

new id = get_msg_arg_int(1);
if(is_user_connected(id) && is_user_vip(id))
set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? (1<<2) : (1<<0));

return PLUGIN_CONTINUE;
}

public msg_ScreenFade(msgid, dest, id)
{
if(!get_pcvar_num(cvar[noflash]))
return PLUGIN_HANDLED;

if(is_user_connected(id) && is_user_vip(id))
{
static data[4];
data[0] = get_msg_arg_int(4);
data[1] = get_msg_arg_int(5);
data[2] = get_msg_arg_int(6);
data[3] = get_msg_arg_int(7);

if(data[0] == 255 && data[1] == 255 && data[2] == 255 && data[3] > 199)
return PLUGIN_HANDLED;
}

return PLUGIN_CONTINUE;
}

public ShowVipMenu(id)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED;

if(!is_user_vip(id))
{
ColorChat(id, "!4%s!1 Imi pare rau, dar nu ai acces la meniul pentru!3 membrii VIP!1.", TAG);
ColorChat(id, "!4%s!1 Poti cumpara VIP, contactand adresa Y!M:!3 %s!1.", TAG, CONTACT);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
drop_weapons(id, 2);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);

new menu = menu_create("\r[CSGO.RANGFORT.RO] \yMeniu Arme VIP", "VipMenuHandler");
menu_additem(menu, "\yM4A1 \d+ \rEchipament", "1");
menu_additem(menu, "\yAK47 \d+ \rEchipament", "2");
menu_additem(menu, "\yAWP \d+ \rEchipament", "3");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);

return PLUGIN_CONTINUE;
}

public VipMenuHandler(id, menu, item)
{
if(!is_user_connected(id) || item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
drop_weapons(id, 1);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 120);

ColorChat(id, "!4%s!1 Ai ales!3 M4A1!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}

case 1:
{
drop_weapons(id, 1);
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 120);

ColorChat(id, "!4%s!1 Ai ales!3 AK47!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}

case 2:
{
drop_weapons(id, 1);
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 30);

ColorChat(id, "!4%s!1 Ai ales!3 AWP!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}
}

menu_destroy(menu);
return PLUGIN_HANDLED;
}

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

// Drop primary/secondary weapons
stock drop_weapons(id, dropwhat)
{
// Get user weapons
static weapons[32], num, i, weaponid, wname[32];
num = 0; // reset passed weapons count (bugfix)
get_user_weapons(id, weapons, num);

// Loop through them and drop primaries or secondaries
for (i = 0; i < num; i++)
{
// Prevent re-indexing the array
weaponid = weapons[i];

if((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
{
// Get weapon entity
get_weaponname(weaponid, wname, charsmax(wname));
engclient_cmd(id, "drop", wname);
}
}
}

stock ColorChat(id, String[], any:...)
{
static szMesage[192];
vformat(szMesage, charsmax(szMesage), String, 3);

replace_all(szMesage, charsmax(szMesage), "!1", "^1");
replace_all(szMesage, charsmax(szMesage), "!3", "^3");
replace_all(szMesage, charsmax(szMesage), "!4", "^4");

static g_msg_SayText = 0;
if(!g_msg_SayText)
g_msg_SayText = get_user_msgid("SayText");

new Players[32], iNum = 1, i;

if(id) Players[0] = id;
else get_players(Players, iNum, "ch");

for(--iNum; iNum >= 0; iNum--)
{
i = Players[iNum];

message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
write_byte(i);
write_string(szMesage);
message_end();
}
}

| Afiseaza codul
/*
CREDITE:
ConnorMcLeod - pentru bullet damage
twistedeuphoria - pentru multi jump
cheap_suit - cateva bucati de cod extrase din biohazard
*/


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

// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[CSGO.RANGFORT.RO]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "evo_style@yahoo.com";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("bit"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------

#define PLUGIN_NAME "VIP System"
#define PLUGIN_NAME_PAUSED "VIP System [OPRIT]"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YONTU"

#define is_user_valid(%1) (1 <= %1 <= max_players)

enum cvars
{
hp_spawn = 0,
ap_spawn,
money_spawn,
hp_kill,
hp_hs,
ap_kill,
ap_hs,
hp_max,
money_kill,
money_hs,
show_vip_tab,
show_bullet_dmg,
multi_jump,
noflash
}

new cvar[cvars], rounds = 0;
new max_players;
new bool:g_bJump[33] = false, g_JumpNum[33] = 0;
new g_iPlayerPos[33], g_iPlayerCol[33];

// NU SCHIMBA
new const Float:g_flCoords[][] =
{
{0.50, 0.40},
{0.56, 0.44},
{0.60, 0.50},
{0.56, 0.56},
{0.50, 0.60},
{0.44, 0.56},
{0.40, 0.50},
{0.44, 0.44}
}

// NU SCHIMBA VALORILE DEJA EXISTENTE. Poti adauga mai multe culori, respectand matricea
new const g_iColors[][] =
{
{0, 127, 255}, // blue
{255, 127, 0}, // orange
{127, 0, 255}, // purple
{255, 0, 0}, // red
{255, 100, 150}, // pink
{0, 255, 0} // green
}

public plugin_init()
{
new path[64];
get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path, charsmax(path), "%s/vip_maps.ini", path);

new file = fopen(path, "r+");

if(!file_exists(path))
{
write_file(path, "; VIP-UL ESTE DEZACTIVAT PE URMATOARELE HARTI: ");
write_file(path, "; Exemplu de adaugare HARTA:^n; ^"harta^"^n^nfy_snow^ncss_bycastor");
}

new mapname[32];
get_mapname(mapname, charsmax(mapname));

new text[121], maptext[32], bool:remove_vip = false;
while(!feof(file))
{
fgets(file, text, charsmax(text));
trim(text);

if(text[0] == ';' || !strlen(text))
{
continue;
}

parse(text, maptext, charsmax(maptext));

if(equal(maptext, mapname))
{
log_amx("Am dezactivat pluginul 'VIP' pe harta %s.", maptext);
remove_vip = true;
break;
}

}
fclose(file);

if(!remove_vip)
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_event("DeathMsg", "event_DeathMsg", "a");
register_event("Damage", "event_Damage", "b", "2>0", "3=0");
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
register_event("TextMsg", "event_textmsg", "a", "2=#Game_will_restart_in")

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);

register_message(get_user_msgid("ScoreAttrib"), "msg_ScoreAttrib");
register_message(get_user_msgid("ScreenFade"), "msg_ScreenFade");

register_clcmd("say /vips", "CmdVipsOnline");
register_clcmd("say_team /vips", "CmdVipsOnline");
register_clcmd("say vips", "CmdVipsOnline");
register_clcmd("say_team vips", "CmdVipsOnline");

register_clcmd("say infovip", "CmdPrintAttributes");
register_clcmd("say_team infovip", "CmdPrintAttributes");
register_clcmd("say /infovip", "CmdPrintAttributes");
register_clcmd("say_team /infovip", "CmdPrintAttributes");

cvar[hp_spawn] = register_cvar("vip_hp_spawn", "120"); // 0 = dezactivat
cvar[ap_spawn] = register_cvar("vip_ap_spawn", "120"); // 0 = dezactivat
cvar[money_spawn] = register_cvar("vip_money_spawn", "0"); // 0 = dezactivat
cvar[show_vip_tab] = register_cvar("vip_show_tab", "1"); // 0 = dezactivat
cvar[show_bullet_dmg] = register_cvar("vip_show_bullet_dmg", "1"); // 0 = dezactivat
cvar[multi_jump] = register_cvar("vip_multijump", "1"); // 0 = dezactivat. Daca valoarea cvar-ului este 1, vei sari de 2 ori. Orice valoare pui, va fi +1 jump
cvar[hp_kill] = register_cvar("vip_hp_kill", "10"); // 0 = dezactivat
cvar[hp_hs] = register_cvar("vip_hp_hs", "15"); // 0 = dezactivat
cvar[ap_kill] = register_cvar("vip_ap_kill", "10"); // 0 = dezactivat
cvar[ap_hs] = register_cvar("vip_ap_hs", "15"); // 0 = dezactivat
cvar[hp_max] = register_cvar("vip_hp_max", "120"); // 0 = viata infinita
cvar[money_kill] = register_cvar("vip_money_kill", "150"); // 0 = dezactivat
cvar[money_hs] = register_cvar("vip_money_hs", "300"); // 0 = dezactivat
cvar[noflash] = register_cvar("vip_noflash", "1"); // 0 = dezactivat

max_players = get_maxplayers();
}
else
{
register_plugin(PLUGIN_NAME_PAUSED, PLUGIN_VERSION, PLUGIN_AUTHOR);
pause("ade");
}

register_cvar("vip_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
set_cvar_string("vip_", PLUGIN_VERSION);
}

public client_putinserver(id)
{
g_JumpNum[id] = 0;
g_bJump[id] = false;
}

public CmdVipsOnline(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

new adminnames[33][32], message[256], i, count, len;
len = format(message, charsmax(message), "!4%s!3 VIPS ONLINE: ", TAG);
for(i = 1 ; i <= max_players; i++)
{
if(is_user_connected(i) && is_user_vip(i))
get_user_name(i, adminnames[count++], charsmax(adminnames[]));
}

if(count > 0)
{
for(i = 0; i < count; i++)
{
len += format(message[len], 255 -len, "!4%s!1%s ", adminnames[i], i < (count -1) ? " | " : "");
}
ColorChat(id, message);
}
else
{
len += format(message[len], 255 -len, "!4No one !")
ColorChat(id, message);
}

return PLUGIN_CONTINUE;
}

public CmdPrintAttributes(id)
{
if(!is_user_connected(id)) return;
show_motd(id, "vip.txt", "Beneficii VIP");
}

public client_PreThink(id)
{
new cache = get_pcvar_num(cvar[multi_jump]);
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

new nbut = get_user_button(id);
new obut = get_user_oldbutton(id);

if(cache != 0)
{
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(g_JumpNum[id] < cache)
{
g_bJump[id] = true;
g_JumpNum[id]++;
return PLUGIN_CONTINUE;
}
}

if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
g_JumpNum[id] = 0;
return PLUGIN_CONTINUE;
}
}
return PLUGIN_CONTINUE;
}

public client_PostThink(id)
{
new jump_num = get_pcvar_num(cvar[multi_jump]);
if(!jump_num)
return PLUGIN_CONTINUE;

if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

if(g_bJump[id])
{
new Float:fVelocity[3];
entity_get_vector(id, EV_VEC_velocity, fVelocity);
fVelocity[2] = random_float(265.0, 285.0);
entity_set_vector(id, EV_VEC_velocity, fVelocity);

g_bJump[id] = false;
return PLUGIN_CONTINUE;
}

return PLUGIN_CONTINUE;
}

public event_DeathMsg()
{
new killer = read_data(1), hs = read_data(3);
if(is_user_alive(killer) && is_user_vip(killer))
{
if(killer == read_data(2)) return PLUGIN_HANDLED;

if(hs && !user_has_weapon(killer, CSW_HEGRENADE)) give_item(killer, "weapon_hegrenade");

new cache = hs ? get_pcvar_num(cvar[hp_hs]) : get_pcvar_num(cvar[hp_kill]);
if(cache != 0) set_user_health(killer, min(get_user_health(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[ap_hs]) : get_pcvar_num(cvar[ap_kill]);
if(cache != 0) set_user_armor(killer, min(get_user_armor(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[money_hs]) : get_pcvar_num(cvar[money_kill]);
if(cache != 0) cs_set_user_money(killer, min(cs_get_user_money(killer) + cache, 16000));
}

return PLUGIN_CONTINUE;
}

public event_Damage(victim)
{
if(!get_pcvar_num(cvar[show_bullet_dmg]))
return PLUGIN_CONTINUE;

new id = get_user_attacker(victim);
if(is_user_valid(id))
{
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_HANDLED;

if(read_data(4) || read_data(5) || read_data(6))
{
new iPos = ++g_iPlayerPos[id];
if(iPos == sizeof(g_flCoords))
iPos = g_iPlayerPos[id] = 0;

new iCol = ++g_iPlayerCol[id];
if(iCol == sizeof(g_iColors))
iCol = g_iPlayerCol[id] = 0;

set_hudmessage(g_iColors[iCol][0], g_iColors[iCol][1], g_iColors[iCol][2], Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1);
show_hudmessage(id, "%d", read_data(2));
}
}

return PLUGIN_CONTINUE;
}

public event_NewRound()
{
rounds++;
}

public event_textmsg()
{
rounds = 0;
}

public fw_PlayerSpawnPost(id)
{
if(is_user_vip(id) && is_user_alive(id))
{
set_task(0.25, "give_items", id + 212);
return HAM_IGNORED;
}

return HAM_IGNORED;
}

public give_items(taskid)
{
new id = taskid - 212;
if(!is_user_alive(id))
return;

new cache = get_pcvar_num(cvar[hp_spawn])
if(cache != 0) set_user_health(id, cache);

cache = get_pcvar_num(cvar[ap_spawn]);
if(cache != 0) cs_set_user_armor(id, cache, CS_ARMOR_VESTHELM);

cache = get_pcvar_num(cvar[money_spawn]);
if(cache != 0) cs_set_user_money(id, min(cs_get_user_money(id) + cache, 16000));

if(cs_get_user_team(id) == CS_TEAM_CT) cs_set_user_defuse(id);

if(rounds >= 3) ShowVipMenu(id);
}

public msg_ScoreAttrib(msgid, dest, id)
{
if(!get_pcvar_num(cvar[show_vip_tab]))
return PLUGIN_CONTINUE;

new id = get_msg_arg_int(1);
if(is_user_connected(id) && is_user_vip(id))
set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? (1<<2) : (1<<0));

return PLUGIN_CONTINUE;
}

public msg_ScreenFade(msgid, dest, id)
{
if(!get_pcvar_num(cvar[noflash]))
return PLUGIN_HANDLED;

if(is_user_connected(id) && is_user_vip(id))
{
static data[4];
data[0] = get_msg_arg_int(4);
data[1] = get_msg_arg_int(5);
data[2] = get_msg_arg_int(6);
data[3] = get_msg_arg_int(7);

if(data[0] == 255 && data[1] == 255 && data[2] == 255 && data[3] > 199)
return PLUGIN_HANDLED;
}

return PLUGIN_CONTINUE;
}

public ShowVipMenu(id)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED;

if(!is_user_vip(id))
{
ColorChat(id, "!4%s!1 Imi pare rau, dar nu ai acces la meniul pentru!3 membrii VIP!1.", TAG);
ColorChat(id, "!4%s!1 Poti cumpara VIP, contactand adresa Y!M:!3 %s!1.", TAG, CONTACT);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
drop_weapons(id, 2);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);

new menu = menu_create("\r[CSGO.RANGFORT.RO] \yMeniu Arme VIP", "VipMenuHandler");
menu_additem(menu, "\yM4A1 \d+ \rEchipament", "1");
menu_additem(menu, "\yAK47 \d+ \rEchipament", "2");
menu_additem(menu, "\yAWP \d+ \rEchipament", "3");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);

return PLUGIN_CONTINUE;
}

public VipMenuHandler(id, menu, item)
{
if(!is_user_connected(id) || item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
drop_weapons(id, 1);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 120);

ColorChat(id, "!4%s!1 Ai ales!3 M4A1!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}

case 1:
{
drop_weapons(id, 1);
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 120);

ColorChat(id, "!4%s!1 Ai ales!3 AK47!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}

case 2:
{
drop_weapons(id, 1);
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 30);

ColorChat(id, "!4%s!1 Ai ales!3 AWP!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}
}

menu_destroy(menu);
return PLUGIN_HANDLED;
}

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

// Drop primary/secondary weapons
stock drop_weapons(id, dropwhat)
{
// Get user weapons
static weapons[32], num, i, weaponid, wname[32];
num = 0; // reset passed weapons count (bugfix)
get_user_weapons(id, weapons, num);

// Loop through them and drop primaries or secondaries
for (i = 0; i < num; i++)
{
// Prevent re-indexing the array
weaponid = weapons[i];

if((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
{
// Get weapon entity
get_weaponname(weaponid, wname, charsmax(wname));
engclient_cmd(id, "drop", wname);
}
}
}

stock ColorChat(id, String[], any:...)
{
static szMesage[192];
vformat(szMesage, charsmax(szMesage), String, 3);

replace_all(szMesage, charsmax(szMesage), "!1", "^1");
replace_all(szMesage, charsmax(szMesage), "!3", "^3");
replace_all(szMesage, charsmax(szMesage), "!4", "^4");

static g_msg_SayText = 0;
if(!g_msg_SayText)
g_msg_SayText = get_user_msgid("SayText");

new Players[32], iNum = 1, i;

if(id) Players[0] = id;
else get_players(Players, iNum, "ch");

for(--iNum; iNum >= 0; iNum--)
{
i = Players[iNum];

message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
write_byte(i);
write_string(szMesage);
message_end();
}
}

Poftim, adaugat defuser.

@DevilBoy.eXe, nu cunosc limbajul in asa fel incat sa pot face o conexiune stabila, momentan il invat. Pot sa ti-l fac cu citire din fisier.

@Jucks : post2725635.html#p2725635

_________________
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage

Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
Creez pluginuri contra cost


06 Sep 2018 19:01
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 06 Sep 2018 20:17
Posts: 1
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
NICK: GUARD;
VIP PLUGIN | Afiseaza codul
#include <amxmodx>

#include <cstrike>

#include <fun>

#include <hamsandwich>

#include <engine>

#include <fakemeta>

#include <cc_colorchat>



#define p. "Classic VIP"

#define v. "1.0"

#define a. "unknown"



#define VIP_LEVEL_ACCES ADMIN_LEVEL_H



#define SCOREATTRIB_NONE 0

#define SCOREATTRIB_DEAD ( 1 << 0 )

#define SCOREATTRIB_BOMB ( 1 << 1 )

#define SCOREATTRIB_VIP ( 1 << 2 )



#define REMOVE_FLAGS "t"



new const RMaps[][] = {

"35hp",

"35hp_2",

"31hp",

"1hp",

"100hp"

};



new const g_szBeginning[ ] = "Membrii VIP";



const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);

const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);



new round[33] = 0;

new g_szMessage[256], cvar_vip_mode, cvar_vip_maxmoney, cvar_vip_maxap, cvar_vip_maxhp, cvar_vip_showC, cvar_vip_showH, cvar_vip_in_out, cvar_tag, cvar_start_hp, cvar_start_ap, cvar_start_money, cvar_vip_jump, cvar_hp_kill, cvar_ap_kill, jumpnum[33], bool: dojump[33], SyncHudMessage;



public plugin_init(){

register_plugin(p., v., a.);



register_clcmd("say /vip", "vip_info");

register_clcmd("say", "say_vmenu");

register_clcmd("say", "handle_say");

register_clcmd("say_team", "handle_say");



cvar_vip_mode = register_cvar("amx_vip_mode", "1");

cvar_tag = register_cvar("amx_vip_tag", "[VIP]");

cvar_start_hp = register_cvar("amx_start_hp", "50");

cvar_start_ap = register_cvar("amx_start_ap", "80");

cvar_start_money = register_cvar("amx_start_money", "8000");

cvar_vip_jump = register_cvar("amx_vip_jump", "1" );

cvar_hp_kill = register_cvar("amx_vip_addhp", "10");

cvar_ap_kill = register_cvar("amx_vip_addap", "10");

cvar_vip_in_out = register_cvar("amx_vip_in_out", "1");

cvar_vip_showC = register_cvar("amx_vip_show_chat", "1");

cvar_vip_showH = register_cvar("amx_vip_show_hud", "1");

cvar_vip_maxhp = register_cvar("amx_vip_maxhp", "180");

cvar_vip_maxap = register_cvar("amx_vip_maxap", "200");

cvar_vip_maxmoney = register_cvar("amx_vip_maxmoney", "16000");



register_event("DeathMsg", "eDeathMsg", "a");

register_message(get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib");

RegisterHam(Ham_Spawn, "player", "Spawn", 1);



set_task(120.0, "mesaj_info", _, _, _, "b");

set_task(1.0, "TaskDisplayVips", _, _, _, "b", 0);

SyncHudMessage = CreateHudSyncObj();

}



public vip_menu(id){

if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



new menu;

switch(cs_get_user_team(id)){

case CS_TEAM_T:{

menu = menu_create("\y[\rVIP Classic\y] \wMeniu \yVIP", "menu_ammunition");

menu_additem(menu, "Ak47+Deagle+Set grenazi", "1");

menu_additem(menu, "M4a1+Deagle+Set grenazi", "2");

menu_additem(menu, "Awp+Deagle+Set grenazi", "3");

}



case CS_TEAM_CT:{

menu = menu_create("\y[\rVIP Classic\y] \wMeniu \yVIP", "menu_ammunition");

menu_additem(menu, "M4a1+Deagle+Set grenazi", "1");

menu_additem(menu, "Ak47+Deagle+Set grenazi", "2");

menu_additem(menu, "Awp+Deagle+Set grenazi", "3");

}

}

menu_display(id, menu, 0);

return 1;

}



public menu_ammunition (id, menu, item){

if(item == MENU_EXIT)

return 1;



new access, callback, data[6], szName[64], tag[32];

menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

get_pcvar_string(cvar_tag, tag, charsmax(tag));

new key = str_to_num(data);



if(cs_get_user_team(id) == CS_TEAM_T)

switch(key){

case 1:{

drop_weapons(id, 1);

drop_weapons(id, 2);

give_item(id, "weapon_knife");

give_item(id, "weapon_ak47");

give_item(id, "weapon_deagle");

give_item(id, "weapon_hegrenade");

give_item(id, "weapon_smokegrenade");

give_item(id, "weapon_flashbang");

cs_set_user_bpammo(id, CSW_HEGRENADE, 1);

cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1);

cs_set_user_bpammo(id, CSW_FLASHBANG, 2);

cs_set_user_bpammo(id, CSW_AK47, 90);

cs_set_user_bpammo(id, CSW_DEAGLE, 35);

ColorChat(id, GREEN, "^4%s ^1Ai ales ^4Ak47^1+^4Deagle^1+^4Set grenazi^1.", tag);

}

case 2:{

drop_weapons(id, 1);

drop_weapons(id, 2);

give_item(id, "weapon_knife");

give_item(id, "weapon_m4a1");

give_item(id, "weapon_deagle");

give_item(id, "weapon_hegrenade");

give_item(id, "weapon_smokegrenade");

give_item(id, "weapon_flashbang");

cs_set_user_bpammo(id, CSW_HEGRENADE, 1);

cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1);

cs_set_user_bpammo(id, CSW_FLASHBANG, 2);

cs_set_user_bpammo(id, CSW_M4A1, 90);

cs_set_user_bpammo(id, CSW_DEAGLE, 35);

ColorChat(id, GREEN, "^4%s ^1Ai ales ^4M4a1^1+^4Deagle^1+^4Set grenazi^1.", tag);

}

case 3:{

drop_weapons(id, 1);

drop_weapons(id, 2);

give_item(id, "weapon_knife");

give_item(id, "weapon_awp");

give_item(id, "weapon_deagle");

give_item(id, "weapon_hegrenade");

give_item(id, "weapon_smokegrenade")

give_item(id, "weapon_flashbang");

give_item(id, "weapon_smokegrenade");

cs_set_user_bpammo(id, CSW_FLASHBANG, 2);

cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1);

cs_set_user_bpammo(id, CSW_HEGRENADE, 1);

cs_set_user_bpammo(id, CSW_AWP, 30);

cs_set_user_bpammo(id, CSW_DEAGLE, 35);

ColorChat(id, GREEN, "^4%s ^1Ai ales ^4Awp^1+^4Deagle^1+^4Set grenazi^1.", tag);

}

}



if(cs_get_user_team(id) == CS_TEAM_CT)

switch(key){

case 1:{

drop_weapons(id, 1);

drop_weapons(id, 2);

give_item(id, "weapon_knife");

give_item(id, "weapon_m4a1");

give_item(id, "weapon_deagle");

give_item(id, "weapon_hegrenade");

give_item(id, "weapon_flashbang");

cs_set_user_bpammo(id, CSW_HEGRENADE, 1);

cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1);

cs_set_user_bpammo(id, CSW_FLASHBANG, 2);

cs_set_user_bpammo(id, CSW_M4A1, 90);

cs_set_user_bpammo(id, CSW_DEAGLE, 35);

ColorChat(id, GREEN, "^4%s ^1Ai ales ^4M4a1^1+^4Deagle^1+^4Set grenazi^1.", tag);

}

case 2:{

drop_weapons(id, 1);

drop_weapons(id, 2);

give_item(id, "weapon_knife");

give_item(id, "weapon_ak47");

give_item(id, "weapon_deagle");

give_item(id, "weapon_hegrenade");

give_item(id, "weapon_smokegrenade");

give_item(id, "weapon_flashbang");

cs_set_user_bpammo(id, CSW_HEGRENADE, 1);

cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1);

cs_set_user_bpammo(id, CSW_FLASHBANG, 2);

cs_set_user_bpammo(id, CSW_AK47, 90);

cs_set_user_bpammo(id, CSW_DEAGLE, 35);

ColorChat(id, GREEN, "^4%s ^1Ai ales ^4Ak47^1+^4Deagle^1+^4Set grenazi^1.", tag);

}

case 3:{

drop_weapons(id, 1);

drop_weapons(id, 2);

give_item(id, "weapon_knife");

give_item(id, "weapon_awp");

give_item(id, "weapon_deagle");

give_item(id, "weapon_hegrenade");

give_item(id, "weapon_smokegrenade");

give_item(id, "weapon_flashbang");

cs_set_user_bpammo(id, CSW_HEGRENADE, 1);

cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 1);

cs_set_user_bpammo(id, CSW_FLASHBANG, 2);

cs_set_user_bpammo(id, CSW_AWP, 30);

cs_set_user_bpammo(id, CSW_DEAGLE, 35);

ColorChat(id, GREEN, "^4%s ^1Ai ales ^4Awp^1+^4Deagle^1+^4Set grenazi^1.", tag);

}

}

menu_destroy(menu);

return 1;

}



public Spawn(id) {

if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



if(get_pcvar_num(cvar_vip_mode) == 2){

if(round[id] >= 4)

vip_menu(id);



round[id]++;

}



set_user_health(id, get_user_health(id) + get_pcvar_num(cvar_start_hp));

set_user_armor(id, get_user_armor(id) + get_pcvar_num(cvar_start_ap));

cs_set_user_money(id, cs_get_user_money(id) + get_pcvar_num(cvar_start_money));



new VIP_MAXMONEY = get_pcvar_num(cvar_vip_maxmoney);

new VIP_MONEY = cs_get_user_money(id);



if(VIP_MONEY >= VIP_MAXMONEY){

cs_set_user_money(id, get_pcvar_num(cvar_vip_maxmoney));

}



new MapName[32];

get_mapname(MapName, sizeof(MapName));

for (new i = 0; i < sizeof (RMaps); i ++){

if(equali (MapName, RMaps[i])){

remove_user_flags (id, read_flags(REMOVE_FLAGS));

}

}

return 1;

}



public client_putinserver(id){

if(!(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



set_task(2.0, "in", id);



jumpnum[id] = 0;

dojump[id] = false;

round[id] = 0;



return 1;

}



public client_disconnected(id){

if(!(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



set_task(2.0, "out", id);



jumpnum[id] = 0;

dojump[id] = false;

round[id] = 0;



return 1;

}



public client_PreThink(id){

if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



new BUTON = get_user_button(id);

new OLDBUTON = get_user_oldbutton(id);

new JUMP_VIP = get_pcvar_num(cvar_vip_jump);



if((BUTON & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(OLDBUTON & IN_JUMP)){

if(jumpnum[id] < JUMP_VIP){

dojump[id] = true;

jumpnum[id]++

}

}



if((BUTON & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND)){

jumpnum[id] = 0;

}



return 0;

}



public client_PostThink(id) {

if(!is_user_alive(id))

return 1;



if(dojump[id] == true){

new Float: velocity[3];

entity_get_vector(id, EV_VEC_velocity, velocity)

velocity[2] = random_float(265.0, 285.0);

entity_set_vector(id, EV_VEC_velocity, velocity)

dojump[id] = false;

}



return 0;

}



public eDeathMsg(){

new id_Killer = read_data(1);



if(!is_user_alive(id_Killer) || !(get_user_flags(id_Killer) & VIP_LEVEL_ACCES))

return 1;



new VIP_MAXHP = get_pcvar_num(cvar_vip_maxhp);

new VIP_HP = get_user_health(id_Killer);

new VIP_MAXAP = get_pcvar_num(cvar_vip_maxap);

new VIP_AP = get_user_armor(id_Killer);



set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill));

set_user_armor(id_Killer, get_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill));



if(VIP_HP >= VIP_MAXHP) set_user_health(id_Killer, get_pcvar_num(cvar_vip_maxhp));

if(VIP_AP >= VIP_MAXAP) set_user_armor(id_Killer, get_pcvar_num(cvar_vip_maxap));



return 1;

}



public in(id){

if(!(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



if(get_pcvar_num(cvar_vip_in_out)){

new tag[32], name[32];



get_pcvar_string(cvar_tag, tag, charsmax(tag));

get_user_name(id, name, charsmax(name));



ColorChat(0, GREEN, "^4%s ^1VIP: ^4%s ^1s-a conectat.", tag, name);

return 1;

}



return 1;

}



public out(id){

if(!(get_user_flags(id) & VIP_LEVEL_ACCES))

return 1;



if(get_pcvar_num(cvar_vip_in_out)){

new tag[32], name[32];



get_pcvar_string(cvar_tag, tag, charsmax(tag));

get_user_name(id, name, charsmax(name));



ColorChat(0, GREEN, "^4%s ^1VIP: ^4%s ^1s-a deconectat.", tag, name);



return 1;

}



return 1;

}



public vip_info(id) show_motd(id, "/addons/amxmodx/configs/vip_info.html");



public mesaj_info(){

new tag[32];

get_pcvar_string(cvar_tag, tag, charsmax(tag));



ColorChat(0, GREEN, "^4%s ^1Tastati in chat ^4/vip ^1pentru a vedea beneficiile si pretul vip-ului.", tag);

}



public TaskDisplayVips(){

if(get_pcvar_num(cvar_vip_showH)){

static iPlayers[32];

static iPlayersNum;



get_players(iPlayers, iPlayersNum, "ch");

if(!iPlayersNum)

return 1;



static iVipsConnected, szVipsNames[128], szName[32];

formatex(szVipsNames, sizeof (szVipsNames) -1, "");

iVipsConnected = 0;



static id, i;

for(i = 0; i < iPlayersNum; i++){

id = iPlayers[i];

if(get_user_flags(id) & VIP_LEVEL_ACCES){

get_user_name(id, szName, sizeof(szName) -1);



add(szVipsNames, sizeof(szVipsNames) -1, szName);

add(szVipsNames, sizeof(szVipsNames) -1, "^n");



iVipsConnected++;

}

}



formatex(g_szMessage, sizeof(g_szMessage) -1, "%s (%i)^n%s", g_szBeginning, iVipsConnected, szVipsNames);



set_hudmessage(25, 255, 25, 0.01, 0.25, 0, 0.0, 1.0, 0.1, 0.1, -1);

ShowSyncHudMsg(0, SyncHudMessage, g_szMessage);

}

return 0;

}



public handle_say(id) {

new said[192];

read_args(said,192);

if(contain(said, "/vips") != -1)



set_task(0.1,"print_adminlist",id);



return 0;

}



public say_vmenu(id) {

new said[192];

read_args(said,192);

if(get_pcvar_num(cvar_vip_mode) == 1){

if(contain(said, "/vmenu") != -1)

set_task(0.1, "vip_menu", id);

}

return 0;

}



public print_adminlist(user){

if(get_pcvar_num(cvar_vip_showC)){

new tag[32];

get_pcvar_string(cvar_tag, tag, charsmax(tag));



new adminnames[33][32];

new message[256];

new id, count, x, len;



for(id = 1 ; id <= get_maxplayers() ; id++)

if(is_user_connected(id))

if(get_user_flags(id) & VIP_LEVEL_ACCES)

get_user_name(id, adminnames[count++], charsmax(adminnames[ ]));



len = format(message, 255, "^4%s ^1VIP-ii online sunt:^4 " ,tag);

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, " ");

}

}



print_message(user, message);

}



else{

ColorChat(0, GREEN, "^4%s ^1Nu sunt ^4VIP^1-i online.", tag);

}

}

return 0;

}



print_message(id, msg[]) {

message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);

write_byte(id);

write_string(msg);

message_end();

}



public MessageScoreAttrib(iMsgID, iDest, iReceiver){

new iPlayer = get_msg_arg_int(1);

if(is_user_connected(iPlayer) && (get_user_flags(iPlayer) & VIP_LEVEL_ACCES)){

set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);

}

}



stock fm_find_ent_by_owner(entity, const classname[], owner){

while((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) { }

return entity;

}



stock drop_weapons(id, dropwhat){

static Weapons[32], Num, i, WeaponID;

Num = 0;

get_user_weapons(id, Weapons, Num);

for(i = 0; i < Num; i ++){

WeaponID = Weapons[i];

if((dropwhat == 1 && ((1 << WeaponID) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1 << WeaponID) & SECONDARY_WEAPONS_BIT_SUM ))){

static DropName[32], WeaponEntity;

get_weaponname(WeaponID, DropName, charsmax(DropName));

WeaponEntity = fm_find_ent_by_owner(-1, DropName, id);

set_pev(WeaponEntity, pev_iuser1, cs_get_user_bpammo (id, WeaponID));

engclient_cmd(id, "drop", DropName);

cs_set_user_bpammo(id, WeaponID, 0);

}

}

}

MODIFICARI:
-De adaugat defuser la CT in /vmenu.
-Modifica meniurile /vmenu, in loc de Set grenazi si defuser, sa fie Echipament.
EDIT: - Sa fie comanda de reset deaths (/rd) si sa se poata activa/dezactiva prin cvar (vip_rd 0/1)
-In plugin iti da armura automat, iti arata ca ai armura, doar ca nu functioneaza(nu iti ia armura cand primesti dmg), poti rezolva bugul?.
-Creeaza un cvar vip_free 0/1 care sa ofere tutoror playerilor VIP FREE.
-Printre primele linii in cod sa faci o sectiune "--- DE EDITAT ---".
-Sa se creeaze un fisier automat .ini unde Vipul sa se dezactiveze pe hartile de cutit / awp.
*Multumesc mult*


Last edited by GUARD; on 14 Sep 2018 16:57, edited 4 times in total.



06 Sep 2018 21:57
Profile multumesc WWW
Membru, skill 0
Membru, skill 0

Joined: 16 Aug 2009 21:28
Posts: 67
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Fond eXtream: 0
YONTU wrote:
R0tty wrote:
Salut
Te rog , daca poti , si ai timp ,sa ma ajuti si pe mine , cu modificarea surse-i vip de mai jos.
Imi doresc mult , ca in loc de AWP sa aiba armele dupa exemplul de mai jos.
Se poate ?
Multumesc din suflet !

la TERO

* VIP Menu Tero
* 1. Get M4A1+Deagle+Armura+Set Grenade( fara smoke )
* 2. Get AK47+Deagle+Armura+Set Grenade ( fara smoke )
* 3. Get GALIL+Deagle+Armura +Set Grenade( fara smoke )
* 0. Exit

si la CT

* VIP Menu CT
* 1. Get M4A1+Deagle+Armura+Set Grenade ( fara smoke )
* 2. Get AK47+Deagle+Armura +Set Grenade( fara smoke )
* 3. Get FAMAS+Deagle+Armura+Set Grenade ( fara smoke )
* 0. Exit

Multumesc Anticipat !


| Afiseaza codul
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

static const COLOR[] = "^x04" //green
static const CONTACT[] = "R0tty"
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 CurrentRound
new bool:HasC4[33]
#define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<9) // Keys: 1234567890
#if defined DAMAGE_RECIEVED
new g_MsgSync2
#endif

public plugin_init()
{
register_plugin("VIP PREMIUM Version", "3.1", "CSR")
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", "1")
g_menu_active = register_cvar("menu_active", "1")
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_clcmd("say /wantvip","ShowMotd")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
register_logevent("LogEvent_RoundStart", 2, "1=Round_Start" );
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")
register_event("TextMsg","Event_RoundRestart","a","2&#Game_C");
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)!=read_data(2)) cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public LogEvent_RoundStart()
{
CurrentRound++;
new players[32], player, pnum;
get_players(players, pnum, "a");
for(new i = 0; i < pnum; i++)
{
player = players[i];
if(is_user_alive(player) && get_user_flags(player) & ADMIN_LEVEL_H)
{
give_item(player, "weapon_hegrenade")
give_item(player, "weapon_flashbang")
give_item(player, "weapon_flashbang")
give_item(player, "item_assaultsuit")
give_item(player, "item_thighpack")

if (!get_pcvar_num(g_menu_active))
return PLUGIN_CONTINUE

if(CurrentRound >= 3)
{
Showrod(player);
}
}
}
return PLUGIN_HANDLED
}

public Event_RoundRestart()
{
CurrentRound=0;
}

public hook_death()
{
// Killer id
nKiller = read_data(1)

if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
nHp_add = get_pcvar_num (health_hs_add)
}
else
nHp_add = get_pcvar_num (health_add)
nHp_max = get_pcvar_num (health_max)
// Updating Killer HP
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
return;

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

}

public Showrod(id) {
show_menu(id, Keysrod, "**********VIP MENU CSR***********^n\1 1 M4A1+Deagle ^n\2 2 AK47+Deagle^n\3 3 AWP+Deagle^n0. Exit^n", -1, "rod") // Display menu
}
public Pressedrod(id, key) {
/* Menu:
* VIP Menu
* 1. Get M4A1+Deagle
* 2. Get AK47+Deagle
* 3. Get AWP+Deagle
* 0. Exit
*/
switch (key) {
case 0: {
if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)
HasC4[id] = true;
else
HasC4[id] = false;

strip_user_weapons (id)
give_item(id,"weapon_m4a1")
give_item(id,"ammo_556nato")
give_item(id,"ammo_556nato")
give_item(id,"ammo_556nato")
give_item(id,"weapon_deagle")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");
client_print(id, print_center, "ADD TO FAVORITE CSR.Otty.R0")

if (HasC4[id])
{
give_item(id, "weapon_c4");
cs_set_user_plant( id );
}
}
case 1: {
if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)
HasC4[id] = true;
else
HasC4[id] = false;

strip_user_weapons (id)
give_item(id,"weapon_ak47")
give_item(id,"ammo_762nato")
give_item(id,"ammo_762nato")
give_item(id,"ammo_762nato")
give_item(id,"weapon_deagle")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");
client_print(id, print_center, "ADD TO FAVORITE CSR.Otty.R0")

if (HasC4[id])
{
give_item(id, "weapon_c4");
cs_set_user_plant( id );
}
}
case 2: {
if (user_has_weapon(id, CSW_C4) && get_user_team(id) == 1)
HasC4[id] = true;
else
HasC4[id] = false;

strip_user_weapons (id)
give_item(id,"weapon_awp")
give_item(id,"ammo_338magnum")
give_item(id,"ammo_338magnum")
give_item(id,"ammo_338magnum")
give_item(id,"weapon_deagle")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"ammo_50ae")
give_item(id,"weapon_knife")
give_item(id,"weapon_hegrenade")
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "item_assaultsuit");
give_item(id, "item_thighpack");
client_print(id, print_center, "ADD TO FAVORITE CSR.Otty.R0")
client_print(id, print_center, "ADD TO FAVORITE CSR.Otty.R0")

if (HasC4[id])
{
give_item(id, "weapon_c4");
cs_set_user_plant( id );
}
}
case 9: {
}
}
return PLUGIN_CONTINUE
}

public HandleCmd(id){
if (!get_pcvar_num(g_awp_active))
return PLUGIN_CONTINUE
if(get_user_flags(id) & ADMIN_LEVEL_H)
return PLUGIN_CONTINUE
client_print(id, print_center, "Sniper's Only For VIP's")
return PLUGIN_HANDLED
}

public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public client_authorized(id)
{
set_task(30.0, "PrintText" ,id)
}
public PrintText(id)
{
client_print(id, print_chat, "[CSR] Write /wantvip and u will see how get VIP and VIP privilegies.")
}

public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -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_LEVEL_H)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s VIP 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, "No VIP 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()
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1063\\ f0\\ fs16 \n\\ par }
*/

| Afiseaza codul
/*
CREDITE:
ConnorMcLeod - pentru bullet damage
*/

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

// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[SERVERUL_TAU]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "O ADRESA DE CONTACT";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("t"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------

#define PLUGIN_NAME "VIP System"
#define PLUGIN_NAME_PAUSED "VIP System [OPRIT]"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YONTU"

#define is_user_valid(%1) (1 <= %1 <= max_players)

enum cvars
{
hp_spawn = 0,
ap_spawn,
hp_kill,
hp_hs,
hp_max,
money_kill,
money_hs,
show_vip_tab,
show_bullet_dmg,
}

new cvar[cvars], rounds = 0;
new max_players;
new g_iPlayerPos[33], g_iPlayerCol[33];

// NU SCHIMBA
new const Float:g_flCoords[][] =
{
{0.50, 0.40},
{0.56, 0.44},
{0.60, 0.50},
{0.56, 0.56},
{0.50, 0.60},
{0.44, 0.56},
{0.40, 0.50},
{0.44, 0.44}
}

// NU SCHIMBA VALORILE DEJA EXISTENTE. Poti adauga mai multe culori, respectand matricea
new const g_iColors[][] =
{
{0, 127, 255}, // blue
{255, 127, 0}, // orange
{127, 0, 255}, // purple
{255, 0, 0}, // red
{255, 100, 150}, // pink
{0, 255, 0} // green
}

public plugin_init()
{
new path[64];
get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path, charsmax(path), "%s/vip_maps.ini", path);

new file = fopen(path, "r+");

if(!file_exists(path))
{
write_file(path, "; VIP-UL ESTE DEZACTIVAT PE URMATOARELE HARTI: ");
write_file(path, "; Exemplu de adaugare HARTA:^n; ^"harta^"^n^nfy_snow^ncss_bycastor");
}

new mapname[32];
get_mapname(mapname, charsmax(mapname));

new text[121], maptext[32], bool:remove_vip = false;
while(!feof(file))
{
fgets(file, text, charsmax(text));
trim(text);

if(text[0] == ';' || !strlen(text))
{
continue;
}

parse(text, maptext, charsmax(maptext));

if(equal(maptext, mapname))
{
log_amx("Am dezactivat pluginul 'VIP' pe harta %s.", maptext);
remove_vip = true;
break;
}

}
fclose(file);

if(!remove_vip)
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_event("DeathMsg", "event_DeathMsg", "a");
register_event("Damage", "event_Damage", "b", "2>0", "3=0");
register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
register_event("TextMsg", "event_textmsg", "a", "2=#Game_will_restart_in")

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);

register_message(get_user_msgid("ScoreAttrib"), "msg_ScoreAttrib");

register_clcmd("say /vips", "CmdVipsOnline");
register_clcmd("say_team /vips", "CmdVipsOnline");
register_clcmd("say vips", "CmdVipsOnline");
register_clcmd("say_team vips", "CmdVipsOnline");

register_clcmd("say wantvip", "CmdPrintAttributes");
register_clcmd("say_team wantvip", "CmdPrintAttributes");
register_clcmd("say /wantvip", "CmdPrintAttributes");
register_clcmd("say_team /wantvip", "CmdPrintAttributes");

cvar[hp_spawn] = register_cvar("vip_hp_spawn", "100"); // 0 = dezactivat
cvar[ap_spawn] = register_cvar("vip_ap_spawn", "100"); // 0 = dezactivat
cvar[show_vip_tab] = register_cvar("vip_show_tab", "1"); // 0 = dezactivat
cvar[show_bullet_dmg] = register_cvar("vip_show_bullet_dmg", "1"); // 0 = dezactivat
cvar[hp_kill] = register_cvar("vip_hp_kill", "5"); // 0 = dezactivat
cvar[hp_hs] = register_cvar("vip_hp_hs", "10"); // 0 = dezactivat
cvar[hp_max] = register_cvar("vip_hp_max", "100"); // 0 = viata infinita
cvar[money_kill] = register_cvar("vip_money_kill", "150"); // 0 = dezactivat
cvar[money_hs] = register_cvar("vip_money_hs", "300"); // 0 = dezactivat

max_players = get_maxplayers();
}
else
{
register_plugin(PLUGIN_NAME_PAUSED, PLUGIN_VERSION, PLUGIN_AUTHOR);
pause("ade");
}

register_cvar("vip_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
set_cvar_string("vip_", PLUGIN_VERSION);
}

public CmdVipsOnline(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

new adminnames[33][32], message[256], i, count, len;
len = format(message, charsmax(message), "!4%s!3 VIPS ONLINE: ", TAG);
for(i = 1 ; i <= max_players; i++)
{
if(is_user_connected(i) && is_user_vip(i))
get_user_name(i, adminnames[count++], charsmax(adminnames[]));
}
ColorChat(id, "!4%s!1 CONTACT OWNER:!3 %s", TAG, CONTACT);
if(count > 0)
{
for(i = 0; i < count; i++)
{
len += format(message[len], 255 -len, "!4%s!1%s ", adminnames[i], i < (count -1) ? " | " : "");
}
ColorChat(id, message);
}
else
{
len += format(message[len], 255 -len, "!4No one !")
ColorChat(id, message);
}

return PLUGIN_CONTINUE;
}

public CmdPrintAttributes(id)
{
if(!is_user_connected(id)) return;
show_motd(id, "vip.txt", "Beneficii VIP");
}

public event_DeathMsg()
{
new killer = read_data(1), hs = read_data(3);
if(is_user_alive(killer) && is_user_vip(killer))
{
if(killer == read_data(2)) return PLUGIN_HANDLED;

new cache = hs ? get_pcvar_num(cvar[hp_hs]) : get_pcvar_num(cvar[hp_kill]);
if(cache != 0) set_user_health(killer, min(get_user_health(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[money_hs]) : get_pcvar_num(cvar[money_kill]);
if(cache != 0) cs_set_user_money(killer, min(cs_get_user_money(killer) + cache, 16000));

static g_msg_screenfade = 0;
if(!g_msg_screenfade)
g_msg_screenfade = get_user_msgid("ScreenFade");

message_begin(MSG_ONE_UNRELIABLE, g_msg_screenfade, _, killer);
write_short(6<<10); // duration
write_short(5<<10); // hold time
write_short(1<<12); // fade type
write_byte(1); // r
write_byte(1); // g
write_byte(random(255)); // b
write_byte(100); // a
message_end();
}

return PLUGIN_CONTINUE;
}

public event_Damage(victim)
{
if(!get_pcvar_num(cvar[show_bullet_dmg]))
return PLUGIN_CONTINUE;

new id = get_user_attacker(victim);
if(is_user_valid(id))
{
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_HANDLED;

if(read_data(4) || read_data(5) || read_data(6))
{
new iPos = ++g_iPlayerPos[id];
if(iPos == sizeof(g_flCoords))
iPos = g_iPlayerPos[id] = 0;

new iCol = ++g_iPlayerCol[id];
if(iCol == sizeof(g_iColors))
iCol = g_iPlayerCol[id] = 0;

set_hudmessage(g_iColors[iCol][0], g_iColors[iCol][1], g_iColors[iCol][2], Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1);
show_hudmessage(id, "%d", read_data(2));
}
}

return PLUGIN_CONTINUE;
}

public event_NewRound()
{
rounds++;
}

public event_textmsg()
{
rounds = 0;
}

public fw_PlayerSpawnPost(id)
{
if(is_user_vip(id) && is_user_alive(id))
{
set_task(0.25, "give_items", id + 212);
return HAM_IGNORED;
}

return HAM_IGNORED;
}

public give_items(taskid)
{
new id = taskid - 212;
if(!is_user_alive(id))
return;

new cache = get_pcvar_num(cvar[hp_spawn])
if(cache != 0) set_user_health(id, cache);

cache = get_pcvar_num(cvar[ap_spawn]);
if(cache != 0) cs_set_user_armor(id, cache, CS_ARMOR_VESTHELM);

if(rounds >= 3) ShowVipMenu(id);
}

public msg_ScoreAttrib(msgid, dest, id)
{
if(!get_pcvar_num(cvar[show_vip_tab]))
return PLUGIN_CONTINUE;

new id = get_msg_arg_int(1);
if(is_user_connected(id) && is_user_vip(id))
set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? (1<<2) : (1<<0));

return PLUGIN_CONTINUE;
}

public ShowVipMenu(id)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED;

if(!is_user_vip(id))
{
ColorChat(id, "!4%s!1 Imi pare rau, dar nu ai acces la meniul pentru!3 membrii VIP!1.", TAG);
ColorChat(id, "!4%s!1 Poti cumpara VIP, contactand adresa Y!M:!3 %s!1.", TAG, CONTACT);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
drop_weapons(id, 2);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
give_item(id, "item_thighpack");

static menu;
menu = menu_create("\rMeniu VIP", "VipMenuHandler");
menu_additem(menu, "M4A1 + Deagle + Echipament", "1");
menu_additem(menu, "AK-47 + Deagle + Echipament", "2");

static CsTeams:echipa;
if(echipa == CS_TEAM_CT)
menu_additem(menu, "Famas +Deagle + Echipament", "3");
else
menu_additem(menu, "Galil + Deagle + Echipament", "3");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);

return PLUGIN_CONTINUE;
}

public VipMenuHandler(id, menu, item)
{
if(!is_user_connected(id) || item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
drop_weapons(id, 1);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 120);

ColorChat(id, "!4%s!1 Ai ales!3 M4A1!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}
case 1:
{
drop_weapons(id, 1);
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 120);

ColorChat(id, "!4%s!1 Ai ales!3 AK47!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG);
}
case 2:
{
drop_weapons(id, 1);

static CsTeams:echipa;
if(echipa == CS_TEAM_CT)
{
give_item(id, "weapon_famas");
cs_set_user_bpammo(id, CSW_FAMAS, 90);
}
else
{
give_item(id, "weapon_galil");
cs_set_user_bpammo(id, CSW_GALIL, 90);
}

ColorChat(id, "!4%s!1 Ai ales!3 %s!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !32 FB!1).", TAG, echipa == CS_TEAM_CT ? "Famas" : "Galil");
}
}

menu_destroy(menu);
return PLUGIN_HANDLED;
}

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

// Drop primary/secondary weapons
stock drop_weapons(id, dropwhat)
{
// Get user weapons
static weapons[32], num, i, weaponid, wname[32];
num = 0; // reset passed weapons count (bugfix)
get_user_weapons(id, weapons, num);

// Loop through them and drop primaries or secondaries
for (i = 0; i < num; i++)
{
// Prevent re-indexing the array
weaponid = weapons[i];

if((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
{
// Get weapon entity
get_weaponname(weaponid, wname, charsmax(wname));
engclient_cmd(id, "drop", wname);
}
}
}

stock ColorChat(id, String[], any:...)
{
static szMesage[192];
vformat(szMesage, charsmax(szMesage), String, 3);

replace_all(szMesage, charsmax(szMesage), "!1", "^1");
replace_all(szMesage, charsmax(szMesage), "!3", "^3");
replace_all(szMesage, charsmax(szMesage), "!4", "^4");

static g_msg_SayText = 0;
if(!g_msg_SayText)
g_msg_SayText = get_user_msgid("SayText");

new Players[32], iNum = 1, i;

if(id) Players[0] = id;
else get_players(Players, iNum, "ch");

for(--iNum; iNum >= 0; iNum--)
{
i = Players[iNum];

message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
write_byte(i);
write_string(szMesage);
message_end();
}
}

1. pluginul are cvar-uri, le modifici dupa bunul plac (valoarea 0 la cvar-uri inseamnca dezactivarea lui)
2. in configs se va creea un fisier numit vip_maps.ini; in fisierul ala treci hartile unde pluginul de vip va fi dezactivat
3. comenzi | Afiseaza codul
vips - arata vip-ii online in chat
wantvip - deschide un fisier vip.txt (fisierul il pui in folderul cstrike) cu benefii vip (fisierul ti-l creezi tu)

4. intri in sursa, cauti liniile de mai jos si le modifici dupa bunul tau plac:
| Afiseaza codul
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[SERVERUL_TAU]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "O ADRESA DE CONTACT";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("t"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------


pentru orice nelamuriri, lasi replay mai jos


Man Sa-ti dea dumnezeu sanatate , este belea pluginul , imi place maxim.
dar totusi te rog sa-i faci 2 corectii.
1.cand se spameaza runda noua cumpara automat deagle , si as dorii sa nu se mai intample asta
2. La CT la 3. scrie Galil si se cumpara Galil in loc sa scrie Famas si sa se cumpere Famas.
Poti corecta plzzz.
In rest pluginul este cu mult peste asteptarile mele !
Multumesc !


Last edited by YONTU on 08 Sep 2018 12:26, edited 1 time in total.

rezolvat



07 Sep 2018 03:20
Profile multumesc
Membru, skill 0
Membru, skill 0

Joined: 07 Jan 2017 00:23
Posts: 42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
mxtrike wrote:
NICK: mxtrike
CERINTE VIP:

- Flag R
- Spawn hp / ap ( setari cvar )
- DMG marit ( setari cvar )
- Regen hp + ap la kill normal / hs / knife ( setari cvar )
- HP Maxim la regen 100 hp ( sau pe cvar )
- Bani pe kill (setari cvar)
- Restrictie pe anumite harti ( daca se poate cu fisier .ini pentru a pune hartile )
- Reset deaths ( /rd )
- Modele CT / T pe cvar on off
- Mesaj la conectare in chat
- VIP in scoreboard
- Event VIP de la ora 22 la 10 cu mesaj hud unde o fi ca ii modific eu pozitia daca e ( dar sa fie si pentru adminii care nu au vip ca stiu ca e o problema cu vip eventu)
- Comanda /vips si /vreauvip sau /wantvip



As vrea sa mai adaug aici dacă îmi mai poți adaugă atunci când se activeaza eventul sa schimbe harta pe una setată de mine .


09 Sep 2018 14:35
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 12 Jan 2011 01:33
Posts: 37
Location: Constanta
Detinator Steam: Da
CS Status: I`m fine .
Detinator server CS: Da
SteamID: madfather_go
Fond eXtream: 0
mxtrike wrote:
mxtrike wrote:
NICK: mxtrike
CERINTE VIP:

- Flag R
- Spawn hp / ap ( setari cvar )
- DMG marit ( setari cvar )
- Regen hp + ap la kill normal / hs / knife ( setari cvar )
- HP Maxim la regen 100 hp ( sau pe cvar )
- Bani pe kill (setari cvar)
- Restrictie pe anumite harti ( daca se poate cu fisier .ini pentru a pune hartile )
- Reset deaths ( /rd )
- Modele CT / T pe cvar on off
- Mesaj la conectare in chat
- VIP in scoreboard
- Event VIP de la ora 22 la 10 cu mesaj hud unde o fi ca ii modific eu pozitia daca e ( dar sa fie si pentru adminii care nu au vip ca stiu ca e o problema cu vip eventu)
- Comanda /vips si /vreauvip sau /wantvip



As vrea sa mai adaug aici dacă îmi mai poți adaugă atunci când se activeaza eventul sa schimbe harta pe una setată de mine .

Hai ca nu mai e mult pana in 2019, poate atunci iti face si tie pluginul .

_________________
RESPAWN.HELLGODS.COM - NPC/XP/LEVEL/CSGO SKINS/CSO CUSTOMS/SHOP
HELLGODS.COM


10 Sep 2018 09:26
Profile multumesc WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2848
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
mxtrike wrote:
mxtrike wrote:
NICK: mxtrike
CERINTE VIP:

- Flag R
- Spawn hp / ap ( setari cvar )
- DMG marit ( setari cvar )
- Regen hp + ap la kill normal / hs / knife ( setari cvar )
- HP Maxim la regen 100 hp ( sau pe cvar )
- Bani pe kill (setari cvar)
- Restrictie pe anumite harti ( daca se poate cu fisier .ini pentru a pune hartile )
- Reset deaths ( /rd )
- Modele CT / T pe cvar on off
- Mesaj la conectare in chat
- VIP in scoreboard
- Event VIP de la ora 22 la 10 cu mesaj hud unde o fi ca ii modific eu pozitia daca e ( dar sa fie si pentru adminii care nu au vip ca stiu ca e o problema cu vip eventu)
- Comanda /vips si /vreauvip sau /wantvip



As vrea sa mai adaug aici dacă îmi mai poți adaugă atunci când se activeaza eventul sa schimbe harta pe una setată de mine .

| Afiseaza codul
/*
CREDITE:
ConnorMcLeod - pentru bullet damage
twistedeuphoria - pentru multi jump
*/

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

// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[SERVERUL_TAU]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "O ADRESA DE CONTACT";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("r"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------

#define PLUGIN_NAME "VIP System"
#define PLUGIN_NAME_PAUSED "VIP System [OPRIT]"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YONTU"

#define is_user_valid(%1) (1 <= %1 <= max_players)

enum cvars
{
hp_spawn = 0,
ap_spawn,
hp_kill,
hp_hs,
ap_kill,
ap_hs,
hp_max,
money_kill,
money_hs,
show_vip_tab,
show_bullet_dmg,
multi_jump,
damage,
}

new cvar[cvars];
new max_players;
new bool:g_bJump[33] = false, g_JumpNum[33] = 0;
new g_iPlayerPos[33], g_iPlayerCol[33];

// NU SCHIMBA
new const Float:g_flCoords[][] =
{
{0.50, 0.40},
{0.56, 0.44},
{0.60, 0.50},
{0.56, 0.56},
{0.50, 0.60},
{0.44, 0.56},
{0.40, 0.50},
{0.44, 0.44}
}

// NU SCHIMBA VALORILE DEJA EXISTENTE. Poti adauga mai multe culori, respectand matricea
new const g_iColors[][] =
{
{0, 127, 255}, // blue
{255, 127, 0}, // orange
{127, 0, 255}, // purple
{255, 0, 0}, // red
{255, 100, 150}, // pink
{0, 255, 0} // green
}

public plugin_init()
{
new path[64];
get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path, charsmax(path), "%s/vip_maps.ini", path);

new file = fopen(path, "r+");

if(!file_exists(path))
{
write_file(path, "; VIP-UL ESTE DEZACTIVAT PE URMATOARELE HARTI: ");
write_file(path, "; Exemplu de adaugare HARTA:^n; ^"harta^"^n^nfy_snow^ncss_bycastor");
}

new mapname[32];
get_mapname(mapname, charsmax(mapname));

new text[121], maptext[32], bool:remove_vip = false;
while(!feof(file))
{
fgets(file, text, charsmax(text));
trim(text);

if(text[0] == ';' || !strlen(text))
{
continue;
}

parse(text, maptext, charsmax(maptext));

if(equal(maptext, mapname))
{
log_amx("Am dezactivat pluginul 'VIP' pe harta %s.", maptext);
remove_vip = true;
break;
}

}
fclose(file);

if(!remove_vip)
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

register_event("DeathMsg", "event_DeathMsg", "a");
register_event("Damage", "event_Damage", "b", "2>0", "3=0");

RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamagePre");

register_message(get_user_msgid("ScoreAttrib"), "msg_ScoreAttrib");

register_clcmd("say /vips", "CmdVipsOnline");
register_clcmd("say_team /vips", "CmdVipsOnline");
register_clcmd("say vips", "CmdVipsOnline");
register_clcmd("say_team vips", "CmdVipsOnline");

register_clcmd("say vreauvip", "CmdPrintAttributes");
register_clcmd("say_team vreauvip", "CmdPrintAttributes");
register_clcmd("say /vreauvip", "CmdPrintAttributes");
register_clcmd("say_team /vreauvip", "CmdPrintAttributes");

register_clcmd("say /rd", "CmdResetDeaths");
register_clcmd("say_team /rd", "CmdResetDeaths");
register_clcmd("say rd", "CmdResetDeaths");
register_clcmd("say_team rd", "CmdResetDeaths");

cvar[hp_spawn] = register_cvar("vip_hp_spawn", "100"); // 0 = dezactivat
cvar[ap_spawn] = register_cvar("vip_ap_spawn", "100"); // 0 = dezactivat
cvar[show_vip_tab] = register_cvar("vip_show_tab", "1"); // 0 = dezactivat
cvar[show_bullet_dmg] = register_cvar("vip_show_bullet_dmg", "1"); // 0 = dezactivat
cvar[multi_jump] = register_cvar("vip_multijump", "1"); // 0 = dezactivat. Daca valoarea cvar-ului este 1, vei sari de 2 ori. Orice valoare pui, va fi +1 jump
cvar[hp_kill] = register_cvar("vip_hp_kill", "5"); // 0 = dezactivat
cvar[hp_hs] = register_cvar("vip_hp_hs", "10"); // 0 = dezactivat
cvar[ap_kill] = register_cvar("vip_ap_kill", "5"); // 0 = dezactivat
cvar[ap_hs] = register_cvar("vip_ap_hs", "10"); // 0 = dezactivat
cvar[hp_max] = register_cvar("vip_hp_max", "100"); // 0 = viata infinita
cvar[money_kill] = register_cvar("vip_money_kill", "150"); // 0 = dezactivat
cvar[money_hs] = register_cvar("vip_money_hs", "300"); // 0 = dezactivat
cvar[damage] = register_cvar("vip_damage", "50"); // 0 = dezactivat | 50 = 50% mai mult (e doar un exemplu)

max_players = get_maxplayers();
}
else
{
register_plugin(PLUGIN_NAME_PAUSED, PLUGIN_VERSION, PLUGIN_AUTHOR);
pause("ade");
}

register_cvar("vip_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
set_cvar_string("vip_", PLUGIN_VERSION);
}

public client_putinserver(id)
{
g_JumpNum[id] = 0;
g_bJump[id] = false;

if(is_user_vip(id))
{
new nume[32];
get_user_name(id, nume, charsmax(nume));

ColorChat(0, "!4****!1 VIP-ul!3 %s!1 s-a conectat pe server.", nume);
}
}

public CmdVipsOnline(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

new adminnames[33][32], message[512], i, count, len;
len = format(message, charsmax(message), "!4%s!3 VIPS ONLINE: ", TAG);
for(i = 1 ; i <= max_players; i++)
{
if(is_user_connected(i) && is_user_vip(i))
get_user_name(i, adminnames[count++], charsmax(adminnames[]));
}

if(count > 0)
{
for(i = 0; i < count; i++)
{
len += format(message[len], charsmax(message)-len, "!4%s!1%s ", adminnames[i], i < (count -1) ? " | " : "");
}
ColorChat(id, message);
}
else
{
len += format(message[len], charsmax(message)-len, "!4No one !")
ColorChat(id, message);
}
ColorChat(id, "!4%s!1 Contact OWNER:!3 %s", TAG, CONTACT);

return PLUGIN_CONTINUE;
}

public CmdPrintAttributes(id)
{
if(!is_user_connected(id)) return;
show_motd(id, "/addons/amxmodx/configs/vip.html", "Beneficii VIP");
}

public CmdResetDeaths(id)
{
if(!is_user_vip(id))
{
ColorChat(id, "!4%s!1 Doar membri!3 VIP!1 isi pot reseta decesele.", TAG);
return;
}
cs_set_user_deaths(id, 0);
cs_set_user_deaths(id, 0);
ColorChat(id, "!4%s!1 Ti-ai resetat cu succes toate decesele.", TAG);
}

public client_PreThink(id)
{
new cache = get_pcvar_num(cvar[multi_jump]);
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

new nbut = get_user_button(id);
new obut = get_user_oldbutton(id);

if(cache != 0)
{
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(g_JumpNum[id] < cache)
{
g_bJump[id] = true;
g_JumpNum[id]++;
return PLUGIN_CONTINUE;
}
}

if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
g_JumpNum[id] = 0;
return PLUGIN_CONTINUE;
}
}

return PLUGIN_CONTINUE;
}

public client_PostThink(id)
{
new jump_num = get_pcvar_num(cvar[multi_jump]);
if(!jump_num)
return PLUGIN_CONTINUE;

if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_CONTINUE;

if(g_bJump[id])
{
new Float:fVelocity[3];
entity_get_vector(id, EV_VEC_velocity, fVelocity);
fVelocity[2] = random_float(265.0, 285.0);
entity_set_vector(id, EV_VEC_velocity, fVelocity);

g_bJump[id] = false;
return PLUGIN_CONTINUE;
}

return PLUGIN_CONTINUE;
}

public event_DeathMsg()
{
new killer = read_data(1), hs = read_data(3);
if(is_user_alive(killer) && is_user_vip(killer))
{
if(killer == read_data(2)) return PLUGIN_HANDLED;

if(hs && !user_has_weapon(killer, CSW_HEGRENADE)) give_item(killer, "weapon_hegrenade");

new cache = hs ? get_pcvar_num(cvar[hp_hs]) : get_pcvar_num(cvar[hp_kill]);
if(cache != 0) set_user_health(killer, min(get_user_health(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[ap_hs]) : get_pcvar_num(cvar[ap_kill]);
if(cache != 0) set_user_armor(killer, min(get_user_armor(killer) + cache, get_pcvar_num(cvar[hp_max])));

cache = hs ? get_pcvar_num(cvar[money_hs]) : get_pcvar_num(cvar[money_kill]);
if(cache != 0) cs_set_user_money(killer, min(cs_get_user_money(killer) + cache, 16000));
}

return PLUGIN_CONTINUE;
}

public event_Damage(victim)
{
if(!get_pcvar_num(cvar[show_bullet_dmg]))
return PLUGIN_CONTINUE;

new id = get_user_attacker(victim);
if(is_user_valid(id))
{
if(is_user_alive(id) && !is_user_vip(id))
return PLUGIN_HANDLED;

if(read_data(4) || read_data(5) || read_data(6))
{
new iPos = ++g_iPlayerPos[id];
if(iPos == sizeof(g_flCoords))
iPos = g_iPlayerPos[id] = 0;

new iCol = ++g_iPlayerCol[id];
if(iCol == sizeof(g_iColors))
iCol = g_iPlayerCol[id] = 0;

set_hudmessage(g_iColors[iCol][0], g_iColors[iCol][1], g_iColors[iCol][2], Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1);
show_hudmessage(id, "%d", read_data(2));
}
}

return PLUGIN_CONTINUE;
}

public fw_PlayerSpawnPost(id)
{
if(is_user_vip(id) && is_user_alive(id))
{
set_task(0.25, "give_items", id + 212);
return HAM_IGNORED;
}

return HAM_IGNORED;
}

public give_items(taskid)
{
new id = taskid - 212;
if(!is_user_alive(id))
return;

new cache = get_pcvar_num(cvar[hp_spawn])
if(cache != 0) set_user_health(id, cache);

cache = get_pcvar_num(cvar[ap_spawn]);
if(cache != 0) cs_set_user_armor(id, cache, CS_ARMOR_VESTHELM);
}

public fw_TakeDamagePre(victim, iInflictor, attacker, Float:fDamage, iDmgType)
{
if(victim == attacker)
return HAM_HANDLED;

if(is_user_valid(attacker) && is_user_vip(attacker) && is_user_alive(attacker))
{
new Float:Damage = float(get_pcvar_num(cvar[damage]) / 100);
if(Damage == 0.0)
return HAM_IGNORED;

Damage *= fDamage;
fDamage += Damage;

SetHamParamFloat(4, fDamage);
return HAM_HANDLED;
}

return HAM_IGNORED;
}

public msg_ScoreAttrib(msgid, dest, id)
{
if(!get_pcvar_num(cvar[show_vip_tab]))
return PLUGIN_CONTINUE;

new id = get_msg_arg_int(1);
if(is_user_connected(id) && is_user_vip(id))
set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? (1<<2) : (1<<0));

return PLUGIN_CONTINUE;
}

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

// Drop primary/secondary weapons
stock drop_weapons(id, dropwhat)
{
// Get user weapons
static weapons[32], num, i, weaponid, wname[32];
num = 0; // reset passed weapons count (bugfix)
get_user_weapons(id, weapons, num);

// Loop through them and drop primaries or secondaries
for (i = 0; i < num; i++)
{
// Prevent re-indexing the array
weaponid = weapons[i];

if((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
{
// Get weapon entity
get_weaponname(weaponid, wname, charsmax(wname));
engclient_cmd(id, "drop", wname);
}
}
}

stock ColorChat(id, String[], any:...)
{
static szMesage[192];
vformat(szMesage, charsmax(szMesage), String, 3);

replace_all(szMesage, charsmax(szMesage), "!1", "^1");
replace_all(szMesage, charsmax(szMesage), "!3", "^3");
replace_all(szMesage, charsmax(szMesage), "!4", "^4");

static g_msg_SayText = 0;
if(!g_msg_SayText)
g_msg_SayText = get_user_msgid("SayText");

new Players[32], iNum = 1, i;

if(id) Players[0] = id;
else get_players(Players, iNum, "ch");

for(--iNum; iNum >= 0; iNum--)
{
i = Players[iNum];

message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
write_byte(i);
write_string(szMesage);
message_end();
}
}


Aici ai pluginul. Am facut cum ai dorit. Pluginul are cvar-uri (presupun ca stii sa le modifici, daca nu lasa replay mai jos si te ajut), comenile precizate de tine si niste stringuri pe care le poti edita singur dupa bunul plac (acestea: )
| Afiseaza codul
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[SERVERUL_TAU]"; // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "O ADRESA DE CONTACT";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("r"))
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------


Pluginul de event il iei din primul topic.
Daca ai nelamuriri sau daca apar erori, lasi replay mai jos.

Legat de modele, sa fie cate un model de vip daca se afla la ct si unul la t sau acelasi model de vip la ambele echipe?


lycanian, te rog sa te abtii si sa comentezi in alta parte :) daca nu ai nicio legatura cu ce se intampla aici.
YONTU wrote:
Cererile pentru astfel de pluginuri sunt din ce in ce mai multe, asa ca m am decis sa va fac eu pe plac, daca nu va ajuta nimeni. Poate ca par plictisitoare ca sa fie concepute, eh, ma rog. Ceea ce trebuie sa faci este doar o simpla cerere in acest topic, iar eu o sa mi fac timp sa te ajut. Daca nu ti raspund azi, poate maine, nici maine, poate in alta zi, depinde de timpul meu liber.

Ca oricare om, am si eu pretentiile mele:
- nu veni cu cereri prostești, care n au nicio treaba cu limba romana, încearcă sa te exprimi cat mai bine, ca sa știu ce sa ti creez/modific
- da-mi detalii, cat mai multe legate de cerera ta, sunt foarte utile, crede-ma. Altfel spus, ma ajuta pe mine in implementare, dar te ajuta si pe tine, nu o sa ai erori pe viitor
- fara arme CSO sau kkturi de genul
- complica-ti sistemul cum vrei tu, eu o sa ti-l fac
- precizeaza si modul pe care vrei sa ruleze
- precizeaza flagul VIPului
Daca il vrei supra ultra mega ***,etc de complicat, putem rezolva si PM. Poate nu o sa fie cazul.
- nu ma sacai cu mesaje private, intrebandu-ma: "cat mai ai din plugin?" sau "este gata? " sau intrebari de genul. Asteapta, A avea rabdare este o virtute.
Fac asta din placere, timpul imi permite acum.

_________________
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș

Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage

Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
Creez pluginuri contra cost


12 Sep 2018 09:37
Profile multumesc YIM WWW
Online
Membru, skill +3
Membru, skill +3
User avatar

Joined: 20 May 2016 16:28
Posts: 1462
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: GO.TRIED.RO
Fond eXtream: 0
YONTU wrote:
@Jucks

done | Afiseaza codul
Code:
/*
CREDITE:
ConnorMcLeod - pentru bullet damage
twistedeuphoria - pentru multi jump
cheap_suit - cateva bucati de cod extrase din biohazard
*/

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

// --------------------------------------------
//   ------------- DE EDITAT ---------------
// --------------------------------------------
new const TAG[] = "[GO.T****.RO]";        // TAGUL IN CHAT CARE APARE
new const CONTACT[] = "costin.mihai50 [Skype]";

#define is_user_vip(%1) (get_user_flags(%1) & read_flags("t"))
// --------------------------------------------
//   ------------- DE EDITAT ---------------
// --------------------------------------------

#define PLUGIN_NAME "VIP System"
#define PLUGIN_NAME_PAUSED "VIP System [OPRIT]"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "YONTU"

#define is_user_valid(%1) (1 <= %1 <= max_players)

enum cvars
{
    hp_spawn = 0,
    ap_spawn,
    money_spawn,
    hp_kill,
    hp_hs,
    ap_kill,
    ap_hs,
    hp_max,
    money_kill,
    money_hs,
    show_vip_tab,
    show_bullet_dmg,
    multi_jump,
    noflash,
    sansa_respawn
}

new cvar[cvars], rounds = 0;
new max_players;
new bool:g_bJump[33] = false, g_JumpNum[33] = 0;
new g_iPlayerPos[33], g_iPlayerCol[33];

// NU SCHIMBA
new const Float:g_flCoords[][] =  
{ 
    
{0.50, 0.40}, 
    
{0.56, 0.44}, 
    
{0.60, 0.50}, 
    
{0.56, 0.56}, 
    
{0.50, 0.60}, 
    
{0.44, 0.56}, 
    
{0.40, 0.50}, 
    
{0.44, 0.44} 
}

// NU SCHIMBA VALORILE DEJA EXISTENTE. Poti adauga mai multe culori, respectand matricea
new const g_iColors[][] = 
{ 
    
{0, 127, 255}, // blue 
    {255, 127, 0}, // orange 
    {127, 0, 255}, // purple 
    {255, 0, 0}, // red 
    {255, 100, 150}, // pink
    {0, 255, 0} // green
}

public plugin_init()
{
    
    new path
[64];
    get_localinfo("amxx_configsdir", path, charsmax(path));
    formatex(path, charsmax(path), "%s/vip_maps.ini", path);
    
    new file 
= fopen(path, "r+");
    
    if
(!file_exists(path))
    {
        write_file(path, "; VIP-UL ESTE DEZACTIVAT PE URMATOARELE HARTI: ");
        write_file(path, "; Exemplu de adaugare HARTA:^n; ^"harta^"^n^nfy_snow^ncss_bycastor");
    }
    
    new mapname
[32];
    get_mapname(mapname, charsmax(mapname));
    
    new text
[121], maptext[32], bool:remove_vip = false;
    while(!feof(file))
    {
        fgets(file, text, charsmax(text));
        trim(text);
        
        if
(text[0] == ';' || !strlen(text)) 
        
{
            continue; 
        
}
        
        parse
(text, maptext, charsmax(maptext));
        
        if
(equal(maptext, mapname))
        {
            log_amx("Am dezactivat pluginul 'VIP' pe harta %s.", maptext);
            remove_vip = true;
            break;
        }
        
    
}
    fclose(file);
    
    if
(!remove_vip)
    {
        register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

        register_event("DeathMsg", "event_DeathMsg", "a");
        register_event("Damage", "event_Damage", "b", "2>0", "3=0");
        //register_event("CurWeapon", "event_CurWeapon", "be", "1=1");
        //register_event("WeapPickup", "event_WeapPickup", "b");
        register_event("HLTV", "event_NewRound", "a", "1=0", "2=0");
        register_event("TextMsg", "event_textmsg", "a", "2=#Game_will_restart_in")

        RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawnPost", 1);

        register_message(get_user_msgid("ScoreAttrib"), "msg_ScoreAttrib");
        register_message(get_user_msgid("ScreenFade"), "msg_ScreenFade");

        register_clcmd("say /vips", "CmdVipsOnline");
        register_clcmd("say_team /vips", "CmdVipsOnline");
        
        register_clcmd
("say /vip", "CmdPrintAttributes");
        register_clcmd("say_team /vip", "CmdPrintAttributes");

        cvar[hp_spawn] = register_cvar("vip_hp_spawn", "110");            // 0 = dezactivat
        cvar[ap_spawn] = register_cvar("vip_ap_spawn", "110");            // 0 = dezactivat
        cvar[money_spawn] = register_cvar("vip_money_spawn", "1000");        // 0 = dezactivat
        cvar[show_vip_tab] = register_cvar("vip_show_tab", "1");            // 0 = dezactivat
        cvar[show_bullet_dmg] = register_cvar("vip_show_bullet_dmg", "0");        // 0 = dezactivat
        cvar[multi_jump] = register_cvar("vip_multijump", "1");            // 0 = dezactivat. Daca valoarea cvar-ului este 1, vei sari de 2 ori. Orice valoare pui, va fi +1 jump
        cvar[hp_kill] = register_cvar("vip_hp_kill", "10");                // 0 = dezactivat
        cvar[hp_hs] = register_cvar("vip_hp_hs", "10");                // 0 = dezactivat
        cvar[ap_kill] = register_cvar("vip_ap_kill", "10");                // 0 = dezactivat
        cvar[ap_hs] = register_cvar("vip_ap_hs", "10");                // 0 = dezactivat
        cvar[hp_max] = register_cvar("vip_hp_max", "150");            // 0 = viata infinita
        cvar[money_kill] = register_cvar("vip_money_kill", "800");            // 0 = dezactivat
        cvar[money_hs] = register_cvar("vip_money_hs", "800");            // 0 = dezactivat
        cvar[noflash] = register_cvar("vip_noflash", "1");                // 0 = dezactivat
        cvar[sansa_respawn] = register_cvar("vip_sansa_respawn", "10");        // 0 = dezactivat | valoare cuprinsa intre [1 - 100] | 20 = 20% sansa respawn etc...

        max_players = get_maxplayers();
    }
    else
    
{
        register_plugin(PLUGIN_NAME_PAUSED, PLUGIN_VERSION, PLUGIN_AUTHOR);
        pause("ade");
    }
    
    register_cvar
("vip_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
    set_cvar_string("vip_", PLUGIN_VERSION);
}

public client_putinserver(id)
{
    g_JumpNum[id] = 0;
    g_bJump[id] = false;
}

public CmdVipsOnline(id)
{
    if(!is_user_connected(id))
        return PLUGIN_CONTINUE;

    new adminnames[33][32], message[256], i, count, len;
    len = format(message, charsmax(message), "!4%s!3 VIPS ONLINE: ", TAG);
    for(= 1 ; i <= max_players; i++)
    {
        if(is_user_connected(i) && is_user_vip(i))
            get_user_name(i, adminnames[count++], charsmax(adminnames[]));
    }
    
    if
(count > 0)
    {
        for(= 0; i < count; i++)
        {
            len += format(message[len], 255 -len, "!4%s!1%s ", adminnames[i], i < (count -1) ? " | " : "");
        }
        ColorChat(id, message);
    }
    else
    
{
        len += format(message[len], 255 -len, "!4No one !")
        ColorChat(id, message);
    }

    return PLUGIN_CONTINUE;
}

public CmdPrintAttributes(id)
{
    if(!is_user_connected(id)) return;
    show_motd(id, "vip.html", "Beneficii VIP");
}

public client_PreThink(id)
{
    new cache = get_pcvar_num(cvar[multi_jump]);
    if(is_user_alive(id) && !is_user_vip(id))
        return PLUGIN_CONTINUE;

    new nbut = get_user_button(id);
    new obut = get_user_oldbutton(id);

    if(cache != 0)
    {    
        if
((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
        {
            if(g_JumpNum[id] < cache)
            {
                g_bJump[id] = true;
                g_JumpNum[id]++;
                return PLUGIN_CONTINUE;
            }
        }
    
        if
((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
        {
            g_JumpNum[id] = 0;
            return PLUGIN_CONTINUE;
        }
    }
    return PLUGIN_CONTINUE;
}

public client_PostThink(id)
{
    new jump_num = get_pcvar_num(cvar[multi_jump]);
    if(!jump_num)
        return PLUGIN_CONTINUE;
        
    if
(is_user_alive(id) && !is_user_vip(id))
        return PLUGIN_CONTINUE;
    
    if
(g_bJump[id])
    {
        new Float:fVelocity[3];
        entity_get_vector(id, EV_VEC_velocity, fVelocity);
        fVelocity[2] = random_float(265.0, 285.0);
        entity_set_vector(id, EV_VEC_velocity, fVelocity);
        
        g_bJump
[id] = false;
        return PLUGIN_CONTINUE;
    }
    
    return PLUGIN_CONTINUE
;
}

public event_DeathMsg()
{
    new killer = read_data(1), victim = read_data(2), hs = read_data(3), cache;    
    if
(is_user_alive(killer) && is_user_vip(killer))
    {
        if(killer == victim) return PLUGIN_HANDLED;

        cache = hs ? get_pcvar_num(cvar[hp_hs]) : get_pcvar_num(cvar[hp_kill]);
        if(cache != 0) set_user_health(killer, min(get_user_health(killer) + cache, get_pcvar_num(cvar[hp_max])));

        cache = hs ? get_pcvar_num(cvar[ap_hs]) : get_pcvar_num(cvar[ap_kill]);
        if(cache != 0) set_user_armor(killer, min(get_user_armor(killer) + cache, get_pcvar_num(cvar[hp_max])));

        cache = hs ? get_pcvar_num(cvar[money_hs]) : get_pcvar_num(cvar[money_kill]);
        if(cache != 0) cs_set_user_money(killer, min(cs_get_user_money(killer) + cache, 16000));

        static g_msg_screenfade = 0;
        if(!g_msg_screenfade)
            g_msg_screenfade = get_user_msgid("ScreenFade");

        //0x2^0 + 0x2^1 + 0x2^2 + 0x2^3 + 0x2^4 + 0x2^5 + 1x2^6
        message_begin(MSG_ONE_UNRELIABLE, g_msg_screenfade, _, killer);
        write_short(floatround(4096.0 * 0.5, floatround_round));        // duration
        write_short(floatround(4096.0 * 0.5, floatround_round));        // hold time
        write_short(0x0001);        // fade type
        write_byte(0);        // r
        write_byte(0);        // g
        write_byte(125);    // b
        write_byte(120);        // a
        message_end();
    }

    if(is_user_vip(victim) && is_user_alive(killer))
    {
        cache = get_pcvar_num(cvar[sansa_respawn]);
        if(cache != 0)
        {
            new sansa = random_num(1, 100);
            sansa = (sansa <= cache) ? 1 : 0;
            if(sansa) set_task(1.0, "task_respawn", victim + 3910);
        }
    }

    return PLUGIN_CONTINUE;
}

public task_respawn(victim)
{
    victim -= 3910;
    if(!is_user_connected(victim))
        return;
    if(is_user_alive(victim))
        return;
    if(!is_user_vip(victim))
        return;

    ExecuteHamB(Ham_CS_RoundRespawn, victim);
    ColorChat(victim, "!3%s!1 Ai primit!4 Respawn!1 in aceasta runda !!! Mult noroc.", TAG);
}

public event_Damage(victim)
{
    if(!get_pcvar_num(cvar[show_bullet_dmg]))
        return PLUGIN_CONTINUE;
        
    new id 
= get_user_attacker(victim);
    if(is_user_valid(id))
    {
        if(is_user_alive(id) && !is_user_vip(id))
            return PLUGIN_HANDLED;
        
        if
(read_data(4) || read_data(5) || read_data(6))
        {        
            new iPos 
= ++g_iPlayerPos[id];
            if(iPos == sizeof(g_flCoords))
                iPos = g_iPlayerPos[id] = 0;
            
            new iCol 
= ++g_iPlayerCol[id];
            if(iCol == sizeof(g_iColors))
                iCol = g_iPlayerCol[id] = 0;
            
            set_hudmessage
(g_iColors[iCol][0], g_iColors[iCol][1], g_iColors[iCol][2], Float:g_flCoords[iPos][0], Float:g_flCoords[iPos][1], 0, 0.1, 2.5, 0.02, 0.02, -1);
            show_hudmessage(id, "%d", read_data(2));
        }
    }
    
    return PLUGIN_CONTINUE
;
}

public event_NewRound()
{
    rounds++;
}

public event_textmsg()
{
    rounds = 0;
}

public fw_PlayerSpawnPost(id)
{
    if(is_user_vip(id) && is_user_alive(id))
    {
        set_task(0.25, "give_items", id + 212);
        return HAM_IGNORED;
    }
    
    return HAM_IGNORED
;
}

public give_items(taskid)
{
    new id = taskid - 212;
    if(!is_user_alive(id))
        return;

    new cache = get_pcvar_num(cvar[hp_spawn])
    if(cache != 0) set_user_health(id, cache);

    cache = get_pcvar_num(cvar[ap_spawn]);
    if(cache != 0) cs_set_user_armor(id, cache, CS_ARMOR_VESTHELM);

    cache = get_pcvar_num(cvar[money_spawn]);
    if(cache != 0) cs_set_user_money(id, min(cs_get_user_money(id) + cache, 16000));

    // meniu disponibil doar dupa ce trec 3 runde, adica din a 4a va fi disponibil
    if(rounds >= 4) ShowVipMenu(id);
}

public msg_ScoreAttrib(msgid, dest, id)
{
    if(!get_pcvar_num(cvar[show_vip_tab]))
        return PLUGIN_CONTINUE;
        
    new id 
= get_msg_arg_int(1);
    if(is_user_connected(id) && is_user_vip(id))
        set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? (1<<2) : (1<<0));
    
    return PLUGIN_CONTINUE
;
}

public msg_ScreenFade(msgid, dest, id)
{
    if(!get_pcvar_num(cvar[noflash]))
        return PLUGIN_HANDLED;

    if(is_user_connected(id) && is_user_vip(id))
    {
        static data[4];
        data[0] = get_msg_arg_int(4);
        data[1] = get_msg_arg_int(5);
        data[2] = get_msg_arg_int(6);
        data[3] = get_msg_arg_int(7);
        
        if
(data[0] == 255 && data[1] == 255 && data[2] == 255 && data[3] > 199)
            return PLUGIN_HANDLED;
    }

    return PLUGIN_CONTINUE;
}

public ShowVipMenu(id)
{
    if(!is_user_connected(id))
        return PLUGIN_HANDLED;

    if(!is_user_vip(id))
    {
        ColorChat(id, "!4%s!1 Imi pare rau, dar nu ai acces la meniul pentru!3 membrii VIP!1.", TAG);
        ColorChat(id, "!4%s!1 Poti cumpara VIP, contactand adresa Y!M:!3 %s!1.", TAG, CONTACT);
        return PLUGIN_HANDLED;
    }

    give_item(id, "weapon_hegrenade");
    give_item(id, "weapon_flashbang");
    drop_weapons(id, 2);
    give_item(id, "weapon_deagle");
    cs_set_user_bpammo(id, CSW_DEAGLE, 35);

    new menu = menu_create("\rMeniu VIP", "VipMenuHandler");
    menu_additem(menu, "Vreau \yM4A1 + Deagle", "1");
    menu_additem(menu, "Vreau \yAK-47 + Deagle", "2");
    menu_additem(menu, "Vreau \yAWP + Deagle", "3");
    
    menu_setprop
(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);
    
    return PLUGIN_CONTINUE
;
}

public VipMenuHandler(id, menu, item)
{
    if(!is_user_connected(id) || item == MENU_EXIT)
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }

    switch(item)
    {
        case 0:
        {
            drop_weapons(id, 1);
            give_item(id, "weapon_m4a1");
            cs_set_user_bpammo(id, CSW_M4A1, 120);
            
            ColorChat
(id, "!4%s!1 Ai ales!3 M4A1!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !31 FB!1).", TAG);
        }
        case 1:
        {
            drop_weapons(id, 1);
            give_item(id, "weapon_ak47");
            cs_set_user_bpammo(id, CSW_AK47, 120);
            
            ColorChat
(id, "!4%s!1 Ai ales!3 AK47!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !31 FB!1).", TAG);
        }
        case 2:
        {
            drop_weapons(id, 1);
            give_item(id, "weapon_awp");
            cs_set_user_bpammo(id, CSW_AWP, 30);
            
            ColorChat
(id, "!4%s!1 Ai ales!3 AWP!1 +!3 Deagle!1 +!3 Set grenade!1 (!31 HE!1 + !31 FB!1).", TAG);
        }
    }

    menu_destroy(menu);
    return PLUGIN_HANDLED;
}

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

// Drop primary/secondary weapons
stock drop_weapons(id, dropwhat)
{
    // Get user weapons
    static weapons[32], num, i, weaponid, wname[32];
    num = 0; // reset passed weapons count (bugfix)
    get_user_weapons(id, weapons, num);
    
    
// Loop through them and drop primaries or secondaries
    for (= 0; i < num; i++)
    {
        // Prevent re-indexing the array
        weaponid = weapons[i];
        
        if
((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
        {
            // Get weapon entity
            get_weaponname(weaponid, wname, charsmax(wname));
            engclient_cmd(id, "drop", wname);
        }
    }
}

stock ColorChat(id, String[], any:...) 
{
    static szMesage[192];
    vformat(szMesage, charsmax(szMesage), String, 3);
    
    replace_all
(szMesage, charsmax(szMesage), "!1", "^1");
    replace_all(szMesage, charsmax(szMesage), "!3", "^3");
    replace_all(szMesage, charsmax(szMesage), "!4", "^4");
    
    static g_msg_SayText 
= 0;
    if(!g_msg_SayText)
        g_msg_SayText = get_user_msgid("SayText");
    
    new Players
[32], iNum = 1, i;

     if(id) Players[0] = id;
    else get_players(Players, iNum, "ch");
    
    for
(--iNum; iNum >= 0; iNum--) 
    
{
        i = Players[iNum];
        
        message_begin
(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
        write_byte(i);
        write_string(szMesage);
        message_end();
    }
}



O sa revin cu sma si la restul cererilor pentru ceilalti utilizatori.

Am pus pe 0 noflash ul si tot am imiunitate la flash , si totusi l am dezactivat si din cvar...
+ in loc de noflash pune defuse kit sa primeasca automat la spawn , nu mai vreau noflash

_________________
Detinator : # Go.Tried.Ro #


Last edited by Jucks on 13 Sep 2018 20:48, edited 1 time in total.



12 Sep 2018 10:38
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0

Joined: 07 Jan 2017 00:23
Posts: 42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
YONTU wrote:
Legat de modele, sa fie cate un model de vip daca se afla la ct si unul la t sau acelasi model de vip la ambele echipe?



Da câte un model la fiecare echipa dar sa fie un cvar dacă vreau da le scot sa fie dezactivate

EDIT :

vip_damage "100"
Dabea la 100 creste damage si atunci prea mult.
la 50 nici nu se simte 50/60/70/80/90 am testat si nu creste dmg tot 35 cu deagle dau


12 Sep 2018 11:48
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 51 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: No registered users and 57 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group