User
Pass
2FA
 
 

Ajutor editare plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message984
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 14-05-2018, 22:46:54 | Translate post to: ... (Click for more languages)

salut vreau si eu putin ajutor la accest plugin

la gardieni shopul da cu bani si la prizoneri da cu tigari vreau sa faceti ca si la prizoneri sa dea cu bani scoateti tigarile

Spoiler:
[/quote]

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 15-05-2018, 13:39:37 | Translate post to: ... (Click for more languages)

up cineva?
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
WanNnted
[Banned user]


Banned


Status: Offline
(since 31-08-2018 23:07)
Joined: 24 Jul 2015
Posts: 104, Topics: 32
Location: Moldova, Republic of

Reputation: 80.5
Votes: 3

     
Post Posted: 04-06-2018, 15:43:02 | Translate post to: ... (Click for more languages)

Incearca aceasta nu sunt sigur daca va merge dar incearca. nam compiler, doar amx.freakz.

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta_util>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <nvault>
#include <Play_ArenaINC>

#define PLUGIN "Tigari Shop"
#define VERSION "1.0"
#define AUTHOR "PedoBear"

#pragma semicolon 0

#define TASK_PTR 06091993

#define Taskid_ShowHud 6560326
#define HUD_DELAY Float:1.0

#define is_valid_player(%1) (1 <= %1 <= 32)
#define get_bit(%1,%2) ( %1 & 1 << ( %2 & 31 ) )
#define set_bit(%1,%2) %1 |= ( 1 << ( %2 & 31 ) )
#define clear_bit(%1,%2) %1 &= ~( 1 << ( %2 & 31 ) )
#define invert_bit(%0,%1) ((%0) ^= (1 << (%1)))
#define isnotset_bit(%0,%1) (~(%0) & (1 << (%1)))

#define m_iPrimaryWeapon 116

enum _hud { _hudsync, Float:_x, Float:_y, Float:_time }

new const g_HudSync[][_hud] =
{
{0, 0.6, 0.2, 2.0},
{0, -1.0, 0.7, 5.0},
{0, 0.1, 0.2, 2.0},
{0, 0.1, 0.3, 2.0},
{0, -1.0, 0.9, 3.0},
{0, 0.6, 0.1, 3.0},
{0, -1.0, 0.6, 3.0},
{0, 0.8, 0.3, 20.0},
{0, -1.0, 0.4, 3.0}
}

enum _: iCoinSequences
{
CoinIdle = 0,
CoinFloat,
CoinSpin
};

new const SHOP_PREFIX[] = {"!t[!gSaveCredits!t]"};

new shopcvar

new const gCoinModel[ ] = "models/jb_pa_models/shop/tigare.mdl";

new g_szName[ 33 ][ 32 ]

new iVault;

new g_Speed[33], g_Gravity[33]

new const g_szGiveCreditsFlag[ ] = "u";
new const PREFIX[] = {"!t[!gTigariManage!t]"};

new tigari[33];
new g_PlayerSurubelnita, g_PlayerDrujba, g_PlayerElectro;

new const g_iMinNumber = 1111111111; // Minimum number that will be generated.
new const g_iMaxNumber = 9999999999; // Maximum number that will be generated.
new g_iNumber;

new g_iCvarEntry;
new g_iUserRetired[ 33 ];

new const gCoinClassname[ ] = "tigari$";

new g_iUserTime[33];

new g_Adrenalina, g_HpArmuraGardian, g_Revive;

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_event( "DeathMsg", "Hook_DeathMessage", "a" );
register_touch( gCoinClassname, "player", "Forward_TouchCoin" );
register_forward(FM_EmitSound, "fw_EmitSound")
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1)
register_forward(FM_ClientUserInfoChanged, "Fwd_ClientUserInfoChanged");
register_logevent("round_start", 2, "0=World triggered", "1=Round_Start")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
register_forward(FM_PlayerPreThink, "fwd_playerprethink")

register_clcmd("say /shop", "cmd_shopmenu")
register_clcmd("say_team /shop", "cmd_shopmenu")
register_clcmd("say /magazin", "cmd_shopmenu")
register_clcmd("say_team /magazin", "cmd_shopmenu")
register_clcmd("say /tigari", "cmd_tigari")
register_clcmd("say_team /tigari", "cmd_tigari")

register_clcmd("say", "CmdSay")

shopcvar = register_cvar("jbe_shop", "1")
g_iCvarEntry = register_cvar( "jb_entry_credits", "1" );

register_clcmd( "amx_give_tigari", "ClCmdGiveCredits" );
register_clcmd( "amx_take_tigari", "ClCmdTakeCredits" );

register_event("CurWeapon", "WeaponChange", "be", "1=1")

set_task(300.0, "CmdFirstWrites",_,_,_, "b")
set_task(1.0, "check_time", _, _, _, "b")

for(new i = 0; i < sizeof(g_HudSync); i++)
g_HudSync[i][_hudsync] = CreateHudSyncObj()

iVault = nvault_open( "shop" );

if(iVault == INVALID_HANDLE)
set_fail_state( "nValut returned invalid handle!" )

set_task( 1.0, "task_PTRFunction", TASK_PTR, _, _, "b");
}

public cmd_shopmenu(id)
{
if(is_day())
{
chatcolor(id, "!t[!gShop!t] !yNu poti accesa !tShop-ul,!y deoarece este !gZi Speciala !y!")
return PLUGIN_HANDLED
}

if(jb_is_user_last())
{
chatcolor(id, "!t[!gShop!t] !yNu poti accesa !tShop-ul,!y cand este !gUltimul Prizonier!y, !tin !gviata !y!")
return PLUGIN_HANDLED
}

if(get_user_team(id) == 0)
{
chatcolor(id, "!t[!gShop!t] !yNu poti accesa !tShop-ul, !ycand !yesti la !gspectatori !y!")
return PLUGIN_HANDLED
}

if(get_pcvar_num(shopcvar) == 1)
{
if(is_user_connected(id))
{
if(get_user_team(id)==1)
{
new szText[ 555 char ];

formatex( szText, charsmax( szText ), "\\wShop \\rGardieni^n\\wDolari\\r: \\y%d", cs_get_user_money(id));
new vip_menu = menu_create( szText, "ShopMenuCT_handler" );
{
if(!(get_bit(g_PlayerDrujba, id)))
{
formatex( szText, charsmax( szText ), "Surubelnita \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "1", 0 );
}
else
{
formatex( szText, charsmax( szText ), "Surubelnita - 1000 Dolari" );
menu_additem( vip_menu, szText, "1", ADMIN_ADMIN );
}

if(!(get_bit(g_PlayerSurubelnita, id)))
{
formatex( szText, charsmax( szText ), "Drujba \\w-\\r 30 \\yDolari" );
menu_additem( vip_menu, szText, "2", 0 );
}
else
{
formatex( szText, charsmax( szText ), "Drujba - 1000 Dolari" );
menu_additem( vip_menu, szText, "2", ADMIN_ADMIN );
}

formatex( szText, charsmax( szText ), "Grenade (Pack) \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "3", 0 );

formatex( szText, charsmax( szText ), "Deghizare Gardian \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "4", 0 );

formatex( szText, charsmax( szText ), "Invizibilitate \\d[\\y10 \\rsecunde\\d] \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "5", 0 );

formatex( szText, charsmax( szText ), "Gravitatie \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "6", 0 );

formatex( szText, charsmax( szText ), "Viteza \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "7", 0 );

formatex( szText, charsmax( szText ), "No Clip \\d[\\y5 \\rsecunde\\d] \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "8", 0 );

formatex( szText, charsmax( szText ), "Stinge Lumina \\d[\\y10 \\rsecunde\\d] \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "9", 0 );

formatex( szText, charsmax( szText ), "Deagle \\d[\\y2 \\rGloante\\d] \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "10", 0 );

formatex( szText, charsmax( szText ), "USP \\d[\\y5 \\rGloante\\d] \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "11", 0 );

if(!(get_bit(g_Adrenalina, id)))
{
formatex( szText, charsmax( szText ), "Adrenalina \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "12", 0 );
}
else
{
formatex( szText, charsmax( szText ), "Adrenalina - 1000 Dolari" );
menu_additem( vip_menu, szText, "12", ADMIN_ADMIN );
}

formatex( szText, charsmax( szText ), "150 Viata \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "13", 0 );

formatex( szText, charsmax( szText ), "150 Armura \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "14", 0 );

formatex( szText, charsmax( szText ), "Pasi Silentiosi \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "15", 0 );
}

if(!(get_bit(g_Revive, id)))
{
if(!(is_user_alive(id)))
{
formatex( szText, charsmax( szText ), "Revive \\w-\\r 1000 \\yDolari" );
menu_additem( vip_menu, szText, "16", 0 );
}
else
{
formatex( szText, charsmax( szText ), "Revive [Cand esti Mort]" );
menu_additem( vip_menu, szText, "16", ADMIN_ADMIN );
}
}
else
{
formatex( szText, charsmax( szText ), "Revive - 1000 Dolari [Next Round]" );
menu_additem( vip_menu, szText, "16", ADMIN_ADMIN );
}

menu_display( id, vip_menu, 0)
}
else if(get_user_team(id) == 2)
{
new szText[ 555 char ];

formatex( szText, charsmax( szText ), "\\wShop \\rGardieni^n\\wDolari\\r: \\y%d", cs_get_user_money(id));
new vip_menu = menu_create( szText, "ShopMenuCT_handler" );

if(is_user_alive(id))
{
if(!(get_bit(g_PlayerElectro, id)))
{
formatex( szText, charsmax( szText ), "Electrosoc \\w-\\r 16000\\y$" );
menu_additem( vip_menu, szText, "1", 0 );
}
else
{
formatex( szText, charsmax( szText ), "Electrosoc - 16000$" );
menu_additem( vip_menu, szText, "1", ADMIN_ADMIN );
}

formatex( szText, charsmax( szText ), "Invizibilitate \\d[\\y20 \\rsecunde\\d] \\w-\\r 13000\\y$" );
menu_additem( vip_menu, szText, "2", 0 );

formatex( szText, charsmax( szText ), "Viteza \\w-\\r 8000\\y$" );
menu_additem( vip_menu, szText, "3", 0 );

formatex( szText, charsmax( szText ), "Gravity \\w-\\r 5000\\y$" );
menu_additem( vip_menu, szText, "4", 0 );

formatex( szText, charsmax( szText ), "God Mode \\d[\\y5 \\rsecunde\\d] \\w-\\r 15000\\y$" );
menu_additem( vip_menu, szText, "5", 0 );

if(!(get_bit(g_HpArmuraGardian, id)))
{
formatex( szText, charsmax( szText ), "255 Viata + Armura \\w-\\r 14000\\y$" );
menu_additem( vip_menu, szText, "6", 0 );
}
else
{
formatex( szText, charsmax( szText ), "255 Viata + Armura - 14000$" );
menu_additem( vip_menu, szText, "6", 0 );
}
}

if(!(get_bit(g_Revive, id)))
{
if(!(is_user_alive(id)))
{
formatex( szText, charsmax( szText ), "Revive \\w-\\r 15500\\y$" );
menu_additem( vip_menu, szText, "7", 0 );
}
else
{
formatex( szText, charsmax( szText ), "Revive [Cand esti Mort]" );
menu_additem( vip_menu, szText, "7", ADMIN_ADMIN );
}
}
else
{
formatex( szText, charsmax( szText ), "Revive - 15500$ [Next Round]" );
menu_additem( vip_menu, szText, "7", ADMIN_ADMIN );
}

menu_display( id, vip_menu, 0)
}
}
else
client_print(id, print_center, "Nu ai acces la Shop cand esti Mort !")
}
else
client_print(id, print_center, "Nu ai acces la Shop Acum !")

return PLUGIN_HANDLED;
}

public ShopMenuT_handler( id, menu, item )
{
if( item == MENU_EXIT )
{
menu_destroy( menu )
return PLUGIN_HANDLED
}

new data[6], iName[64]
new access, callback

menu_item_getinfo( menu, item, access, data,5, iName, 63, callback )
new key = str_to_num( data )
switch( key )
{
case 1:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
engclient_cmd(id, "weapon_knife")
set_bit(g_PlayerSurubelnita, id)
set_pev(id, pev_viewmodel2, "models/jb_pa_models/shop/surubelnita/v_surubelnita.mdl")
set_pev(id, pev_weaponmodel2, "models/jb_pa_models/shop/surubelnita/p_surubelnita.mdl")

chatcolor(id, "!t[!gTigariShop!t] !yAi cumparat !gSurubelnita!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 2:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
engclient_cmd(id, "weapon_knife")
set_bit(g_PlayerDrujba, id)
set_pev(id, pev_viewmodel2, "models/jb_pa_models/shop/drujba/v_drujba.mdl")
set_pev(id, pev_weaponmodel2, "models/jb_pa_models/shop/drujba/p_drujba.mdl")

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gDrujba!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gDolariy.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 3:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gGrenade !tpack!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gTigari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 4:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_info(id, "model", "jb_pa_player")
entity_set_int(id, EV_INT_body, 3)

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gDeghizare!y de !tGardian!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gTigari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 5:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
set_task(10.0, "RemoveInvis", id)

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gInvizibilitate!y pentru !t10 !gsecunde!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gTigari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 6:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_gravity(id, 0.2)
g_Gravity[id] = true

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gGravitatie!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gTigari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 7:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_maxspeed(id, 700.0)
g_Speed[id] = true

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gViteza!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gTigari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 8:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_noclip(id, 1)
set_task(5.0, "RemoveNoclip", id)

chatcolor(id, "!t[!gTigariShop!t] !yAi cumparat !gNo !tClip!y pentru !g5 !gsecunde!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 9:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_lights("c")
set_task(10.0, "elektrikAc", 3000)
client_print(0, print_center, "!!! UN PRIZONIER A STINS LUMINA. !!!")

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gStinge !tLumina!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gTigari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 10:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
player_strip_weapons(id)
new dgl = give_item(id, "weapon_deagle")

if(dgl)
{
cs_set_weapon_ammo(dgl, 2);
cs_set_user_bpammo(id, CSW_DEAGLE, 0);
}

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gDeagle!y cu !g2 !tGloante!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 11:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
player_strip_weapons(id)
new usp = give_item(id, "weapon_usp")

if( usp )
{
cs_set_weapon_ammo(usp, 5);
cs_set_user_bpammo(id, CSW_USP, 0);
}

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gGlock!y cu !g5 !tGloante!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 12:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_health(id, 200)
set_user_armor(id, 200)
set_user_gravity(id, 0.2)
set_user_maxspeed(id, 700.0)

g_Speed[id] = true
g_Gravity[id] = true

set_bit(g_Adrenalina, id)
chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gAdrenalina!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 13:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_health(id, 150)
chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !g150 !tViata!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 14:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_armor(id, 150)
chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !g150 !tArmura!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 15:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=1000)
{
set_user_footsteps(id, 1)
chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gPasi !tSilentiosi!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gDolari!y.")
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 16:
{
if(jb_is_user_last())
return PLUGIN_HANDLED

if(cs_get_user_money(id)>=1000)
{
set_bit(g_Revive, id)
ExecuteHamB(Ham_CS_RoundRespawn, id)

chatcolor(id, "!t[!gDolariShop!t] !yAi cumparat !gRevive!y.")
cs_set_user_money(id, cs_get_user_money(id)-1000)
}
else
chatcolor(id, "!t[!gDolariShop!t] !yNu ai destule !gDolari!y.")
}
}

menu_destroy( menu )
return PLUGIN_HANDLED
}

public ShopMenuCT_handler( id, menu, item )
{
if( item == MENU_EXIT )
{
menu_destroy( menu )
return PLUGIN_HANDLED
}

new data[6], iName[64]
new access, callback

menu_item_getinfo( menu, item, access, data,5, iName, 63, callback )
new key = str_to_num( data )
switch( key )
{
case 1:
{
if(is_user_alive(id) && is_user_connected(id))
{
if(cs_get_user_money(id)>=16000)
{
engclient_cmd(id, "weapon_knife")

set_bit(g_PlayerElectro, id)
set_pev(id, pev_viewmodel2, "models/jb_pa_models/shop/electro/v_electro.mdl")
set_pev(id, pev_weaponmodel2, "models/jb_pa_models/shop/electro/p_electro.mdl")

chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !gElectrosoc!y.")
cs_set_user_money(id, cs_get_user_money(id)-16000)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 2:
{
if(is_user_alive(id) && is_user_connected(id))
{
if(cs_get_user_money(id)>=13000)
{
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
cs_set_user_money(id, cs_get_user_money(id)-13000)

chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !gInvizibilitate !tpentru !g20 !tsecunde!y.")

set_task(20.0, "RemoveInvis", id)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 3:
{
if(is_user_alive(id) && is_user_connected(id))
{
if(cs_get_user_money(id)>=8000)
{
set_user_maxspeed(id, 700.0)
g_Speed[id] = true

chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !gViteza!y.")
cs_set_user_money(id, cs_get_user_money(id)-8000)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 4:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=5000)
{
set_user_gravity(id, 0.2)
g_Gravity[id] = true

chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !gGravitatie!y.")
cs_set_user_money(id, cs_get_user_money(id)-5000)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 5:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=15000)
{
chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !gGod Mode !tpentru !g5 !tsecunde!y.")

set_task(5.0, "RemoveGodMode", id)
set_user_godmode(id, 1)

cs_set_user_money(id, cs_get_user_money(id)-15000)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 6:
{
if(is_user_alive(id))
{
if(cs_get_user_money(id)>=14000)
{
set_user_health(id, 255)
set_user_armor(id, 255)

set_bit(g_HpArmuraGardian, id)
chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !g255 !tViata !y+ !tArmura!y.")
cs_set_user_money(id, cs_get_user_money(id)-14000)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu poti cumpara cand esti !gMort!y.")
}
case 7:
{
if(jb_is_user_last())
return PLUGIN_HANDLED

if(cs_get_user_money(id)>=15500)
{
set_bit(g_Revive, id)
ExecuteHamB(Ham_CS_RoundRespawn, id)

chatcolor(id, "!t[!gShopGardieni!t] !yAi cumparat !gRevive!y.")
cs_set_user_money(id, cs_get_user_money(id)-15500)
}
else
chatcolor(id, "!t[!gShopGardieni!t] !yNu ai destui !gDolari!y.")
}
}

menu_destroy( menu )
return PLUGIN_HANDLED
}

public elektrikAc(taskid)
{
set_lights("#OFF")
remove_task(taskid)
}

public RemoveInvis(id)
{
if(is_user_alive(id))
{
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
chatcolor(id, "%s Atentie! Nu mai esti invizibil acum !", PREFIX)
}
}

public RemoveGodMode(id)
{
if(is_user_alive(id))
{
set_user_godmode(id, 0)
chatcolor(id, "%s Atentie! Nu mai ai Godmode !", PREFIX)
}
}

public RemoveNoclip(id)
{
if(is_user_alive(id))
{
set_user_noclip(id, 0)
chatcolor(id, "%s Atentie! Nu mai ai noclip !", PREFIX)
}
}

//Give/Take Credits
public ClCmdGiveCredits( id )
{
if( !( get_user_flags( id ) & read_flags( g_szGiveCreditsFlag ) ) )
{
client_cmd( id, "NU ai acces la aceasta comanda !" );
return 1;
}

new szFirstArg[ 32 ], szSecondArg[ 10 ];

read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );

if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) )
{
client_cmd( id, "amx_give_tigari < nume / @T > < tigari >" );
return 1;
}

new iPlayers[ 32 ];
new iPlayersNum;

new iCredits = str_to_num( szSecondArg );

if( iCredits <= 0 )
{
client_cmd( id, "Valoare Tigarilor trebuie sa fie mai mare decat 0 !" );
return 1;
}

if( szFirstArg[ 0 ] == '@' )
{
switch ( szFirstArg[ 1 ] )
{
case 'T':
{
if( equal( szFirstArg, "@T" ) )
{
get_players( iPlayers, iPlayersNum, "ceh", "TERRORIST" );
if( iPlayersNum == 0 )
{
client_cmd( id, "NU se afla niciun jucator in aceasta echipa!" );
return 1;
}

for( new i = 0; i < iPlayersNum ; i++ )
tigari[ iPlayers[ i ] ] += iCredits;

new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );
chatcolor(0, "%s!y Admin-ul !t[!g%s!t] !yle-a dat !t[!g%i!t] !yTigari Prizonierilor!g.", PREFIX, szName, iCredits)
log_to_file("Give_Take_Tigari.log", "[Give Tigari] Admin-ul [%s] le-a dat [%i] Tigari Prizonierilor.", szName, iCredits)
return 1;
}
}
}
}

new iPlayer = cmd_target( id, szFirstArg, 8 );
if( !iPlayer )
{
client_cmd( id, "Jucatorul %s nu a fost gasit!", szFirstArg );
return 1;
}

tigari[ iPlayer ] += iCredits;

new szName[ 32 ], _szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );
get_user_name( iPlayer, _szName, sizeof ( _szName ) -1 );

chatcolor(0, "%s!y Admin-ul !t[!g%s!t] !yi-a dat !t[!g%i!t] !yTigari lui !t[!g%s!t]!g.", PREFIX, szName, iCredits, _szName)
log_to_file("Give_Take_Tigari.log", "[Give Tigari] Admin-ul [%s] i-a dat [%i] Tigari lui [%s].", szName, iCredits, _szName)

return 1;
}

public ClCmdTakeCredits( id )
{
if( !( get_user_flags( id ) & read_flags( g_szGiveCreditsFlag ) ) )
{
client_cmd( id, "NU ai acces la aceasta comanda!" );
return 1;
}

new szFirstArg[ 32 ], szSecondArg[ 10 ];

read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );

if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) )
{
client_cmd( id, "amx_take_tigari < nume > < tigari >" );
return 1;
}

new iCredits = str_to_num( szSecondArg );
if( iCredits <= 0 )
{
client_cmd( id, "Valoare Tigarilor, trebuie sa fie mai mare decat 0!" );
return 1;
}

new iPlayer = cmd_target( id, szFirstArg, 8 );
if( !iPlayer )
{
client_cmd( id, "Jucatorul %s nu a fost gasit !", szFirstArg );
return 1;
}

if( tigari[ iPlayer ] < iCredits )
{
client_cmd( id, "Jucatorul %s nu are atatea Tigari ! Are doar %i", szFirstArg, tigari[ iPlayer ] );
return 1;
}

tigari[ iPlayer ] -= iCredits;

new szName[ 32 ], _szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );
get_user_name( iPlayer, _szName, sizeof ( _szName ) -1 );

chatcolor(0, "%s!y Admin-ul !t[!g%s!t] !yi-a luat !t[!g%i!t] !yTigari lui !t[!g%s!t]!g.", PREFIX, szName, iCredits, _szName)
log_to_file("Give_Take_Tigari.log", "[Give Tigari] Admin-ul [%s] i-a luat [%i] Tigari lui [%s].", szName, iCredits, _szName)

return 1;
}

public cmd_tigari(id)
{
new name[18]
get_user_name(id, name, 17)

if(cs_get_user_team(id) == CS_TEAM_T)
chatcolor(id, "!t[!gTigariManager!t] !tNume!y: !g%s !y|!t| !tTigari!y: !g%i", name, tigari[id]);

return PLUGIN_HANDLED;
}

public fwd_playerprethink(id)
{
if(jb_is_user_last())
{
if(is_user_alive(id) && is_user_connected(id))
{
set_user_maxspeed(id, 250.0)
set_user_noclip(id, 0)
set_user_godmode(id, 0)
set_user_gravity(id, 1.0)
}

return PLUGIN_HANDLED
}

if(is_user_alive(id) && is_user_connected(id))
{
if(g_Gravity[id])
set_user_gravity(id, 0.2)

if(g_Speed[id])
set_user_maxspeed(id, 700.0)
}

return FMRES_IGNORED
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
if(g_Speed[victim])
{
g_Speed[victim] = false
return HAM_HANDLED
}

if(g_Gravity[victim])
{
g_Gravity[victim] = false
return HAM_HANDLED
}

if(get_bit(g_PlayerSurubelnita, victim))
{
clear_bit(g_PlayerSurubelnita, victim)
return HAM_HANDLED
}
else if(get_bit(g_PlayerDrujba, victim))
{
clear_bit(g_PlayerDrujba, victim)
return HAM_HANDLED
}
else if(get_bit(g_PlayerElectro, victim))
{
clear_bit(g_PlayerElectro, victim)
return HAM_HANDLED
}

return HAM_IGNORED
}

public round_start()
{
new pallets = -1;
while((pallets = find_ent_by_class(pallets, gCoinClassname)))
remove_entity(pallets);
}

public plugin_natives()
{
register_native("jb_get_tigari", "native_get_tigari", 1)
register_native("jb_set_tigari", "native_set_user_tigari", 1)
register_native("jb_strip_user_cold_weapons", "strip_user_cold_weapons", 1)
register_native("jb_get_user_cold_weapons", "get_user_cold_weapons", 1)

register_native("get_knife1", "native_get_user_knife1", 1)
register_native("get_knife2", "native_get_user_knife2", 1)
register_native("get_knife3", "native_get_user_knife3", 1)
}

public native_get_user_knife1(id)
return g_PlayerSurubelnita;

public native_get_user_knife2(id)
return g_PlayerDrujba;

public native_get_user_knife3(id)
return g_PlayerElectro;

public native_set_user_tigari(id, amount)
tigari[id] = amount;

public native_get_tigari(id)
return tigari[id]

public get_user_cold_weapons(id, num)
{
switch(num)
{
case 1: return get_bit(g_PlayerSurubelnita, id)
case 2: return get_bit(g_PlayerDrujba, id)
case 3: return get_bit(g_PlayerElectro, id)
}

return 0
}

public strip_user_cold_weapons(id)
{
clear_bit(g_PlayerSurubelnita, id)
clear_bit(g_PlayerDrujba, id)
clear_bit(g_PlayerElectro, id)
}

public CmdFirstWrites(id)
{
if(!g_iNumber)
{
g_iNumber = random_num(g_iMinNumber, g_iMaxNumber)
set_task(1.0, "TaskShowNumber", Taskid_ShowHud, _, _, "b")
}

return PLUGIN_HANDLED
}

public WeaponChange(id) if(g_Speed[id]) set_pev(id, pev_maxspeed, 700.0)

public CmdSay(id)
{
if(g_iNumber)
{
new szArg[32];
new szName[32];
get_user_name(id, szName, charsmax(szName));
read_args(szArg, charsmax(szArg));
remove_quotes(szArg);

if(str_to_num(szArg) == g_iNumber && cs_get_user_team(id) != CS_TEAM_CT)
{
remove_task(Taskid_ShowHud)
g_iNumber = 0

switch(random_num(1,7))
{
case 1:
{
chatcolor(0, "%s !t%s!g a castigat !t1!g Tigare !y!", PREFIX, szName);
tigari[id] = tigari[id]+1
}
case 2:
{
chatcolor(0, "%s !t%s!g a castigat !t2!g Tigari !y!", PREFIX, szName);
tigari[id] = tigari[id]+2
}
case 3:
{
chatcolor(0, "%s !t%s!g a castigat !t3!g Tigari !y!", PREFIX, szName);
tigari[id] = tigari[id]+3
}
case 4:
{
chatcolor(0, "%s !t%s!g a castigat !t4!g Tigari !y!", PREFIX, szName);
tigari[id] = tigari[id]+4
}
case 5:
{
chatcolor(0, "%s !t%s!g a castigat !t5!g Tigari !y!", PREFIX, szName);
tigari[id] = tigari[id]+5
}
case 6:
{
chatcolor(0, "%s !t%s!g a castigat !t6!g Tigari !y!", PREFIX, szName);
tigari[id] = tigari[id]+6
}
case 7:
{
chatcolor(0, "%s !t%s!g a castigat !t7!g Tigari !y!", PREFIX, szName);
tigari[id] = tigari[id]+7
}
case 8:
{
chatcolor(0, "%s !t%s!y a castigat !go grenada !y!", PREFIX, szName);
give_item(id, "weapon_hegrenade")
}
}

return PLUGIN_HANDLED
}
}

return PLUGIN_CONTINUE
}

public TaskShowNumber()
player_hudmessage(0, 5, HUD_DELAY + 1.0, {0, 255, 0}, "Primul care scrie: %i^nCastiga un premiu!", g_iNumber)

public check_time()
{
new h, m, s;
time(h, m, s)

if(h == 00 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t00:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 01 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t01:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 02 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t02:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 03 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t03:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 04 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t04:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 05 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t05:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 06 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t06:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 07 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t07:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 08 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t08:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 09 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t09:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 10 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t10:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 11 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t11:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 12 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t12:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 13 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t13:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 14 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t14:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 15 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t15:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 16 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t16:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 17 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t17:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 18 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t18:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 19 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t19:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 20 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t20:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 21 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t21:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 22 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t22:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
else if(h == 23 && m == 00 && s == 00)
{
chatcolor(0, "%s Este ora !t23:00!y, !ttoti !gJucatorii !tau primit !gTigarile !y!", PREFIX)
emit_sound(0, CHAN_AUTO, "jb_pa_sounds/shop/shopevent.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "tigariEvent")
}
}

public tigariEvent()
{
new iPlayers[32]
new iNum
new id

get_players( iPlayers, iNum )

for( new i = 0; i < iNum; i++ )
{
id = iPlayers[i]

tigari[id] = tigari[id]
}
}

public Spawn_player(id)
{
clear_bit(g_Revive, id)

if(is_user_alive(id) && is_user_connected(id))
{
clear_bit(g_PlayerSurubelnita, id);
clear_bit(g_PlayerDrujba, id);
clear_bit(g_PlayerElectro, id);
clear_bit(g_Adrenalina, id);
clear_bit(g_HpArmuraGardian, id);

set_user_footsteps(id, 0)

g_Gravity[id] = false;
g_Speed[id] = false;
}
}

public plugin_precache( )
{
precache_model( gCoinModel );

precache_model( "models/jb_pa_models/shop/drujba/v_drujba.mdl" )
precache_model( "models/jb_pa_models/shop/drujba/p_drujba.mdl" )

precache_model( "models/jb_pa_models/shop/surubelnita/v_surubelnita.mdl" )
precache_model( "models/jb_pa_models/shop/surubelnita/p_surubelnita.mdl" )

precache_model( "models/jb_pa_models/shop/electro/v_electro.mdl" )
precache_model( "models/jb_pa_models/shop/electro/p_electro.mdl" )

precache_model( "models/player/jb_pa_player/jb_pa_player.mdl" )

precache_sound("jb_pa_sounds/shop/pickup_sound.wav")

precache_sound("jb_pa_sounds/shop/drujba/MTSlash.wav")
precache_sound("jb_pa_sounds/shop/drujba/MTConvoca.wav")
precache_sound("jb_pa_sounds/shop/drujba/MTHitWall.wav")
precache_sound("jb_pa_sounds/shop/drujba/MTHit2.wav")
precache_sound("jb_pa_sounds/shop/drujba/MTStab.wav")

precache_sound("jb_pa_sounds/shop/surubelnita/EConvoca.wav")
precache_sound("jb_pa_sounds/shop/surubelnita/EHitWall.wav")
precache_sound("jb_pa_sounds/shop/surubelnita/EHit2.wav")
precache_sound("jb_pa_sounds/shop/surubelnita/ESlash.wav")
precache_sound("jb_pa_sounds/shop/surubelnita/EStab.wav")

precache_sound("jb_pa_sounds/shop/shopevent.wav")
}

public Hook_DeathMessage( )
{
new iVictim = read_data( 2 );

if( read_data( 1 ) == iVictim )
return;

new Float:flPlayerOrigin[ 3 ];
pev( iVictim, pev_origin, flPlayerOrigin );

flPlayerOrigin[ 2 ] += 4.0;

new iEntity = create_entity( "info_target" );

if( !pev_valid( iEntity ) )
return;

if(get_user_team(iVictim) == 2)
{
engfunc( EngFunc_SetOrigin, iEntity, flPlayerOrigin )
set_pev( iEntity, pev_classname, gCoinClassname );
engfunc( EngFunc_SetModel, iEntity, gCoinModel );
set_pev( iEntity, pev_solid, SOLID_SLIDEBOX );
set_pev( iEntity, pev_movetype, MOVETYPE_NONE );
set_pev( iEntity, pev_framerate, 1.0 );
set_pev( iEntity, pev_sequence, CoinFloat );
engfunc( EngFunc_SetSize, iEntity, Float:{ -10.0, -10.0, -10.0 }, Float:{ 10.0, 10.0, 10.0 } );
engfunc( EngFunc_DropToFloor, iEntity );
set_pev( iEntity, pev_nextthink, get_gametime( ) + 1.0 );
set_rendering( iEntity, kRenderFxGlowShell, (random_num(1, 255)), (random_num(1, 255)), (random_num(1, 255)), kRenderNormal, 75 );
}
}

public Fwd_ClientUserInfoChanged( id, szBuffer )
{
if ( !is_user_connected( id ) )
return FMRES_IGNORED;

static szNewName[ 32 ];

engfunc( EngFunc_InfoKeyValue, szBuffer, "name", szNewName, sizeof ( szNewName ) -1 );

if ( equal( szNewName, g_szName[ id ] ) )
return FMRES_IGNORED;

SaveCredits(id);

chatcolor(id, "%s!y Tocmai ti-ai schimbat numele din !t[!g%s!t] !yin !t[!g%i!t]", SHOP_PREFIX, g_szName[ id ], szNewName)
chatcolor(id, "%s!y Am salvat !t[!g%i!t] !ytigari pe numele !t[!g%s!t]", SHOP_PREFIX, tigari[id], g_szName[ id ])

copy( g_szName[ id ], sizeof ( g_szName[] ) -1, szNewName );
LoadCredits( id );

chatcolor(id, "%s!y Am incarcat !t[!g%i!t] !ytigari de pe noul nume !t[!g%s!t]", SHOP_PREFIX, tigari[id], g_szName[ id ])

return FMRES_IGNORED;
}

public SaveCredits(id)
{
static szData[ 256 ];
formatex( szData, sizeof ( szData ) -1, "%i", tigari[id]);

nvault_set( iVault, g_szName[ id ], szData );
}

public LoadCredits( id )
{
static szData[ 256 ], iTimestamp;

if(nvault_lookup( iVault, g_szName[ id ], szData, sizeof ( szData ) -1, iTimestamp ))
{
static szCredits[ 15 ];
parse( szData, szCredits, sizeof ( szCredits ) -1 );
tigari[id] = str_to_num( szCredits );
return;
}
else
tigari[id] = get_pcvar_num( g_iCvarEntry );
}

public client_authorized( id )
{
if( is_user_bot( id ) )
return 0;

g_iUserRetired[ id ] = 0;
get_user_name( id, g_szName[ id ], sizeof ( g_szName[] ) -1 );
LoadCredits( id );

return 0;
}

public client_disconnect(iPlayer)
{
if(!is_user_connected(iPlayer))
return PLUGIN_HANDLED;

clear_bit(g_PlayerSurubelnita, iPlayer)
clear_bit(g_PlayerDrujba,iPlayer)
clear_bit(g_PlayerElectro, iPlayer)
clear_bit(g_Adrenalina, iPlayer);
clear_bit(g_HpArmuraGardian, iPlayer);

g_Gravity[iPlayer] = false
g_Speed[iPlayer] = false

SaveCredits(iPlayer)

return PLUGIN_HANDLED
}

public client_connect(id)
tigari[id] = 1

public client_putinserver(iPlayer)
{
if(!is_user_connected(iPlayer))
return PLUGIN_HANDLED;

clear_bit(g_PlayerSurubelnita, iPlayer)
clear_bit(g_PlayerDrujba, iPlayer)
clear_bit(g_PlayerElectro, iPlayer)
clear_bit(g_Adrenalina, iPlayer);
clear_bit(g_HpArmuraGardian, iPlayer);

g_Speed[iPlayer] = false
g_Gravity[iPlayer] = false

return PLUGIN_HANDLED
}

public Forward_TouchCoin( iEntity, id )
{
if( pev_valid( iEntity ) && get_user_team(id) ==1)
{
++tigari[ id ]
client_cmd(id, "spk jb_pa_sounds/shop/pickup_sound.wav")
set_pev( iEntity, pev_flags, FL_KILLME );
}

return PLUGIN_CONTINUE;
}

public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
{
if (!is_user_connected(id))
return FMRES_IGNORED;

if (get_bit(g_PlayerDrujba, id) && equal(sample[8], "kni", 3))
{
volume = 0.6;

if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/drujba/MTSlash.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}

if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/drujba/MTConvoca.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}

if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"jb_pa_sounds/shop/drujba/MTHitWall.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/drujba/MTHit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}

if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/drujba/MTStab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}

if (get_bit(g_PlayerSurubelnita, id) && equal(sample[8], "kni", 3))
{
volume = 0.6;

if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/surubelnita/ESlash.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/surubelnita/EConvoca.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}

if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel,"jb_pa_sounds/shop/surubelnita/EHitWall.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
else
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/surubelnita/EHit2.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}

if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, "jb_pa_sounds/shop/surubelnita/EStab.wav", volume, attn, flags, pitch);
return FMRES_SUPERCEDE;
}
}

return FMRES_IGNORED;
}

public Player_TakeDamage(victim, inflicator, attacker, Float:damage, damage_type, bitsDamage)
{
if(is_user_connected(attacker) && get_user_weapon(attacker) != CSW_KNIFE)
return;

if(pev(attacker, pev_button) & IN_ATTACK && get_bit(g_PlayerDrujba, attacker))
{
if(get_user_team(attacker) == get_user_team(victim))
return;

SetHamParamFloat(4, damage = 500.0)
}
else if(pev(attacker, pev_button) & IN_ATTACK2 && get_bit(g_PlayerDrujba, attacker))
{
SetHamParamFloat(4, damage = 500.0)
}

if(pev(attacker, pev_button) & IN_ATTACK && get_bit(g_PlayerElectro, attacker))
{
if(get_user_team(attacker) == get_user_team(victim))
return;

SetHamParamFloat(4, damage = 50.0)
}
else if(pev(attacker, pev_button) & IN_ATTACK2 && get_bit(g_PlayerElectro, attacker))
{
SetHamParamFloat(4, damage = 50.0)
}

if(pev(attacker, pev_button) & IN_ATTACK && get_bit(g_PlayerSurubelnita, attacker))
{
if(get_user_team(attacker) == get_user_team(victim))
return;

SetHamParamFloat(4, damage = 40.0)
}
else if(pev(attacker, pev_button) & IN_ATTACK2 && get_bit(g_PlayerSurubelnita, attacker))
{
SetHamParamFloat(4, damage = 80.0)
}
}

public task_PTRFunction( )
{
static iPlayers[ 32 ];
static iPlayersNum;

get_players( iPlayers, iPlayersNum, "ch" );
if( !iPlayersNum )
return;

static id, i;
for( i = 0; i < iPlayersNum; i++ )
{
id = iPlayers[ i ];

g_iUserTime[ id ]++;
static iTime;
iTime = 1 ;

if( g_iUserTime[ id ] >= iTime * 60 )
{
g_iUserTime[ id ] -= iTime * 60;

if(get_user_flags(id) & read_flags("x"))
tigari[id] += 2
else
tigari[id]++
}
}

}

public Event_CurWeapon(player)
{
if(!is_user_alive(player))
return PLUGIN_CONTINUE

if(read_data(2) == CSW_KNIFE && get_bit(g_PlayerDrujba, player))
{
set_pev(player, pev_viewmodel2, "models/jb_pa_models/shop/drujba/v_drujba.mdl")
set_pev(player, pev_weaponmodel2, "models/jb_pa_models/shop/drujba/p_drujba.mdl")
}

if(read_data(2) == CSW_KNIFE && get_bit(g_PlayerSurubelnita, player))
{
set_pev(player, pev_viewmodel2, "models/jb_pa_models/shop/surubelnita/v_surubelnita.mdl")
set_pev(player, pev_weaponmodel2, "models/jb_pa_models/shop/surubelnita/p_surubelnita.mdl")
}

if(read_data(2) == CSW_KNIFE && get_bit(g_PlayerElectro, player))
{
set_pev(player, pev_viewmodel2, "models/jb_pa_models/shop/electro/v_electro.mdl")
set_pev(player, pev_weaponmodel2, "models/jb_pa_models/shop/electro/p_electro.mdl")
}

return PLUGIN_CONTINUE
}

stock player_strip_weapons(id)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
set_pdata_int(id, m_iPrimaryWeapon, 0)
}

stock player_strip_weapons_all()
for(new i = 1; i <= g_MaxClients; i++)
if(is_user_alive(i))
player_strip_weapons(i)

stock player_hudmessage(id, hudid, Float:time = 0.0, color[3] = {0, 255, 0}, msg[], any:...)
{
static text[512], Float:x, Float:y
x = g_HudSync[hudid][_x]
y = g_HudSync[hudid][_y]

if(time > 0)

set_hudmessage(color[0], color[1], color[2], x, y, 0, 0.00, time, 0.00, 0.00)
else
set_hudmessage(color[0], color[1], color[2], x, y, 0, 0.00, g_HudSync[hudid][_time], 0.00, 0.00)

vformat(text, charsmax(text), msg, 6)
ShowSyncHudMsg(id, g_HudSync[hudid][_hudsync], text)
}

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

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")

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

0 0
  
Back to top
View user's profile Send private message
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 25-06-2018, 09:54:57 | Translate post to: ... (Click for more languages)

dati tc

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by InLoveCs, 29 June 2018 13:02



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 17-04-2025, 21:20:45
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x