It is currently 15 Aug 2018 02:45



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  [ 13 posts ]  Go to page 1, 2  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: 2817
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
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.
Fac asta din placere, timpul imi permite acum.

exemplu model cerere VIP | Afiseaza codul
NICK: XHSJSJS
CERINTE VIP:
Code:
- vreau ca vipul meu sa aiba la spawn 200 hp
- vreau etc..


exemplu editare plugin VIP | Afiseaza codul
NICK: DUSMSNBD
copiezi sursa pluginului pe care vrei sa ti l modific
MODIFICARI:
Code:
- vreau sa mi modifici aia
- scoate mi chestia aia
- etc





PLUGIN EVENT VIP
VIP EVENT | Afiseaza codul
#include <amxmodx>


//native is_user_vip(id);
//native set_user_vip(id, bool:value);


// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
#define VIP_FLAG ADMIN_LEVEL_H // t
new const TAG[] = "[VIPEVENT]";
#define is_user_vip(%1) (get_user_flags(%1) & VIP_FLAG)
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------



new g_msg_saytext, g_sync, cvar_freevip, g_maxplayers;
new vip_free = 0, cvar[2];

public plugin_init()
{
register_plugin("Vip Free", "4.0", "cyby");

set_task(60.0, "check_time", _, _, _, "b");
set_task(1.0, "hud_mess", _, _, _, "b");

cvar_freevip = register_cvar("vip_free", "0"); // nu modifici

// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------
cvar[0] = register_cvar("vip_inceput", "13");
cvar[1] = register_cvar("vip_sfarsit", "14");
// --------------------------------------------
// ------------- DE EDITAT ---------------
// --------------------------------------------

g_msg_saytext = get_user_msgid("SayText");
g_maxplayers = get_maxplayers();
g_sync = CreateHudSyncObj();
cached_vars();
set_task(1.0, "check_time");
}

public client_putinserver(id)
{
if(!vip_free)
return;

set_user_flags(id, VIP_FLAG);
}

public cached_vars()
vip_free = get_pcvar_num(cvar_freevip);

public check_time()
{
new o;
time(o, _, _);

if(!vip_free)
{
if(o >= get_pcvar_num(cvar[0]) && o < get_pcvar_num(cvar[1]))
{
vip_free = 1;
set_pcvar_num(cvar_freevip, 1);
color(0, ".v%s.g Eventul.e Free VIP.g a fost activat!", TAG);
for(new i = 1; i <= g_maxplayers; i++)
{
if(!is_user_connected(i))
continue;

set_user_flags(i, VIP_FLAG);
}
}
}
else
{
if(o < get_pcvar_num(cvar[0]) && o >= get_pcvar_num(cvar[1]))
{
vip_free = 0;
set_pcvar_num(cvar_freevip, 0);
color(0, ".v%s.g Eventul.e Free VIP.g a fost dezactivat!", TAG);
for(new i = 1; i <= g_maxplayers; i++)
{
if(!is_user_connected(i))
continue;

remove_user_flags(i, VIP_FLAG);
server_cmd("amx_reloadadmins");
}
}
}

// n-am csf, aia e
// daca apar erori, pune "//" in fata la linia de mai jos
server_cmd("amx_reloadadmins");
}

public hud_mess()
{
if(!vip_free)
return;

set_hudmessage(random(256), random(256), random(256), 0.00, 0.17, 0, 1.1, 1.0);
ShowSyncHudMsg(0, g_sync, "Event VIP GRATUIT ON !");

// metoda drastica dar n-am cf, sa mearga si la baietii ce au reload admins la 5 secunde sau la cine stie cat.
for(new i = 1; i <= g_maxplayers; i++)
{
if(!is_user_connected(i) || is_user_vip(i))
continue;

set_user_flags(i, VIP_FLAG);
}
}

stock color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, ".v", "^4")
replace_all(msg, 190, ".g", "^1")
replace_all(msg, 190, ".e", "^3")

if(id) players[0] = id; else get_players(players, count, "ch")
{
for(new i = 0; i < count; i++)
{
if(is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, g_msg_saytext, _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

_________________
„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! PM ME!

[AMXX] LEVEL MOD PUBLIC [In faza de testare]


04 Aug 2018 18:03
Profile multumesc YIM WWW
Membru, skill +1
Membru, skill +1
User avatar

Joined: 23 Mar 2016 12:08
Posts: 107
Location: Iasi
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: MARVEL.RANGFORT.RO
SteamID: brick_bazuka001
Fond eXtream: 0
Nick : bRiCk-baZuka
Server Name : MARVEL.CSMANIA.RO
Mod Server : CSGO Remake.
Cerinte : Plugin VIP
Flag : bit
Beneficii VIP :

-HP : 15 la frag normal ,30 la hs + un he free ( sa nu poate detine mai mult de 1he odata )
-AP : 15 la frag normal ,30 la hs
-150 $ bonus la frag normal ,maxim 16000 $
-300 $ bonus la hs
-Parasuta doar pentru membrii VIP
-Doble Jump doar pentru membrii VIP
-Sa nu creasca / depaseasca viata mai mult de 100
-Sa poata sa foloseasca admin chat
-ViP-ul sa fie imun la flash-uri
-AWP-ul sa fie doar pentru vip ,Sa primeasca drop daca un alt jucator ridica awp de jos si nu este vip .gen sa nu poata sa foloseasca awp-ul deloc.
-Menu VIP
1.M4a1 ,Deagle si set grenazi (HE si Flash) fara smoke
2.AK47 ,deagle si set grenazi (HE si Flash) fara smoke
3.AWP ,deagle si set grenazi (HE si Flash) fara smoke
-VIP free event : 20:00 / 08:00
-Comanda cu /vreauvip in chat cu deschidere de motd sau in consola care sa arate beneficiile + un mesaj care sa ruleze la 60 secunde gen ,pentru a vedea beneficiile si pretul pentru vip asteaza : /vreauvip
-Un fel de glow / straluciere sau ceva pentru membrii vip gen sa iasa in evidenta
-Sa apara tag-ul VIP in TAB
-Meniul sa fie disponibil doar dupa runda a 3 a ,eu am warmup ,deci dupa rs sa fie contorizata runda
-VIP-ul incepe runda cu 100HP ,100AP ,1400 $
-Sa se dezactiveze automat pe harta css_bycastor
-Sa arate damge-ul facut in timp real
-Sa isi reseteze doar decesele
-Slot rezervat / Nume rezervat


Last edited by marvel_team on 04 Aug 2018 22:11, edited 2 times in total.



04 Aug 2018 21:45
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 01 Aug 2018 23:02
Posts: 19
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
#UP #vip_free_plugin

_________________
You're crying so hard that your neighbours thinks you are listening rap music with bass boosted.


04 Aug 2018 21:50
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 25 Dec 2017 17:05
Posts: 53
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
NICK: Needless
CERINTE VIP:
max hp 100
Kill hp 10 hs 15
Menu VIP
1.M4a1 ,Deagle si set grenazi (HE si Flash) fara smoke
2.AK47 ,deagle si set grenazi (HE si Flash) fara smoke
3.AWP ,deagle si set grenazi (HE si Flash) fara smoke
-150 $ bonus la frag normal ,maxim 16000 $
-300 $ bonus la hs
Sa arate damge-ul facut in timp real
arme, un vip normal cu event de la 00:00 la ora 11:00


05 Aug 2018 14:26
Profile multumesc WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2817
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
marvel_team wrote:
Nick : bRiCk-baZuka
Server Name : MARVEL.CSMANIA.RO
Mod Server : CSGO Remake.
Cerinte : Plugin VIP
Flag : bit
Beneficii VIP :

-HP : 15 la frag normal ,30 la hs + un he free ( sa nu poate detine mai mult de 1he odata )
-AP : 15 la frag normal ,30 la hs
-150 $ bonus la frag normal ,maxim 16000 $
-300 $ bonus la hs
-Parasuta doar pentru membrii VIP
-Doble Jump doar pentru membrii VIP
-Sa nu creasca / depaseasca viata mai mult de 100
-Sa poata sa foloseasca admin chat
-ViP-ul sa fie imun la flash-uri
-AWP-ul sa fie doar pentru vip ,Sa primeasca drop daca un alt jucator ridica awp de jos si nu este vip .gen sa nu poata sa foloseasca awp-ul deloc.
-Menu VIP
1.M4a1 ,Deagle si set grenazi (HE si Flash) fara smoke
2.AK47 ,deagle si set grenazi (HE si Flash) fara smoke
3.AWP ,deagle si set grenazi (HE si Flash) fara smoke
-VIP free event : 20:00 / 08:00
-Comanda cu /vreauvip in chat cu deschidere de motd sau in consola care sa arate beneficiile + un mesaj care sa ruleze la 60 secunde gen ,pentru a vedea beneficiile si pretul pentru vip asteaza : /vreauvip
-Un fel de glow / straluciere sau ceva pentru membrii vip gen sa iasa in evidenta
-Sa apara tag-ul VIP in TAB
-Meniul sa fie disponibil doar dupa runda a 3 a ,eu am warmup ,deci dupa rs sa fie contorizata runda
-VIP-ul incepe runda cu 100HP ,100AP ,1400 $
-Sa se dezactiveze automat pe harta css_bycastor
-Sa arate damge-ul facut in timp real
-Sa isi reseteze doar decesele
-Slot rezervat / Nume rezervat

| 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[] = "[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("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,
parachute,
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("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);
RegisterHam(Ham_Touch, "weaponbox", "fw_TouchWeapon");

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

register_clcmd("awp", "blockawp");

cvar[hp_spawn] = register_cvar("vip_hp_spawn", "100"); // 0 = dezactivat
cvar[ap_spawn] = register_cvar("vip_ap_spawn", "100"); // 0 = dezactivat
cvar[money_spawn] = register_cvar("vip_money_spawn", "1400"); // 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[parachute] = register_cvar("vip_parachute", "1"); // 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 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 blockawp(id)
{
if(is_user_alive(id) && !is_user_vip(id))
{
ColorChat(id, "!4%s!3 AWP-ul!1 este doar pentru membri VIP.", TAG);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}

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;
}
}

if(get_pcvar_num(cvar[parachute]))
{
new Float:fallspeed = 100.0 * -1.0;
if(nbut & IN_USE)
{
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
if(velocity[2] < 0.0)
{
entity_set_int(id, EV_INT_sequence, 3);
entity_set_int(id, EV_INT_gaitsequence, 1);
entity_set_float(id, EV_FL_frame, 1.0);
entity_set_float(id, EV_FL_framerate, 1.0);

velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed;
entity_set_vector(id, EV_VEC_velocity, velocity);
}
}
}
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_CurWeapon(id)
{
if(!is_user_alive(id))
return PLUGIN_HANDLED;

if(!is_user_vip(id) && (pev(id, pev_weapons) & (1 << CSW_AWP)))
engclient_cmd(id, "drop", "weapon_awp");

return PLUGIN_CONTINUE;
}

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

if(is_user_vip(id))
return PLUGIN_CONTINUE;

if(pev(id, pev_weapons) & (1 << CSW_AWP))
{
engclient_cmd(id, "drop", "weapon_awp");
ColorChat(id, "!4%s!3 AWP-ul!1 este doar pentru membri VIP.", TAG);
return PLUGIN_HANDLED;
}
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));

set_user_rendering(id, kRenderFxGlowShell, 0, 130, 0, kRenderNormal, 0);

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

public fw_TouchWeapon(ent, id)
{
if(is_user_alive(id) && !is_user_vip(id))
{
static model[128];
pev(ent, pev_model, model, charsmax(model));

if(equal(model, "models/w_awp.mdl"))
return HAM_SUPERCEDE;
}

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;
}

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("\rMeniu VIP", "VipMenuHandler");
menu_additem(menu, "M4A1 + Echipament", "1");
menu_additem(menu, "AK-47 + Echipament", "2");
menu_additem(menu, "AWP + 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;
}

new data[6], namei[64], access, CallBack;
menu_item_getinfo(menu, item, access, data, charsmax(data), namei, charsmax(namei), CallBack);
new key = str_to_num(data);

switch(key)
{
case 1:
{
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 2:
{
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 3:
{
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();
}
}


Aici ai sursa. Am facut exact cum ai vrut. Are si cvar-uri pluginul.

| Afiseaza codul
Code:
vip_hp_spawn 100        // 0 = dezactivat
vip_ap_spawn 100        // 0 = dezactivat
vip_money_spawn 1400    // 0 = dezactivat
vip_show_tab 1        // 0 = dezactivat
vip_show_bullet_dmg 1    // 0 = dezactivat
vip_multijump 1        // 0 = dezactivat. Daca valoarea cvar-ului este 1, vei sari de 2 ori. Orice valoare pui, va fi +1 jump
vip_hp_kill 5        // 0 = dezactivat
vip_hp_hs 10;        // 0 = dezactivat
vip_ap_kill 5        // 0 = dezactivat
vip_ap_hs 10        // 0 = dezactivat
vip_hp_max 100        // 0 = viata infinita
vip_money_kill 150        // 0 = dezactivat
vip_money_hs 300        // 0 = dezactivat
vip_parachute 1        // 0 = dezactivat
vip_noflash 1        // 0 = dezactivat 

Il poti modifica cum vrei tu.

Parasuta nu are model.

comenzi in chat | Afiseaza codul
Code:
/rd sau rd reseteaza decesele
/vips sau vips arata vip-ii online
/vreauvip sau vreauvip deschide un motd in configs cu beneficiile (modt-ul ti-l faci tu in HTML


Se va creea un fisier automat in configs, numit vip_maps.ini.
Acolo o sa adaugi hartile una sub ulta. Pe hartile respective, pluginul de vip va fi dezactivat.


Testeaza-l si vino cu replay. Nu l-am testat.

_________________
„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! PM ME!

[AMXX] LEVEL MOD PUBLIC [In faza de testare]


05 Aug 2018 15:46
Profile multumesc YIM WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2817
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
NeedlessDM wrote:
NICK: Needless
CERINTE VIP:
max hp 100
Kill hp 10 hs 15
Menu VIP
1.M4a1 ,Deagle si set grenazi (HE si Flash) fara smoke
2.AK47 ,deagle si set grenazi (HE si Flash) fara smoke
3.AWP ,deagle si set grenazi (HE si Flash) fara smoke
-150 $ bonus la frag normal ,maxim 16000 $
-300 $ bonus la hs
Sa arate damge-ul facut in timp real
arme, un vip normal cu event de la 00:00 la ora 11:00

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


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

// --------------------------------------------
// ------------- 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("AICI PUI FLAGUL VIP-ului"))
// --------------------------------------------
// ------------- 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 vreauvip", "CmdPrintAttributes");
register_clcmd("say_team vreauvip", "CmdPrintAttributes");
register_clcmd("say /vreauvip", "CmdPrintAttributes");
register_clcmd("say_team /vreauvip", "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[]));
}

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));
}

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

new menu = menu_create("\rMeniu VIP", "VipMenuHandler");
menu_additem(menu, "M4A1 + Echipament", "1");
menu_additem(menu, "AK-47 + Echipament", "2");
menu_additem(menu, "AWP + 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;
}

new data[6], namei[64], access, CallBack;
menu_item_getinfo(menu, item, access, data, charsmax(data), namei, charsmax(namei), CallBack);
new key = str_to_num(data);

switch(key)
{
case 1:
{
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 2:
{
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 3:
{
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();
}
}


Are exact ce ai cerut.
Modifici cvar-urile dupa bunul plac.
comenzi | Afiseaza codul
Code:
/vips sau vips - arata vip-ii online
/vreauvip sau vreauvip - deschide un motd in configs cu beneficiile (modt-ul ti-l faci tu in HTML)


cvar-uri | Afiseaza codul
Code:
vip_hp_spawn 100        // 0 = dezactivat
vip_ap_spawn 100        // 0 = dezactivat
vip_show_tab 1        // 0 = dezactivat
vip_show_bullet_dmg 1    // 0 = dezactivat
vip_hp_kill 5        // 0 = dezactivat
vip_hp_hs 10;        // 0 = dezactivat
vip_hp_max 100        // 0 = viata infinita
vip_money_kill 150        // 0 = dezactivat
vip_money_hs 300        // 0 = dezactivat  


In folderul configs se va creea un fisier numit vip_maps.ini
In el iti treci hartile unde vip-ul va fi dezactivat.
Testeaza si revino cu replay.

O sa revin cu un event vip

_________________
„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! PM ME!

[AMXX] LEVEL MOD PUBLIC [In faza de testare]


05 Aug 2018 18:56
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 25 Dec 2017 17:05
Posts: 53
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
YONTU wrote:
NeedlessDM wrote:
NICK: Needless
CERINTE VIP:
max hp 100
Kill hp 10 hs 15
Menu VIP
1.M4a1 ,Deagle si set grenazi (HE si Flash) fara smoke
2.AK47 ,deagle si set grenazi (HE si Flash) fara smoke
3.AWP ,deagle si set grenazi (HE si Flash) fara smoke
-150 $ bonus la frag normal ,maxim 16000 $
-300 $ bonus la hs
Sa arate damge-ul facut in timp real
arme, un vip normal cu event de la 00:00 la ora 11:00

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


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

// --------------------------------------------
// ------------- 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("AICI PUI FLAGUL VIP-ului"))
// --------------------------------------------
// ------------- 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 vreauvip", "CmdPrintAttributes");
register_clcmd("say_team vreauvip", "CmdPrintAttributes");
register_clcmd("say /vreauvip", "CmdPrintAttributes");
register_clcmd("say_team /vreauvip", "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[]));
}

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));
}

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

new menu = menu_create("\rMeniu VIP", "VipMenuHandler");
menu_additem(menu, "M4A1 + Echipament", "1");
menu_additem(menu, "AK-47 + Echipament", "2");
menu_additem(menu, "AWP + 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;
}

new data[6], namei[64], access, CallBack;
menu_item_getinfo(menu, item, access, data, charsmax(data), namei, charsmax(namei), CallBack);
new key = str_to_num(data);

switch(key)
{
case 1:
{
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 2:
{
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 3:
{
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();
}
}


Are exact ce ai cerut.
Modifici cvar-urile dupa bunul plac.
comenzi | Afiseaza codul
Code:
/vips sau vips - arata vip-ii online
/vreauvip sau vreauvip - deschide un motd in configs cu beneficiile (modt-ul ti-l faci tu in HTML)


cvar-uri | Afiseaza codul
Code:
vip_hp_spawn 100        // 0 = dezactivat
vip_ap_spawn 100        // 0 = dezactivat
vip_show_tab 1        // 0 = dezactivat
vip_show_bullet_dmg 1    // 0 = dezactivat
vip_hp_kill 5        // 0 = dezactivat
vip_hp_hs 10;        // 0 = dezactivat
vip_hp_max 100        // 0 = viata infinita
vip_money_kill 150        // 0 = dezactivat
vip_money_hs 300        // 0 = dezactivat    


In folderul configs se va creea un fisier numit vip_maps.ini
In el iti treci hartile unde vip-ul va fi dezactivat.
Testeaza si revino cu replay.

O sa revin cu un event vip


merge singura chestia e ca apare meniu in runda a 3 a, era bine in a doua :D astept ala de event :D mersi mult
Si auzi poti sa-i faci sa adaug vip-urile intr-o lista separata? gen vips.ini si ??


05 Aug 2018 22:05
Profile multumesc WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2817
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
Vezi primul post pentru pluginul de vip event.
O sa postez si un plugin cu citire din fisier

_________________
„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! PM ME!

[AMXX] LEVEL MOD PUBLIC [In faza de testare]


06 Aug 2018 08:00
Profile multumesc YIM WWW
Membru, skill 0
Membru, skill 0

Joined: 24 Nov 2017 20:00
Posts: 17
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
NICK: TheLyon
FLAGURI : bit
Pentru mod : CSGO MOD REMAKE
CERINTE VIP:
1) Acces la Admin's Chat.
2) Comanda /meniugo unde sa gasesc astea
https://imgur.com/a/CprfFCL ( imagine de pe alt server ) vrea sa fie si editata reclama aia daca ai plugin da-la si sa fie Meniu Vip in loc de Meniu staff Kript iar in meniu as vrea decat sa ramana:
Meniu Arme Vip : urmatoarele arme: https://imgur.com/a/zGXrxly iar meniul asta sa til dea automat din a 3 runda
Meniu Bhop ( daca vrei sa fie on sau off )
Meniu Modele Vip
Meniul Trail unde sa exite difere culori la trail si no trail
3) /vip sa apara un motd ( html il am eu ) unde sa apara beneficile
4) Sa primesc ( x1 He, x2 Flash, x1 Smoke) la fiecare spawn.
5)Sa primesc 3 hp pe kill normal, si 7 hp pe kill cu headshot.
6) Sa apar ScoreTab ca VIP
7 ) Maxim HP 100
8 ) La spawn sa imi dea 100 ap
9) Sa n-am acces la meniul de arme pe unele mape ( am sa adaug mape pe viitor de accea doresc sa imi zici unde sa pun numele mapelor )
10) Nume rezervat
11) Vip free orele : 21:00 si 8:00

modele : https://gamebanana.com/skins/131711
https://gamebanana.com/skins/129012
https://gamebanana.com/skins/125757
https://gamebanana.com/skins/122478
https://gamebanana.com/skins/118798
https://gamebanana.com/skins/28311
https://gamebanana.com/skins/108499

Pentru Meniu Vip Model, ai si nume la link


07 Aug 2018 15:53
Profile multumesc WWW
Membru, skill 0
Membru, skill 0

Joined: 04 Aug 2018 15:44
Posts: 1
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
NICK: xxL ;x
CERINTE VIP:
max hp 130
Kill hp 10 hs 15
Menu VIP
1.M4a1 ,Deagle si set grenazi (HE si Flash) fara smoke
2.AK47 ,deagle si set grenazi (HE si Flash) fara smoke
3.AWP ,deagle si set grenazi (HE si Flash) fara smoke
-150 $ bonus la frag normal ,maxim 16000 $
-300 $ bonus la hs
Sa arate damge-ul facut in timp real

Vreau un vip cu lista.ini si event vip free de la 23:00 - 10:00


07 Aug 2018 22:42
Profile multumesc WWW
Membru, skill 0
Membru, skill 0
User avatar

Joined: 27 Sep 2015 11:27
Posts: 40
Location: MD, or. Cahul
Detinator Steam: Da
SteamID: STEAM_0:0:857918
Fond eXtream: 0
NICK: CAHULMD
MODIFICARI: Sa-mi scoti damage daca se poate.

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

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
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", "3.0", "Dunno")
mpd = register_cvar("money_per_damage","0")
mkb = register_cvar("money_kill_bonus","0")
mhb = register_cvar("money_hs_bonus","0")
health_add = register_cvar("amx_vip_hp", "0")
health_hs_add = register_cvar("amx_vip_hp_hs", "0")
health_max = register_cvar("amx_vip_max_hp", "100")
g_awp_active = register_cvar("awp_active", "0")
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 /vip","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")
register_message( get_user_msgid ("ScoreAttrib"), "msg_ScoreAttrib" )
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_ADMIN)
{
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_ADMIN) )
{
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 msg_ScoreAttrib( msg_id, msg_dest, receiver ) {
/* original code by xpaw & Radius */
#define ARG_PlayerID 1
#define ARG_Flags 2
#define SCOREBOARD_VIP (1 << 2)

if( get_user_flags( get_msg_arg_int(ARG_PlayerID) ) & ADMIN_ADMIN )
set_msg_arg_int( ARG_Flags, ARG_BYTE, get_msg_arg_int(ARG_Flags) | SCOREBOARD_VIP )
}

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_ADMIN)
{
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_ADMIN)
{
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_ADMIN))
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, "\yFree \rVIP \yGuns^n\w1. Get \rM4A1 \w+ \rDeagle ^n\w2. Get \rAK47 \w+ \rDeagle^n\w3. Get \rAWP \w+ \rDeagle^n^n\w0. 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, "You Taked Free M4A1 and Deagle")

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, "You Taked Free AK47 and Deagle")

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, "You Taked Free AWP and Deagle")

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_ADMIN)
return PLUGIN_CONTINUE
client_print(id, print_center, "Sniper's Only For VIP's")
return PLUGIN_HANDLED
}

public ShowMotd(id)
{
show_motd(id, "/addons/amxmodx/configs/vip.txt")
}


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_ADMIN)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "^1VIP ONLINE: ")
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "^4%s^1%s^4 ", 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 ^4VIP^1 online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "^1Contact Server Admin:^4 %s", contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

stock ColorChat(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!n", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}


08 Aug 2018 00:44
Profile multumesc YIM WWW
Moderator ajutator
Moderator ajutator
User avatar

Joined: 10 May 2013 14:25
Posts: 2817
Location: Gura Humorului, Suceava
Detinator Steam: Nu
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Fond eXtream: 0
CAHULMD wrote:
NICK: CAHULMD
MODIFICARI: Sa-mi scoti damage daca se poate.

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

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
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", "3.0", "Dunno")
mpd = register_cvar("money_per_damage","0")
mkb = register_cvar("money_kill_bonus","0")
mhb = register_cvar("money_hs_bonus","0")
health_add = register_cvar("amx_vip_hp", "0")
health_hs_add = register_cvar("amx_vip_hp_hs", "0")
health_max = register_cvar("amx_vip_max_hp", "100")
g_awp_active = register_cvar("awp_active", "0")
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 /vip","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")
register_message( get_user_msgid ("ScoreAttrib"), "msg_ScoreAttrib" )
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_ADMIN)
{
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_ADMIN) )
{
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 msg_ScoreAttrib( msg_id, msg_dest, receiver ) {
/* original code by xpaw & Radius */
#define ARG_PlayerID 1
#define ARG_Flags 2
#define SCOREBOARD_VIP (1 << 2)

if( get_user_flags( get_msg_arg_int(ARG_PlayerID) ) & ADMIN_ADMIN )
set_msg_arg_int( ARG_Flags, ARG_BYTE, get_msg_arg_int(ARG_Flags) | SCOREBOARD_VIP )
}

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_ADMIN)
{
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_ADMIN)
{
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_ADMIN))
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, "\yFree \rVIP \yGuns^n\w1. Get \rM4A1 \w+ \rDeagle ^n\w2. Get \rAK47 \w+ \rDeagle^n\w3. Get \rAWP \w+ \rDeagle^n^n\w0. 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, "You Taked Free M4A1 and Deagle")

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, "You Taked Free AK47 and Deagle")

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, "You Taked Free AWP and Deagle")

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_ADMIN)
return PLUGIN_CONTINUE
client_print(id, print_center, "Sniper's Only For VIP's")
return PLUGIN_HANDLED
}

public ShowMotd(id)
{
show_motd(id, "/addons/amxmodx/configs/vip.txt")
}


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_ADMIN)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "^1VIP ONLINE: ")
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "^4%s^1%s^4 ", 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 ^4VIP^1 online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "^1Contact Server Admin:^4 %s", contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

stock ColorChat(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!n", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

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

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
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

public plugin_init()
{
register_plugin("VIP", "3.0", "Dunno")
mpd = register_cvar("money_per_damage","0")
mkb = register_cvar("money_kill_bonus","0")
mhb = register_cvar("money_hs_bonus","0")
health_add = register_cvar("amx_vip_hp", "0")
health_hs_add = register_cvar("amx_vip_hp_hs", "0")
health_max = register_cvar("amx_vip_max_hp", "100")
g_awp_active = register_cvar("awp_active", "0")
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 /vip","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_message( get_user_msgid ("ScoreAttrib"), "msg_ScoreAttrib" )
g_MsgSync = CreateHudSyncObj()
}

public msg_ScoreAttrib( msg_id, msg_dest, receiver ) {
/* original code by xpaw & Radius */
#define ARG_PlayerID 1
#define ARG_Flags 2
#define SCOREBOARD_VIP (1 << 2)

if( get_user_flags( get_msg_arg_int(ARG_PlayerID) ) & ADMIN_ADMIN )
set_msg_arg_int( ARG_Flags, ARG_BYTE, get_msg_arg_int(ARG_Flags) | SCOREBOARD_VIP )
}

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_ADMIN)
{
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_ADMIN)
{
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_ADMIN))
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, "\yFree \rVIP \yGuns^n\w1. Get \rM4A1 \w+ \rDeagle ^n\w2. Get \rAK47 \w+ \rDeagle^n\w3. Get \rAWP \w+ \rDeagle^n^n\w0. 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, "You Taked Free M4A1 and Deagle")

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, "You Taked Free AK47 and Deagle")

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, "You Taked Free AWP and Deagle")

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_ADMIN)
return PLUGIN_CONTINUE
client_print(id, print_center, "Sniper's Only For VIP's")
return PLUGIN_HANDLED
}

public ShowMotd(id)
{
show_motd(id, "/addons/amxmodx/configs/vip.txt")
}


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_ADMIN)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "^1VIP ONLINE: ")
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "^4%s^1%s^4 ", 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 ^4VIP^1 online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "^1Contact Server Admin:^4 %s", contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

stock ColorChat(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!n", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}


Revin si cu celelalte pluginuri la baietii de mai sus

_________________
„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! PM ME!

[AMXX] LEVEL MOD PUBLIC [In faza de testare]


13 Aug 2018 12:23
Profile multumesc YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 70 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