Furien XP Level

In jos

descarca Furien XP Level

Mesaj Scris de DarkArms la data de Dum Noi 13, 2016 6:51 pm

Descriere: Furien cu XP

Descarcare:

- MediaFire

sau
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <fun>
#include <geoip>
#include <hamsandwich>
#include <nvault>
#include <xs>

#define PLUGIN "Points"
#define VERSIO "1.0"

#define TASK_HUD 100
#define ID_SHOWHUD (taskid - TASK_HUD)
#define IsPlayer(%0) ( 1 <= %0 <= g_bMax )

#if cellbits == 32
const OFFSET_CLIPAMMO = 51
#else
const OFFSET_CLIPAMMO = 65
#endif
const OFFSET_LINUX_WEAPONS = 4

new g_bPoints[33];
new g_bVault;
new g_bSync
new g_bMax;
new g_bFadeMsg;
new g_bCvarKill, g_bCvarHS, g_bLeader;

const Float:HUD_SPECT_X = -1.0;
const Float:HUD_SPECT_Y = 0.8;
const Float:HUD_STATS_X = 0.02;
const Float:HUD_STATS_Y =0.9;
const UNIT_SECOND = (1<<2);
const FFADE_IN = 0x0000;

new const g_File[] = "addons/amxmodx/configs/users.ini";

new XP[33];
new g_iCvarXPKill, g_iCvarXPHS;
new g_HudColor[33];
new g_UserClass[33];

new bool:g_GodMode[33];
new g_XPVault;

new bool:g_norecoil[33];
new Float: cl_pushangle[33][3];
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)

new const MAXCLIP[] = { -1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 }

new bool:g_has_unlimited_clip[33];
new bool:g_has_double_damage[33];

public plugin_init()
{
register_plugin(PLUGIN, VERSIO, AUTHOR);

register_event("DeathMsg", "event_deathmsg", "a");
register_logevent("round_end", 2, "1=Round_End");
register_event("HLTV", "event_new_round", "a");
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")

g_bVault = nvault_open("Dev_Points");
g_XPVault = nvault_open("darkland_xp");
g_bSync = CreateHudSyncObj();
g_bMax = get_maxplayers();
g_bFadeMsg = get_user_msgid("ScreenFade");

g_bCvarKill = register_cvar("bb_points_kill", "2");
g_bCvarHS = register_cvar("bb_points_hs", "3");
g_bLeader = register_cvar("bb_points_show_leader", "1");
g_iCvarXPKill = register_cvar("furien_xp_kill", "15");
g_iCvarXPHS = register_cvar("furien_xp_hs", "30");

register_clcmd("say /depozit", "cmd");
register_clcmd("chooseteam", "CommandBuy");

set_task(250.0, "msg", _, _, _, "b");

RegisterHam(Ham_Killed, "player", "ham_killed");
RegisterHam(Ham_Spawn, "player", "ham_player_spawn", 1);
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" )

new weapon_name[24]
for (new i = 1; i <= 30; i++)
{
if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
{
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
}
}

}

public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage ) {

if ( iInflictor == iAttacker && IsPlayer ( iAttacker ) && g_has_double_damage[iAttacker] ) {
SetHamParamFloat ( 4, fDamage * 2.0 );
return HAM_HANDLED;

}

return HAM_IGNORED;

}

public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
if (!g_has_unlimited_clip[msg_entity])
return;

if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
return;

static weapon, clip
weapon = get_msg_arg_int(2)
clip = get_msg_arg_int(3)

if (MAXCLIP[weapon] > 2)
{
set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])

if (clip < 2)
{
static wname[32], weapon_ent
get_weaponname(weapon, wname, sizeof wname - 1)
weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)

fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
}
}
}

public fw_Weapon_PrimaryAttack_Pre(entity)
{
new id = pev(entity, pev_owner)

if (g_norecoil[id])
{
pev(id, pev_punchangle, cl_pushangle[id])
return HAM_IGNORED;
}
return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
new id = pev(entity, pev_owner)

if (g_norecoil[id])
{
new Float: push[3]
pev(id, pev_punchangle, push)
xs_vec_sub(push, cl_pushangle[id], push)
xs_vec_mul_scalar(push, 0.0, push)
xs_vec_add(push, cl_pushangle[id], push)
set_pev(id, pev_punchangle, push)
return HAM_IGNORED;
}
return HAM_IGNORED;
}

public ham_player_spawn(id)
{
if(!is_user_alive(id))
return HAM_SUPERCEDE;

if(cs_get_user_team(id) == CS_TEAM_CT)
return HAM_SUPERCEDE;

switch(g_UserClass[id])
{
case 1:
{
set_user_health(id, get_user_health(id) + 10);
set_user_armor(id, get_user_armor(id) + 10);
}

case 2:
{
set_user_health(id, get_user_health(id) + 10);
set_user_armor(id, get_user_armor(id) + 10);
give_item(id, "weapon_smokegrenade");
}

case 3:
{
set_user_health(id, get_user_health(id) + 50);
set_user_armor(id, get_user_armor(id) + 50);
}

case 4:
{
set_user_health(id, get_user_health(id) + 70);
set_user_armor(id, get_user_armor(id) + 70);
}

case 5:
{
set_user_health(id, get_user_health(id) + 10);
set_user_armor(id, get_user_armor(id) + 10);
set_user_footsteps(id, 1);
}
}

return HAM_IGNORED;
}

public event_new_round()
{
new i;
for(i = 1; i <= g_bMax; i++)
{
if(g_GodMode[i])
set_user_godmode(i, 0);

g_norecoil[i] = false;
g_has_unlimited_clip[i] = false;
g_has_double_damage[i] = false;
}

return PLUGIN_CONTINUE;
}

public ham_killed(id)
{
SetHamParamInteger(3,2);

message_begin(MSG_ONE, g_bFadeMsg, _, id)
write_short(UNIT_SECOND*5);
write_short(0);
write_short(FFADE_IN);
write_byte(255);
write_byte(0);
write_byte(0);
write_byte(255);
message_end();

return HAM_IGNORED;
}

public msg()
zp_colored_print(0, "^x04[DARKLAND.RO]^x01 Press^x04 M^x01 to open^x04 Game Menu");

public CommandBuy(id)
{
new gMenu, gTitle[128];
formatex(gTitle, charsmax(gTitle), "\wGame Menu^n\rFURIEN.DARKLAND.RO");

gMenu = menu_create(gTitle, "CmdGameHandler");

menu_additem(gMenu, "\wContact Owner");
menu_additem(gMenu, "\wExtra Items");
menu_additem(gMenu, "\wChoose Class");
menu_additem(gMenu, "\wPoints Shop");
menu_additem(gMenu, "\wMoney Shop");
menu_additem(gMenu, "\wHud Colors");
menu_additem(gMenu, "\wJoin a Team");

menu_setprop(gMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, gMenu, 0);
return PLUGIN_HANDLED;
}

public CmdGameHandler(id, gMenu, item) {
if(item == MENU_EXIT) {
menu_destroy(gMenu);
return PLUGIN_HANDLED;
}

switch(item) {
case 0: zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Pe OWNER il poti contacta la adresa^x04 romanya_what");
case 1: {
if(!is_user_alive(id))
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Trebuie sa fii in viata!");
return PLUGIN_HANDLED;
}

new szMenu, Title[256], Commas[32];
AddCommas(XP[id], Commas, charsmax(Commas));
formatex(Title, charsmax(Title), "\wBuy Features with \rXP^n\wYour XP: \r%s", Commas);
szMenu = menu_create(Title, "CmdXPHandler");

menu_additem(szMenu, "\wFreeze Grenade (\r30 XP\w)");
menu_additem(szMenu, "\wFlare Grenade (\r30 XP\w)");
menu_additem(szMenu, "\wNo Recoil (\r150 XP\w)");
menu_additem(szMenu, "\wUnlimited Clip (\r300 XP\w)");
menu_additem(szMenu, "\wDouble Damage (\r400 XP\w)");
menu_additem(szMenu, "\wGod Mode (\r500 XP\w)");

menu_setprop(szMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szMenu, 0);
}

case 2:
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Trebuie sa fii^x04 Furien^x01 ca sa iti poti alege clasa!");
return PLUGIN_HANDLED;
}

if(!is_user_alive(id))
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Trebuie sa fii in viata!");
return PLUGIN_HANDLED;
}

new ClassMenu, Title[256], CurrentClass[64];

switch(g_UserClass[id])
{
case 1: formatex(CurrentClass, charsmax(CurrentClass), "\rClassic");
case 2: formatex(CurrentClass, charsmax(CurrentClass), "\rFrozen");
case 3: formatex(CurrentClass, charsmax(CurrentClass), "\rPredator");
case 4: formatex(CurrentClass, charsmax(CurrentClass), "\rMutant");
case 5: formatex(CurrentClass, charsmax(CurrentClass), "\rHunter");
}

formatex(Title, charsmax(Title), "\wChoose \rFurien \wClass^nCurrent Class: \r%s", CurrentClass);
ClassMenu = menu_create(Title, "CmdClassHandle");

menu_additem(ClassMenu, "\wClassic (\rBalanced\w)");
menu_additem(ClassMenu, "\wFrozen (\rRecive Frost\w)");
menu_additem(ClassMenu, "\wPredator (\rPowerfull\w)");
menu_additem(ClassMenu, "\wMutant (\rBig HP\w)");
menu_additem(ClassMenu, "\wHunter (\rSilent Footsteps\w)");

menu_setprop(ClassMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, ClassMenu, 0);
}



case 3: {
new Menu, Commas[32], Title[256];
AddCommas(g_bPoints[id], Commas, charsmax(Commas));
formatex(Title, charsmax(Title), "\wBuy Features with \rPoints^n\wYour Points: \r%s", Commas);

Menu = menu_create(Title, "CmdMenuHandler");

menu_additem(Menu, "\wBuy Founder [\r25,000 Points\w]");
menu_additem(Menu, "\wBuy Owner [\r20,000 Points\w]");
menu_additem(Menu, "\wBuy God [\r18,000 Points\w]");
menu_additem(Menu, "\wBuy Administrator [\r15,000 Points\w]");
menu_additem(Menu, "\wBuy Moderator [\r10,000 Points\w]");
menu_additem(Menu, "\wBuy Slot [\r5,000 Points\w]");

menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, Menu, 0);
}

case 4:
{
if(!is_user_alive(id))
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Trebuie sa fii in viata pentru a folosi shop-ul");
return PLUGIN_HANDLED;
}

client_director("say /shop", id);
}

case 5:
{
new ColorID;
ColorID = menu_create("\wChoose Hud Colors", "CMDHudColors");

menu_additem(ColorID, "\wDefault Color");
menu_additem(ColorID, "\wRed");
menu_additem(ColorID, "\wGreen");
menu_additem(ColorID, "\wPurple");
menu_additem(ColorID, "\wRandom Colors");

menu_setprop(ColorID, MPROP_EXIT, MEXIT_ALL);
menu_display(id, ColorID, 0);
}


case 6: {
if(is_user_alive(id)) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Oamenii vii nu isi pot schimba echipa!");
return PLUGIN_HANDLED;
}

new TeamMenu;
new ItemSpec[128], ItemCT[128], ItemT[128];

TeamMenu = menu_create("\rJoin a Team", "CmdTeamHandler");

formatex(ItemCT, charsmax(ItemCT), "\wJoin \yAnti Furien");
menu_additem(TeamMenu, ItemCT);

formatex(ItemT, charsmax(ItemT), "\wJoin \yFurien");
menu_additem(TeamMenu, ItemT);

formatex(ItemSpec, charsmax(ItemSpec), "\wJoin \ySpectators ");
menu_additem(TeamMenu, ItemSpec);

menu_setprop(TeamMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, TeamMenu, 0);
}
}

menu_destroy(gMenu);
return PLUGIN_HANDLED;
}

public CMDHudColors(id, ColorID, item)
{
if(item == MENU_EXIT)
{
menu_destroy(ColorID);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0: g_HudColor[id] = 1;
case 1: g_HudColor[id] = 2;
case 2: g_HudColor[id] = 3;
case 3: g_HudColor[id] = 4;
case 4: g_HudColor[id] = 5;
}

menu_destroy(ColorID);
return PLUGIN_HANDLED;
}

public CmdClassHandle(id, ClassMenu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(ClassMenu);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
if(g_UserClass[id] == 1)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already own this class");
return PLUGIN_HANDLED;
}

g_UserClass[id] = 1;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 After your next respawn you will be^x04 Classic Furien (Balanced)");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 HP Spawn:^x04 10^x01 | AP Spawn:^x04 10");
}

case 1:
{
if(g_UserClass[id] == 2)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already own this class");
return PLUGIN_HANDLED;
}

g_UserClass[id] = 2;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 After your next respawn you will be^x04 Frozen (Recive Frost)");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 HP Spawn:^x04 10^x01 | AP Spawn:^x04 10");
}

case 2:
{
if(g_UserClass[id] == 3)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already own this class");
return PLUGIN_HANDLED;
}

g_UserClass[id] = 3;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 After your next respawn you will be^x04 Predator (Powerfull)");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 HP Spawn:^x04 50^x01 | AP Spawn:^x04 50");
}

case 3:
{
if(g_UserClass[id] == 4)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already own this class");
return PLUGIN_HANDLED;
}

g_UserClass[id] = 4;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 After your next respawn you will be^x04 Mutant (Big HP)");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 HP Spawn:^x04 70^x01 | AP Spawn:^x04 70");
}

case 4:
{
if(g_UserClass[id] == 5)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already own this class");
return PLUGIN_HANDLED;
}

g_UserClass[id] = 5;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 After your next respawn you will be^x04 Hunter (Silent Foot Steps)");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 HP Spawn:^x04 10^x01 | AP Spawn:^x04 10");
}
}

menu_destroy(ClassMenu);
return PLUGIN_HANDLED;
}

public CmdXPHandler(id, szMenu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(szMenu);
return PLUGIN_HANDLED;
}

switch(item)
{
case 0:
{
if(XP[id] < 30)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 No Enought XP!");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Avaible:^x04 %d^x01 | Needed:^x04 30", XP[id]);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_smokegrenade");
XP[id] -= 30;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You bought^x04 Freeze Grenade");
}

case 1:
{
if(XP[id] < 30)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 No enought XP!");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Avaible:^x04 %d^x01 | Needed:^x04 30", XP[id]);
return PLUGIN_HANDLED;
}

give_item(id, "weapon_flashbang");
XP[id] -= 30;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You bought^x04 Flare Grenade");
}

case 2:
{
if(XP[id] < 150)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 No enought XP");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Avaible:^x04 %d^x01 | Needed:^x04 150", XP[id]);
return PLUGIN_HANDLED;
}


g_norecoil[id] = true;
XP[id] -= 150;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You bought^x04 No Recoil");

}

case 3:
{
if(XP[id] < 300)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 No enought XP");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Avaible:^x04 %d^x01 | Needed:^x04 300", XP[id]);
return PLUGIN_HANDLED;
}

if(g_has_unlimited_clip[id])
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already have^x04 Unlimited Clip");
return PLUGIN_HANDLED;
}

g_has_unlimited_clip[id] = true;
XP[id] -= 300;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You bought^x04 Unlimited Clip");

}

case 4:
{
if(XP[id] < 400)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 No enought XP");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Avaible:^x04 %d^x01 | Needed:^x04 400", XP[id]);
return PLUGIN_HANDLED;
}

if(g_has_double_damage[id])
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Already have^x04 Double Damage");
return PLUGIN_HANDLED;
}

g_has_double_damage[id] = true;
XP[id] -= 400;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You bought^x04 Double Damage");
}

case 5:
{
if(XP[id] < 500)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 No enought XP!");
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Avaible:^x04 %d^x01 | Needed:^x04 500", XP[id]);
return PLUGIN_HANDLED;
}

set_user_godmode(id, 1);
XP[id] -= 500;
g_GodMode[id] = true;
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You bought^x04 God Mode");
}
}

menu_destroy(szMenu);
return PLUGIN_HANDLED;
}



public CmdTeamHandler(id, TeamMenu, item) {
if(item == MENU_EXIT) {
menu_destroy(TeamMenu);
return PLUGIN_HANDLED;
}

switch(item) {
case 0:
{
if(is_user_alive(id))
return PLUGIN_HANDLED;

if(cs_get_user_team(id) == CS_TEAM_CT)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Esti deja la^x04 Anti Furiens")
return PLUGIN_HANDLED;
}

cs_set_user_team(id, CS_TEAM_CT);
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Ai fost mutat la echipa^x04 Anti Furiens")
}

case 1:
{
if(is_user_alive(id))
return PLUGIN_HANDLED;

if(cs_get_user_team(id) == CS_TEAM_T)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Esti deja la^x04Furiens")
return PLUGIN_HANDLED;
}

cs_set_user_team(id, CS_TEAM_T);
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Ai fost mutat la echipa^x04 Furiens")
}

case 2:
{
if(is_user_alive(id))
return PLUGIN_HANDLED;

if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
{
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Esti deja la^x04 Spectators")
return PLUGIN_HANDLED;
}

cs_set_user_team(id, CS_TEAM_SPECTATOR);
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Ai fost mutat la^x04 Spectators")
}
}

menu_destroy(TeamMenu);
return PLUGIN_HANDLED;
}

public CmdMenuHandler(id, Menu, item) {
if(item == MENU_EXIT) {
menu_destroy(Menu);
return PLUGIN_HANDLED;
}

switch(item) {
case 0: {
if(g_bPoints[id] < 25000) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Nu ai suficiente puncte!");
return PLUGIN_HANDLED;
}

new Pass[5], Name[32], Buffer[256];
get_user_name(id, Name, charsmax(Name));
formatex(Pass, charsmax(Pass), "%d%d%d%d", random_num(1,9), random_num(5,Cool, random_num(6,9), random_num(2,6));
formatex(Buffer, charsmax(Buffer), "^"%s^" ^"%s^" ^"abcdefghijklmnopqrstu^" ^"a^" ; Fondator", Name, Pass);
write_file(g_File, Buffer);

g_bPoints[id] -= 25000;
zp_colored_print(id, "^x04[DARKLAND]^x01 Ai cumparat ^x04FONDATOR!");

server_cmd("amx_reloadadmins");
}

case 1: {
if(g_bPoints[id] < 20000) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Nu ai suficiente puncte!");
return PLUGIN_HANDLED;
}

new Pass[5], Name[32], Buffer[256];
get_user_name(id, Name, charsmax(Name));
formatex(Pass, charsmax(Pass), "%d%d%d%d", random_num(1,9), random_num(5,Cool, random_num(6,9), random_num(2,6));
formatex(Buffer, charsmax(Buffer), "^"%s^" ^"%s^" ^"bcdefgijklmnopqrstu^" ^"a^" ; Owner", Name, Pass);
write_file(g_File, Buffer);

g_bPoints[id] -= 20000;
zp_colored_print(id, "^x04[DARKLAND]^x01 Ai cumparat ^x04OWNER!");

server_cmd("amx_reloadadmins");
}

case 2: {
if(g_bPoints[id] < 18000) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Nu ai suficiente puncte!");
return PLUGIN_HANDLED;
}

new Pass[5], Name[32], Buffer[256];
get_user_name(id, Name, charsmax(Name));
formatex(Pass, charsmax(Pass), "%d%d%d%d", random_num(1,9), random_num(5,Cool, random_num(6,9), random_num(2,6));
formatex(Buffer, charsmax(Buffer), "^"%s^" ^"%s^" ^"bcdefgijklmnopqrsu^" ^"a^" ; God", Name, Pass);
write_file(g_File, Buffer);

g_bPoints[id] -= 18000;
zp_colored_print(id, "^x04[DARKLAND]^x01 Ai cumparat ^x04GOD!");

server_cmd("amx_reloadadmins");
}

case 3: {
if(g_bPoints[id] < 15000) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Nu ai suficiente puncte!");
return PLUGIN_HANDLED;
}

new Pass[5], Name[32], Buffer[256];
get_user_name(id, Name, charsmax(Name));
formatex(Pass, charsmax(Pass), "%d%d%d%d", random_num(1,9), random_num(5,Cool, random_num(6,9), random_num(2,6));
formatex(Buffer, charsmax(Buffer), "^"%s^" ^"%s^" ^"bcdefgijklmnotu^" ^"a^" ; Administrator", Name, Pass);
write_file(g_File, Buffer);

g_bPoints[id] -= 15000;
zp_colored_print(id, "^x04[DARKLAND]^x01 Ai cumparat ^x04ADMINISTRATOR!");

server_cmd("amx_reloadadmins");
}

case 4: {
if(g_bPoints[id] < 10000) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Nu ai suficiente puncte!");
return PLUGIN_HANDLED;
}

new Pass[5], Name[32], Buffer[256];
get_user_name(id, Name, charsmax(Name));
formatex(Pass, charsmax(Pass), "%d%d%d%d", random_num(1,9), random_num(5,Cool, random_num(6,9), random_num(2,6));
formatex(Buffer, charsmax(Buffer), "^"%s^" ^"%s^" ^"bcdefgijklmno^" ^"a^" ; Moderator", Name, Pass);
write_file(g_File, Buffer);

g_bPoints[id] -= 10000;
zp_colored_print(id, "^x04[DARKLAND]^x01 Ai cumparat ^x04MODERATOR!");

server_cmd("amx_reloadadmins");
}

case 5: {
if(g_bPoints[id] < 5000) {
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Nu ai suficiente puncte!");
return PLUGIN_HANDLED;
}

new Pass[5], Name[32], Buffer[256];
get_user_name(id, Name, charsmax(Name));
formatex(Pass, charsmax(Pass), "%d%d%d%d", random_num(1,9), random_num(5,Cool, random_num(6,9), random_num(2,6));
formatex(Buffer, charsmax(Buffer), "^"%s^" ^"%s^" ^"b^" ^"a^" ; Slot", Name, Pass);
write_file(g_File, Buffer);

g_bPoints[id] -= 5000;
zp_colored_print(id, "^x04[DARKLAND]^x01 Ai cumparat ^x04SLOT!");

server_cmd("amx_reloadadmins");
}
}

menu_destroy(Menu);
return PLUGIN_HANDLED;
}

public cmd(id)
{
if(cs_get_user_money(id) >= 16000)
{
g_bPoints[id] += 1;
cs_set_user_money(id, 0);
zp_colored_print(id, "^x04[DARKLAND.RO]^x01 Trade Complete (^x04 1 Points^x01 for^x04 16000$)");
}

return 0;
}

public event_deathmsg()
{
new id = read_data(1);
new victima = read_data(2);
new hs = read_data(3);

if(id == victima || !id)
return PLUGIN_HANDLED;

if(hs)
{
g_bPoints[id] += get_pcvar_num(g_bCvarHS);
XP[id] += get_pcvar_num(g_iCvarXPHS);

new Name[32];
get_user_name(victima, Name, charsmax(Name));

zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You recived ^x04%d^x01 points and^x04 %d^x01 XP for killing^x04 %s^x01 with^x04 %s", get_pcvar_num(g_bCvarHS), get_pcvar_num(g_iCvarXPHS), Name, GetUserWeaponName(id));
}
else
{
g_bPoints[id] += get_pcvar_num(g_bCvarKill);
XP[id] += get_pcvar_num(g_iCvarXPKill);

new Name[32];
get_user_name(victima, Name, charsmax(Name));

zp_colored_print(id, "^x04[DARKLAND.RO]^x01 You recived^x04 %d^x01 points and^x04 %d^x01 XP for killing^x04 %s^x01 with^x04 %s", get_pcvar_num(g_bCvarKill), get_pcvar_num(g_iCvarXPKill), Name, GetUserWeaponName(id));
}

g_bSave(id);
return PLUGIN_CONTINUE;
}

public round_end()
{
if(!get_pcvar_num(g_bLeader))
return PLUGIN_HANDLED;

new P, X;
new PLeader = -1, XLeader = -1;
new maxP = -10000, maxX = -10000;

for(new id = 1; id <= g_bMax; id++)
{
if(is_user_connected(id))
{
P = g_bPoints[id];
X = XP[id];


if(P > maxP)
{
PLeader = id;
maxP = P;
}

if(X > maxX)
{
XLeader = id;
maxX = X;
}
}
}

zp_colored_print(0, "^x01 - [^x04 FURIEN.DARKLAND.RO^x01 Furien Dark by^x04 LondoN eXtream^x01 ] -");

if(PLeader != -1 && maxP >= 1)
{
new Name[32], PStr[32];
get_user_name(PLeader, Name, charsmax(Name));

AddCommas(maxP, PStr, charsmax(PStr));

zp_colored_print(0, "^x01Player^x04 %s^x01 is leader with^x04 %s^x01 Points", Name, PStr);
}

if(XLeader != -1 && maxX >= 1)
{
new Name[32], XPS[32];
get_user_name(XLeader, Name, charsmax(Name));

AddCommas(maxX, XPS, charsmax(XPS));

zp_colored_print(0, "^x01Player^x04 %s^x01 is leader with%x04 %s^x01 XP", Name, XPS);
}

return PLUGIN_CONTINUE;
}

public client_putinserver(id)
{
g_HudColor[id] = 1;
g_UserClass[id] = 1;
g_bLoad(id);
set_task(1.0, "ShowHUD", id+TASK_HUD, _, _, "b");
return PLUGIN_HANDLED;
}

public client_disconnect(id)
{
remove_task(TASK_HUD);
g_bSave(id);
return PLUGIN_HANDLED;
}

public ShowHUD(taskid)
{
static id;
id = ID_SHOWHUD

if(!is_user_alive(id))
{
id = pev(id, pev_iuser2);

if(!is_user_alive(id))
return;
}

new R, G, B;

switch(g_HudColor[id])
{
case 1: // default
{
R = 0;
G = 127;
B = 255;
}

case 2: // red
{
R = 255;
G = 0;
B = 0;
}

case 3: // green
{
R = 0;
G = 255;
B = 0;
}


case 4: // mov
{
R = 216;
G = 19;
B = 255;
}

case 5: // random color
{
R = random(255);
G = random(255);
B = random(255);
}
}

if(id != ID_SHOWHUD)
{
new str_hp[32], str_points[32], str_xp[32];
new str_country[32], str_city[32];
new ip[32];
new name[32]

AddCommas(get_user_health(id), str_hp, charsmax(str_hp));
AddCommas(g_bPoints[id], str_points, charsmax(str_points));
AddCommas(XP[id], str_xp, charsmax(str_xp));

get_user_ip(id, ip, charsmax(ip), 1);
geoip_country(ip, str_country, charsmax(str_country))
geoip_city(ip, str_city, charsmax(str_city));
get_user_name(id, name, charsmax(name));

set_hudmessage(R, G, B, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_bSync, "Spectating: %s %s^nHP: %s Armor: %d XP: %s Points: %s^nFrom: %s, %s", (get_user_flags(id) & ADMIN_LEVEL_A) ? "(Founder)" : "", name, str_hp, get_user_armor(id), str_xp, str_points, str_country, str_city);
}
else
{
new str_hp[32], str_points[32], str_team[16], str_xp[16];

AddCommas(get_user_health(id), str_hp, charsmax(str_hp));
AddCommas(g_bPoints[id], str_points, charsmax(str_points));
AddCommas(XP[id], str_xp, charsmax(str_xp));

switch(get_user_team(id))
{
case 1: formatex(str_team, charsmax(str_team), "Furien");
case 2: formatex(str_team, charsmax(str_team), "Anti Furien");
}

set_hudmessage(R, G, B, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_bSync, "%s, HP: %s Armor: %d XP: %s Points: %s", str_team, str_hp, get_user_armor(id), str_xp, str_points);
}
}

public g_bSave(id)
{
new kPoints[7], kName[32];
new UserName[32];
new kXP[10];


get_user_name(id, UserName, charsmax(UserName));

formatex(kName, charsmax(kName), "%s", UserName);
formatex(kPoints, charsmax(kPoints), "%d", g_bPoints[id]);
formatex(kXP, charsmax(kXP), "%d", XP[id]);
nvault_set(g_bVault, kName, kPoints);
nvault_set(g_XPVault, kName, kXP);
}

public g_bLoad(id)
{
new kName[32], iPoints, iXP;
new asd[32];

get_user_name(id, asd, charsmax(asd));

formatex(kName, charsmax(kName), "%s", asd);
iPoints = nvault_get(g_bVault, kName);
iXP = nvault_get(g_XPVault, kName);

if(iPoints)
{
g_bPoints[id] = iPoints;
nvault_remove(g_bVault, kName);
}

if(iXP)
{
XP[id] = iXP;
nvault_remove(g_XPVault, kName);
}
}

AddCommas( iNum , szOutput[] , iLen ){
static szTmp[ 15 ] , iOutputPos , iNumPos , iNumLen;
szTmp[0]='^0',iOutputPos=iNumPos=iNumLen=0;
if ( iNum < 0 ){
szOutput[ iOutputPos++ ] = '-';
iNum = abs( iNum );
}
iNumLen = num_to_str( iNum , szTmp , charsmax( szTmp ) );
if ( iNumLen <= 3 )iOutputPos += copy( szOutput[ iOutputPos ] , iLen , szTmp );

else{
while ( ( iNumPos < iNumLen ) && ( iOutputPos < iLen ) ){
szOutput[ iOutputPos++ ] = szTmp[ iNumPos++ ];
if( ( iNumLen - iNumPos ) && !( ( iNumLen - iNumPos ) % 3 ) )szOutput[ iOutputPos++ ] = ',';
}
szOutput[ iOutputPos ] = EOS;
}
return iOutputPos;
}

zp_colored_print(target, const message[], any:...) {
static buffer[512], i, argscount
argscount = numargs()

static g_msgSayText;

if(!g_msgSayText)
g_msgSayText = get_user_msgid("SayText");

if (!target)
{
static player
for (player = 1; player <= g_bMax; player++)
{
if (!is_user_connected(player))
continue;

static changed[5], changedcount
changedcount = 0

for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
{
setarg(i, 0, player)
changed[changedcount] = i
changedcount++
}
}

vformat(buffer, charsmax(buffer), message, 3)

message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
write_byte(player)
write_string(buffer)
message_end()

for (i = 0; i < changedcount; i++)
setarg(changed[i], 0, LANG_PLAYER)
}
}
else
{
vformat(buffer, charsmax(buffer), message, 3)

message_begin(MSG_ONE, g_msgSayText, _, target)
write_byte(target)
write_string(buffer)
message_end()
}
}

stock client_director(const cmd[], id = 0)
{
message_begin(MSG_ONE, 51, _, id);
write_byte(strlen(cmd)+2);
write_byte(10);
write_string(cmd);
message_end();
}

stock GetUserWeaponName( id )
{
new szWpName[ 40 ];
get_weaponname( get_user_weapon( id ) , szWpName, charsmax( szWpName ) );

replace( szWpName, charsmax( szWpName ), "weapon_", "" );
ucfirst( szWpName );

return szWpName;
}

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 fm_set_weapon_ammo(entity, amount)
{
set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS);
}

Nume: Furien XP Level
Versiune: 1.0
Link oficial: aici

Instalare:
1. Fisierul base_furien.sma il puneti in addons/amxmodx/scripting
2. Fisierul base_furien.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
base_furien.amxx

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): -

Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator): -

Comenzi publice (se tasteaza in joc prin apasarea tastei Y): -

Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- fakemeta
- cstrike
- fun
- geoip
- hamsandwich
- nvault

Imagini: -

DarkArms
Founders
Founders

Mesaje : 226
Data de inscriere : 23/09/2016
Varsta : 17
Localizare : Terra

http://lowgamers.forumgratuit.ro

Sus In jos

descarca Re: Furien XP Level

Mesaj Scris de Dracu la data de Dum Noi 13, 2016 9:30 pm

Good Job!
avatar
Dracu
Moderators
Moderators

Mesaje : 193
Data de inscriere : 11/11/2016

Sus In jos

descarca Re: Furien XP Level

Mesaj Scris de Tipu la data de Mier Noi 23, 2016 1:29 pm

Good Job!
avatar
Tipu
Administrators
Administrators

Mesaje : 151
Data de inscriere : 22/11/2016

Sus In jos

descarca Re: Furien XP Level

Mesaj Scris de CelRau la data de Dum Noi 27, 2016 7:54 pm

Good Job!
avatar
CelRau
Registered user
Registered user

Mesaje : 184
Data de inscriere : 26/11/2016

Sus In jos

descarca Re: Furien XP Level

Mesaj Scris de Continut sponsorizat


Continut sponsorizat


Sus In jos

Sus

- Subiecte similare

 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum