/**********************************************************************************
* Changelog
*
* 0.0.2 -> HP & AP added in menu + more bugs fixed
* 0.0.3 -> VIP Menu for Furiens + New weapons . New 2 commands added
* 0.0.4 -> Cvars added + more bugs fixed . Code changed .
*
* Credits
*
* hadesownage
* compaq a.k.a floatman
* d3lux3 -> convert 4 Askhanar Credit System
**********************************************************************************/
#include < amxmodx >
#include <
cstrike >
#include < colorchat >
#include < hamsandwich >
#include < dhudmessage >
#include < fun >
#include < fakemeta >
#define PLUGIN "FURIEN Weapons"
#define VERSION "0.0.4"
#define AUTHOR "hadesownage "
//native
native fcs_get_user_credits(id);
native fcs_set_user_credits(id, credits);
#define VIP_ACCESS ADMIN_LEVEL_H
#define ViewMaxModels 19
#define PlayerMaxModels 16
#pragma semicolon 1
new szTag [ ] = "[Furien]";
new ViewModels [ ViewMaxModels ] [ ] = {
"models/fr_weapons/knifes/v_katana.mdl",
"models/fr_weapons/knifes/v_double_katana.mdl",
"models/fr_weapons/knifes/v_super_knife1.mdl",
"models/fr_weapons/knifes/v_infinity_knife1.mdl",
"models/fr_weapons/knifes/v_viphammer.mdl",
"models/fr_weapons/knifes/v_vipaxe.mdl",
"models/fr_weapons/weapons/v_dualmp5.mdl",
"models/fr_weapons/weapons/v_scorpionmp5.mdl",
"models/fr_weapons/weapons/v_xm1014shoutgun.mdl",
"models/fr_weapons/weapons/v_m3shoutgun.mdl",
"models/fr_weapons/weapons/v_thompson.mdl",
"models/fr_weapons/weapons/v_uspx.mdl",
"models/fr_weapons/weapons/v_vipawp.mdl",
"models/fr_weapons/weapons/v_vipelite.mdl",
"models/fr_weapons/weapons/v_vipcartblue.mdl",
"models/fr_weapons/weapons/v_vipcartred.mdl",
"models/fr_weapons/weapons/v_vipdualkriss.mdl",
"models/fr_weapons/weapons/v_vipm134.mdl",
"models/fr_weapons/weapons/v_vipdualskull.mdl"
};
new PlayerModels [ PlayerMaxModels ] [ ] = {
"models/fr_weapons/knifes/p_katana.mdl",
"models/fr_weapons/knifes/p_double_katana.mdl",
"models/fr_weapons/knifes/p_super_knife1.mdl",
"models/fr_weapons/knifes/p_infinity_knife1.mdl",
"models/fr_weapons/knifes/p_viphammer.mdl",
"models/fr_weapons/knifes/p_vipaxe.mdl",
"models/fr_weapons/weapons/p_dualmp5.mdl",
"models/fr_weapons/weapons/p_thompson.mdl",
"models/fr_weapons/weapons/p_uspx.mdl",
"models/fr_weapons/weapons/p_vipawp.mdl",
"models/fr_weapons/weapons/p_vipelite.mdl",
"models/fr_weapons/weapons/p_vipcartblue.mdl",
"models/fr_weapons/weapons/p_vipcartred.mdl",
"models/fr_weapons/weapons/p_vipdualkriss.mdl",
"models/fr_weapons/weapons/p_vipm134.mdl",
"models/fr_weapons/weapons/p_vipdualskull.mdl"
};
enum _:PlayerWeap {
katana_knife,
double_katana_knife,
super_knife,
infinity_knife,
dual_mp5,
scorpion_mp5,
xm1014_shoutgun,
m3_shoutgun,
thompson,
weapon_uspx,
vip_awp,
vip_elite,
vip_dualkriss,
vip_dualskull,
vip_minigun,
vip_hammer_knife,
vip_axe_knife,
vip_cartblue,
vip_cartred
}
new g_PlayerWeap [ 33 ] [ PlayerWeap ];
new SpawnCvar, PermanentWeaponsCvar, CvarMaxArmor, CvarMaxHealth;
const WPN_NOT_DROP = ( ( 1 << 2 ) | ( 1 << CSW_HEGRENADE ) | ( 1 << CSW_SMOKEGRENADE ) | ( 1 << CSW_FLASHBANG ) | ( 1 << CSW_KNIFE ) | ( 1 << CSW_C4 ) );
public plugin_init ( ) {
register_plugin ( PLUGIN, VERSION, "hadesownage" );
register_clcmd ( "say /weapons", "CheckFurienAcces", 0 );
register_clcmd ( "say_team /weapons", "CheckFurienAcces", 0 );
register_clcmd ( "say /arme", "CheckFurienAcces", 0 );
register_clcmd ( "say_team /arme", "CheckFurienAcces", 0 );
register_clcmd ( "say /frweapons", "CheckFurienAcces", 0 );
register_clcmd ( "say_team /frweapons", "CheckFurienAcces", 0 );
register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
register_event ( "DeathMsg", "eDeath", "a" );
register_logevent ( "round_end", 2, "1=Round_End" );
RegisterHam ( Ham_Spawn, "player", "RefreshAllWeapons", 1 );
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
SpawnCvar = register_cvar ( "furien_weap_spawn", "1" );
PermanentWeaponsCvar = register_cvar ( "furien_weap_permanent_weapons", "0" );
CvarMaxArmor = register_cvar ( "furien_weap_maxarmor", "400" );
CvarMaxHealth = register_cvar ( "furien_weap_maxhealth", "200" );
}
public plugin_precache ( ) {
new hades;
for ( hades = 0; hades < sizeof ( ViewModels ); hades++ )
engfunc ( EngFunc_PrecacheModel, ViewModels [ hades ] );
new ownage;
for ( ownage = 0; ownage < sizeof ( PlayerModels ); ownage++ )
engfunc ( EngFunc_PrecacheModel, PlayerModels [ ownage ] );
}
public client_putinserver ( id ) {
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
}
public client_disconnect ( id ) {
client_putinserver ( id );
}
public round_end ( ) {
new iPlayers [ 32 ], iNum, i;
get_players ( iPlayers, iNum );
for ( i = 0; i < iNum; i++ )
{
if( !is_user_alive ( iPlayers [ i ] ) )
continue;
strip_user_weapons ( iPlayers [ i ] );
set_pdata_int ( iPlayers [ i ], 116, 0 );
give_item ( iPlayers [ i ], "weapon_knife" );
}
}
public eDeath ( ) {
new iVictim = read_data ( 2 );
client_putinserver ( iVictim );
}
public RefreshAllWeapons ( id ) {
if ( is_user_alive ( id ) && get_pcvar_num ( PermanentWeaponsCvar ) == 0 ) {
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
}
if ( get_pcvar_num ( SpawnCvar ) == 1 ) {
if ( get_user_team ( id ) == 1 ) {
set_task( 0.1, "ShowFurienMenuWeapons", id );
}
if ( get_user_team ( id ) == 2 ) {
set_task( 0.1, "ShowAntiFurienMenuWeapons", id );
}
}
return 1;
}
public CheckFurienAcces ( id ) {
if ( get_user_team ( id ) == 1 ) {
set_task( 0.1, "ShowFurienMenuWeapons", id );
}
if ( get_user_team ( id ) == 2 ) {
set_task( 0.1, "ShowAntiFurienMenuWeapons", id );
}
}
public ShowFurienMenuWeapons ( id, level, cid ) {
new menu = menu_create ( "\rFurien \yWeapons Menu", "FurienWeaponsMenuGiver" );
menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, menu, 0 );
return 1;
}
public ShowAntiFurienMenuWeapons ( id, level, cid ) {
new menu = menu_create ( "\rFurien.\y----.Ro Weapons", "AntiFurienWeaponsMenuGiver" );
menu_additem ( menu, "\yDual Mp5 [ \r 20 credite \y ]", "1", 0 );
menu_additem ( menu, "\yScorpion Mp5 [ \r 30 credite \y ]", "2", 0 );
menu_additem ( menu, "\yXM1014 Shoutgun [ \r 45 credite \y ]", "3", 0 );
menu_additem ( menu, "\yM3 Shoutgun [ \r 47 credite \y ]", "4", 0 );
menu_additem ( menu, "\yThompson [ \r 50 credite \y ]", "5", 0 );
menu_additem ( menu, "\yULTIMATE [ \r VIP ONLY \y ]", "9", VIP_ACCESS );
menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, menu, 0 );
return 1;
}
public ShowAntiFurienMenuVIP ( id, level, cid ) {
new menu = menu_create ( "\y*[VIP]* \rFurien.-----.Ro", "AntiFurienVIPMenuGiver" );
menu_additem ( menu, "\yCross Bow \y[ \r25 credite \y ]", "1", VIP_ACCESS );
menu_additem ( menu, "\yDual Kriss \y[ \r25 credite \y ]", "2", VIP_ACCESS );
menu_additem ( menu, "\yDual Skull \y[ \r20 credite \y ]", "3", VIP_ACCESS );
menu_additem ( menu, "\yMinigun \y[ \r15 credite \y ]", "4", VIP_ACCESS );
menu_additem ( menu, "\yCart Blue \y[ \r30 credite \y ]", "5", VIP_ACCESS );
menu_additem ( menu, "\yCart Red \y[ \r30 credite \y ]", "6", VIP_ACCESS );
menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, menu, 0 );
return 1;
}
public ShowFurienMenuVIP ( id, level, cid ) {
new menu = menu_create ( "\y*[VIP]*\rFr.----.Ro", "FurienVIPMenuGiver" );
menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, menu, 0 );
return 1;
}
public FurienWeaponsMenuGiver ( id, menu, item ) {
if( item == MENU_EXIT )
{
return 1;
}
new data [ 6 ], szName [ 64 ];
new access, callback;
menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
new key = str_to_num ( data );
switch(key)
{
case 1:
{
new iMoney = fcs_get_user_credits(id) - 25;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
g_PlayerWeap [ id ] [ katana_knife ] = true;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
CurrentWeapon ( id );
fcs_set_user_credits(id, iMoney);
return 1;
}
}
case 2:
{
new iMoney = fcs_get_user_credits(id) - 30;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = true;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
CurrentWeapon ( id );
fcs_set_user_credits ( id, iMoney );
return 1;
}
}
case 3:
{
new iMoney = fcs_get_user_credits ( id ) - 40;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = true;
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
CurrentWeapon ( id );
fcs_set_user_credits ( id, iMoney );
return 1;
}
}
case 4:
{
new iMoney = fcs_get_user_credits ( id ) - 50;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ infinity_knife ] = true;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
CurrentWeapon ( id );
fcs_set_user_credits ( id, iMoney );
return 1;
}
}
case 5:
{
new iMoney = fcs_get_user_credits ( id ) - 15;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
new szHealth = get_user_health ( id );
if ( szHealth <= get_pcvar_num ( CvarMaxHealth ) ) {
set_dhudmessage ( 31, 201, 31, 0.20, 0.90, 0, 6.0, 1.0 );
show_dhudmessage ( id, "+50 AP" );
set_user_health ( id, get_user_health ( id ) + 50 );
fcs_set_user_credits ( id, iMoney );
return 1;
}
if ( szHealth > get_pcvar_num ( CvarMaxHealth ) ) {
ColorChat ( id, GREEN, "%s^x01 Nu poti cumpara mai mult de^4 %d HP^3 .^4", szTag ,get_pcvar_num ( CvarMaxHealth ));
return 1;
}
}
}
case 6:
{
new iMoney = fcs_get_user_credits ( id ) - 10;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
new szArmor = get_user_armor ( id );
if ( szArmor <= get_pcvar_num ( CvarMaxArmor ) ) {
set_dhudmessage ( 31, 201, 31, 0.02, 0.90, 0, 6.0, 1.0 );
show_dhudmessage ( id, "+50 HP" );
set_user_armor ( id, get_user_armor ( id ) + 50 );
fcs_set_user_credits ( id, iMoney );
return 1;
}
if ( szArmor > get_pcvar_num ( CvarMaxArmor ) ) {
ColorChat ( id, GREEN, "%s^x01 Nu poti cumpara mai mult de^4 %d AP^3 .^4", szTag ,get_pcvar_num ( CvarMaxArmor ));
return 1;
}
}
}
case 7:
{
new iMoney = fcs_get_user_credits ( id ) - 5;
if( get_user_weapon(id) == CSW_HEGRENADE )
{
ColorChat ( id, GREEN, "%s^x01 Ai deja o grenada !", szTag );
return 1;
}
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_hegrenade" );
fcs_set_user_credits ( id, iMoney );
return 1;
}
}
case 8:
{
set_task ( 0.1, "ShowFurienMenuVIP", id );
return 1;
}
}
menu_destroy ( menu );
return 1;
}
public AntiFurienWeaponsMenuGiver ( id, menu, item ) {
if( item == MENU_EXIT )
{
return 1;
}
new data [ 6 ], szName [ 64 ];
new access, callback;
menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
new key = str_to_num ( data );
switch(key)
{
case 1:
{
new iMoney = fcs_get_user_credits ( id ) - 20;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_mp5navy" );
give_item ( id, "weapon_usp" );
cs_set_user_bpammo ( id, CSW_USP, 100 );
cs_set_user_bpammo ( id, CSW_MP5NAVY, 200 );
fcs_set_user_credits ( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = true;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = true;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 2:
{
new iMoney = fcs_get_user_credits ( id ) - 30;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_mp5navy" );
give_item ( id, "weapon_usp" );
cs_set_user_bpammo ( id, CSW_USP, 100 );
cs_set_user_bpammo ( id, CSW_MP5NAVY, 200 );
fcs_set_user_credits ( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = true;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = true;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 3:
{
new iMoney = fcs_get_user_credits ( id ) - 45;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_xm1014" );
give_item ( id, "weapon_usp" );
cs_set_user_bpammo ( id, CSW_USP, 100 );
cs_set_user_bpammo ( id, CSW_XM1014, 200 );
fcs_set_user_credits ( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = true;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = true;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = true;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 4:
{
new iMoney = fcs_get_user_credits ( id ) - 47;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_m3" );
give_item ( id, "weapon_usp" );
cs_set_user_bpammo ( id, CSW_USP, 100 );
cs_set_user_bpammo ( id, CSW_M3, 200 );
fcs_set_user_credits ( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = true;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = true;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 5:
{
new iMoney = fcs_get_user_credits ( id ) - 50;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_p90" );
give_item ( id, "weapon_usp" );
cs_set_user_bpammo ( id, CSW_USP, 100 );
cs_set_user_bpammo ( id, CSW_P90, 200 );
fcs_set_user_credits ( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = true;
g_PlayerWeap [ id ] [ weapon_uspx ] = true;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = false;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 6:
{
new iMoney = fcs_get_user_credits ( id ) - 15;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
new szArmor = get_user_health ( id );
if ( szArmor <= get_pcvar_num ( CvarMaxHealth ) ) {
set_dhudmessage ( 31, 201, 31, 0.02, 0.90, 0, 6.0, 1.0 );
show_dhudmessage ( id, "+50 HP" );
set_user_health ( id, get_user_health ( id ) + 50 );
fcs_set_user_credits ( id, iMoney );
return 1;
}
if ( szArmor > get_pcvar_num ( CvarMaxHealth ) ) {
ColorChat ( id, GREEN, "%s^x01 Nu poti cumpara mai mult de^4 %d HP^3 .^4", szTag ,get_pcvar_num ( CvarMaxHealth ));
return 1;
}
}
}
case 7:
{
new iMoney = fcs_get_user_credits ( id ) - 10;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule bani !", szTag );
return 1;
}
else
{
new szHealth = get_user_armor ( id );
if ( szHealth <= get_pcvar_num ( CvarMaxArmor ) ) {
set_dhudmessage ( 31, 201, 31, 0.20, 0.90, 0, 6.0, 1.0 );
show_dhudmessage ( id, "+50 AP" );
set_user_armor ( id, get_user_armor ( id ) + 50 );
fcs_set_user_credits ( id, iMoney );
return 1;
}
if ( szHealth > get_pcvar_num ( CvarMaxArmor ) ) {
ColorChat ( id, GREEN, "%s^x01 Nu poti cumpara mai mult de^4 %d AP^3 .^4", szTag ,get_pcvar_num ( CvarMaxArmor ));
return 1;
}
}
}
case 8:
{
new iMoney = fcs_get_user_credits ( id ) - 1;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "item_thighpack" );
fcs_set_user_credits( id, iMoney );
return 1;
}
}
case 9:
{
set_task ( 0.1, "ShowAntiFurienMenuVIP", id );
return 1;
}
}
menu_destroy ( menu );
return 1;
}
public AntiFurienVIPMenuGiver ( id, menu, item ) {
if ( item == MENU_EXIT )
{
return 1;
}
new data [ 6 ], szName [ 64 ];
new access, callback;
menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
new key = str_to_num ( data );
switch(key)
{
case 1:
{
new iMoney = fcs_get_user_credits ( id ) - 25;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_awp" );
give_item ( id, "weapon_elite" );
cs_set_user_bpammo ( id, CSW_ELITE, 50 );
cs_set_user_bpammo ( id, CSW_AWP, 50 );
fcs_set_user_credits( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = true;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = true;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 2:
{
new iMoney = fcs_get_user_credits ( id ) - 25;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_p90" );
give_item ( id, "weapon_elite" );
cs_set_user_bpammo ( id, CSW_ELITE, 50 );
cs_set_user_bpammo ( id, CSW_P90, 200 );
fcs_set_user_credits( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = true;
g_PlayerWeap [ id ] [ vip_elite ] = true;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 3:
{
new iMoney = fcs_get_user_credits ( id ) - 20;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_sg552" );
give_item ( id, "weapon_elite" );
cs_set_user_bpammo ( id, CSW_ELITE, 50 );
cs_set_user_bpammo ( id, CSW_SG552, 200 );
fcs_set_user_credits( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = true;
g_PlayerWeap [ id ] [ vip_elite ] = true;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 4:
{
new iMoney = fcs_get_user_credits ( id ) - 15;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_m249" );
give_item ( id, "weapon_elite" );
cs_set_user_bpammo ( id, CSW_ELITE, 50 );
cs_set_user_bpammo ( id, CSW_M249, 300 );
fcs_set_user_credits( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = true;
g_PlayerWeap [ id ] [ vip_minigun ] = true;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 5:
{
new iMoney = fcs_get_user_credits ( id ) - 30;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_mp5navy" );
give_item ( id, "weapon_elite" );
cs_set_user_bpammo ( id, CSW_ELITE, 50 );
cs_set_user_bpammo ( id, CSW_MP5NAVY, 300 );
fcs_set_user_credits( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = true;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = false;
g_PlayerWeap [ id ] [ vip_cartblue ] = true;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
case 6:
{
new iMoney = fcs_get_user_credits ( id ) - 30;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
give_item ( id, "weapon_mp5navy" );
give_item ( id, "weapon_elite" );
cs_set_user_bpammo ( id, CSW_ELITE, 50 );
cs_set_user_bpammo ( id, CSW_MP5NAVY, 300 );
fcs_set_user_credits( id, iMoney );
g_PlayerWeap [ id ] [ dual_mp5 ] = false;
g_PlayerWeap [ id ] [ scorpion_mp5 ] = false;
g_PlayerWeap [ id ] [ xm1014_shoutgun ] = false;
g_PlayerWeap [ id ] [ m3_shoutgun ] = false;
g_PlayerWeap [ id ] [ thompson ] = false;
g_PlayerWeap [ id ] [ weapon_uspx ] = false;
g_PlayerWeap [ id ] [ vip_dualkriss ] = false;
g_PlayerWeap [ id ] [ vip_dualskull ] = false;
g_PlayerWeap [ id ] [ vip_elite ] = true;
g_PlayerWeap [ id ] [ vip_minigun ] = false;
g_PlayerWeap [ id ] [ vip_awp ] = false;
g_PlayerWeap [ id ] [ vip_cartred ] = true;
g_PlayerWeap [ id ] [ vip_cartblue ] = false;
DropWeapons ( id );
CurrentWeapon ( id );
return 1;
}
}
}
menu_destroy ( menu );
return 1;
}
public FurienVIPMenuGiver ( id, menu, item ) {
if( item == MENU_EXIT )
{
return 1;
}
new data [ 6 ], szName [ 64 ];
new access, callback;
menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
new key = str_to_num ( data );
switch(key)
{
case 1:
{
new iMoney = fcs_get_user_credits ( id ) - 15;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = true;
g_PlayerWeap [ id ] [ vip_axe_knife ] = false;
fcs_set_user_credits ( id, iMoney );
CurrentWeapon ( id );
return 1;
}
}
case 2:
{
new iMoney = fcs_get_user_credits ( id ) - 20;
if( iMoney < 0 )
{
ColorChat ( id, GREEN, "%s^x01 Nu ai destule credite !", szTag );
return 1;
}
else
{
g_PlayerWeap [ id ] [ infinity_knife ] = false;
g_PlayerWeap [ id ] [ katana_knife ] = false;
g_PlayerWeap [ id ] [ double_katana_knife ] = false;
g_PlayerWeap [ id ] [ super_knife ] = false;
g_PlayerWeap [ id ] [ vip_hammer_knife ] = false;
g_PlayerWeap [ id ] [ vip_axe_knife ] = true;
fcs_set_user_credits ( id, iMoney );
CurrentWeapon ( id );
return 1;
}
}
}
menu_destroy ( menu );
return 1;
}
public CurrentWeapon ( id ) {
new szWeapon = get_user_weapon ( id );
if ( szWeapon == CSW_KNIFE && g_PlayerWeap [ id ] [ katana_knife ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 0 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 0 ] );
}
if ( szWeapon == CSW_KNIFE && g_PlayerWeap [ id ] [ double_katana_knife ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 1 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 1 ] );
}
if ( szWeapon == CSW_KNIFE && g_PlayerWeap [ id ] [ super_knife ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 2 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 2 ] );
}
if ( szWeapon == CSW_KNIFE && g_PlayerWeap [ id ] [ infinity_knife ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 3 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 3 ] );
}
if ( szWeapon == CSW_KNIFE && g_PlayerWeap [ id ] [ vip_hammer_knife ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 4 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 4 ] );
}
if ( szWeapon == CSW_KNIFE && g_PlayerWeap [ id ] [ vip_axe_knife ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 5 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 5 ] );
}
if ( szWeapon == CSW_MP5NAVY && g_PlayerWeap [ id ] [ dual_mp5 ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 6 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 6 ] );
}
if ( szWeapon == CSW_MP5NAVY && g_PlayerWeap [ id ] [ scorpion_mp5 ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 7 ] );
}
if ( szWeapon == CSW_XM1014 && g_PlayerWeap [ id ] [ xm1014_shoutgun ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 8 ] );
}
if ( szWeapon == CSW_M3 && g_PlayerWeap [ id ] [ m3_shoutgun ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 9 ] );
}
if ( szWeapon == CSW_P90 && g_PlayerWeap [ id ] [ thompson ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 10 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 7 ] );
}
if ( szWeapon == CSW_ELITE && g_PlayerWeap [ id ] [ vip_elite ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 13 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 9 ] );
}
if ( szWeapon == CSW_AWP && g_PlayerWeap [ id ] [ vip_awp ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 12 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 9 ] );
}
if ( szWeapon == CSW_P90 && g_PlayerWeap [ id ] [ vip_dualkriss ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 16 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 13 ] );
}
if ( szWeapon == CSW_SG552 && g_PlayerWeap [ id ] [ vip_dualskull ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 18 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 15 ] );
}
if ( szWeapon == CSW_MP5NAVY && g_PlayerWeap [ id ] [ vip_cartblue ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 14 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 11 ] );
}
if ( szWeapon == CSW_MP5NAVY && g_PlayerWeap [ id ] [ vip_cartred ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 15 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 12 ] );
}
if ( szWeapon == CSW_M249 && g_PlayerWeap [ id ] [ vip_minigun ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 17 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 14 ] );
}
if ( szWeapon == CSW_USP && g_PlayerWeap [ id ] [ weapon_uspx ] ) {
set_pev ( id, pev_viewmodel2, ViewModels [ 11 ] );
set_pev ( id, pev_weaponmodel2, PlayerModels [ 8 ] );
}
return 1;
}
public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits ) {
if ( g_PlayerWeap [ iAttacker ] [ katana_knife ] && get_user_weapon ( iAttacker ) == CSW_KNIFE ) {
SetHamParamFloat( 4, fDamage * 2.0);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ double_katana_knife ] && get_user_weapon ( iAttacker ) == CSW_KNIFE ) {
SetHamParamFloat( 4, fDamage * 2.8);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ super_knife ] && get_user_weapon ( iAttacker ) == CSW_KNIFE ) {
SetHamParamFloat( 4, fDamage * 2.5);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ infinity_knife ] && get_user_weapon ( iAttacker ) == CSW_KNIFE ) {
SetHamParamFloat( 4, fDamage * 3.0);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ dual_mp5 ] && get_user_weapon ( iAttacker ) == CSW_MP5NAVY ) {
SetHamParamFloat( 4, fDamage * 2.0);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ scorpion_mp5 ] && get_user_weapon ( iAttacker ) == CSW_MP5NAVY ) {
SetHamParamFloat( 4, fDamage * 2.0);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ xm1014_shoutgun ] && get_user_weapon ( iAttacker ) == CSW_XM1014 ) {
SetHamParamFloat( 4, fDamage * 2.0);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ m3_shoutgun ] && get_user_weapon ( iAttacker ) == CSW_M3 ) {
SetHamParamFloat( 4, fDamage * 1.8);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ thompson ] && get_user_weapon ( iAttacker ) == CSW_P90 ) {
SetHamParamFloat( 4, fDamage * 2.4);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ vip_elite ] && get_user_weapon ( iAttacker ) == CSW_ELITE ) {
SetHamParamFloat( 4, fDamage * 2.7);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ vip_dualkriss ] && get_user_weapon ( iAttacker ) == CSW_P90 ) {
SetHamParamFloat( 4, fDamage * 3.0);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ vip_hammer_knife ] && get_user_weapon ( iAttacker ) == CSW_KNIFE ) {
SetHamParamFloat( 4, fDamage * 2.7);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ vip_axe_knife ] && get_user_weapon ( iAttacker ) == CSW_KNIFE ) {
SetHamParamFloat( 4, fDamage * 3.3);
return HAM_HANDLED;
}
if ( g_PlayerWeap [ iAttacker ] [ vip_cartblue ] && get_user_weapon ( iAttacker ) == CSW_MP5NAVY ) {
SetHamParamFloat( 4, fDamage * 2.5);
return HAM_HANDLED;
}
return HAM_IGNORED;
}
stock DropWeapons ( id ) {
new wpn, wpnname [ 32 ];
wpn = get_user_weapon ( id );
if ( !( WPN_NOT_DROP & ( 1 << wpn) ) && get_weaponname ( wpn, wpnname, charsmax ( wpnname ) ) ) {
engclient_cmd ( id, "drop", wpnname );
}
}