Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[cerere] plugin vipmenu
Go to page
Previous
1
,
2
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
3124
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 27-07-2015, 23:30:26
| Translate post to:
... (
Click for more languages
)
de pe net cauti orice knife de zombie maini asa mai fioroase
vezi ca iti tr si pt shop
Retired from Amxmodx
0
0
Back to top
-P!C@-
[Simply Normal]
Status: Offline
(since 21-04-2022 19:07)
Joined: 28 May 2012
Posts: 21086
,
Topics: 1601
Location:
Constanta
Reputation:
1870.3
Votes
: 781
Posted: 28-07-2015, 10:08:00
| Translate post to:
... (
Click for more languages
)
Uite aici modele pentru maini:
http://www7.zippyshare.com/v/i82zEcZ4/file.html
0
0
Back to top
*PuMa*
[◣°BB° ◥]
Status: Offline
(since 01-12-2019 10:01)
Joined: 31 May 2015
Posts: 1920
,
Topics: 196
Location:
Sibiu
Reputation:
272.4
Votes
: 173
Posted: 29-07-2015, 21:41:11
| Translate post to:
... (
Click for more languages
)
Shop merge perfect.
Vipmenu nu. Dau /vm zeci de ori si nu functioneaza..
La shop am folosit modelul dat de pica.. la vipmenu un model de pe net oare din acesta cauza?
- 𝕷𝖆𝖘𝖙, 𝖇𝖚𝖙 𝖓𝖔𝖙 𝖑𝖊𝖆𝖘𝖙 -
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 29-07-2015, 22:14:45
| Translate post to:
... (
Click for more languages
)
Vezi daca e vreo eroare in consola.
Retired from Amxmodx
0
0
Back to top
*PuMa*
[◣°BB° ◥]
Status: Offline
(since 01-12-2019 10:01)
Joined: 31 May 2015
Posts: 1920
,
Topics: 196
Location:
Sibiu
Reputation:
272.4
Votes
: 173
Posted: 29-07-2015, 22:19:12
| Translate post to:
... (
Click for more languages
)
Pluginul lam pus de ieri si am uitat sa ma uit in consola dar incerc mai e sa verific
- 𝕷𝖆𝖘𝖙, 𝖇𝖚𝖙 𝖓𝖔𝖙 𝖑𝖊𝖆𝖘𝖙 -
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 29-07-2015, 22:52:50
| Translate post to:
... (
Click for more languages
)
Astept sa vad consola...
Retired from Amxmodx
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 04-08-2015, 17:34:50
| Translate post to:
... (
Click for more languages
)
Deci eroarea @*PuMa*-_-
Retired from Amxmodx
0
0
Back to top
*PuMa*
[◣°BB° ◥]
Status: Offline
(since 01-12-2019 10:01)
Joined: 31 May 2015
Posts: 1920
,
Topics: 196
Location:
Sibiu
Reputation:
272.4
Votes
: 173
Posted: 06-08-2015, 21:42:52
| Translate post to:
... (
Click for more languages
)
Nu am pc e la reparat nush cand mil aduce... NU DATI T/C revin cat de repede pot.
- 𝕷𝖆𝖘𝖙, 𝖇𝖚𝖙 𝖓𝖔𝖙 𝖑𝖊𝖆𝖘𝖙 -
0
0
Back to top
*PuMa*
[◣°BB° ◥]
Status: Offline
(since 01-12-2019 10:01)
Joined: 31 May 2015
Posts: 1920
,
Topics: 196
Location:
Sibiu
Reputation:
272.4
Votes
: 173
Posted: 07-08-2015, 15:03:41
| Translate post to:
... (
Click for more languages
)
Mam uitat in logs si cand s-a schimbat mapa aparea asta
Mapchange to bb_aztec --------
L 08/05/2015 - 14:20:53: Function "native_knife" was not found
L 08/05/2015 - 14:20:53: [AMXX] Run time error 19 (plugin "shopz.amxx") - debug not enabled!
L 08/05/2015 - 14:20:53: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 08/05/2015 - 14:20:53: [AMXX] Run time error -1 (plugin "shopz.amxx") - debug not enabled!
L 08/05/2015 - 14:20:53: An error occurred in plugin_natives. This is dangerous!
L 08/05/2015 - 14:20:53: [AMXX] Plugin "vipmenu.amxx" failed to load: Plugin uses an unknown function (name "solve_knife_bug") - check your modules.ini.
@d3luxe
- 𝕷𝖆𝖘𝖙, 𝖇𝖚𝖙 𝖓𝖔𝖙 𝖑𝖊𝖆𝖘𝖙 -
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 07-08-2015, 15:38:39
| Translate post to:
... (
Click for more languages
)
Poftim.
Spoiler:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <engine>
#pragma tabsize 0
#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "D3luxe"
// -- | Native
native solve_knife_bug(id);
native get_user_credits(id);
native set_user_credits(id, credits);
// -- | Done
new const ModelSk[] = "models/vipBB/v_superknife.mdl"
new const Vip_Flag[] = "t";
new const Tag[] = "[Valoare.Freakz.ro]"
new bool:once[33];
new g_item[33];
new jumpnum[33] = 0
new bool:dojump[33] = false
new g_knife[33]
#define GetPlayerHullSize(%1) ( ( pev ( %1, pev_flags ) & FL_DUCKING ) ? HULL_HEAD : HULL_HUMAN )
enum Coord_e { Float:x, Float:y, Float:z };
// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO = 51
#else
const OFFSET_CLIPAMMO = 65
#endif
const OFFSET_LINUX_WEAPONS = 4
// Max Clip for weapons
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 const Nume_Item[10][] = {
"SuperKnife",
"200 Credite",
"Speed",
"+1000 HP",
"Ak47[x2DMG]",
"M4a1[x2DMG]",
"Gravity",
"Gloante Infinite",
"Double Jump",
"NoClip"
}
// -- | Cvar-s
new speed_zombie,human_gravity,health_zombie;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /vm", "vip_main")
register_clcmd("say_team /vm", "vip_main")
register_clcmd("radio1","no_clipability")
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1)
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
// -- | Cvaruri
speed_zombie = register_cvar("cat_speed","600.5")
health_zombie = register_cvar("cat_hp","1000")
human_gravity = register_cvar("cat_gravity","0.3")
}
public Spawn_player(id)
{
if(is_user_alive(id) && is_user_connected(id))
{
g_item[id] = -1;
once[id] = false;
g_knife[id] = false;
}
}
public plugin_natives(){
register_native("delete_this","return_this",1);
}
public return_this(id)
g_knife[id] = false;
public client_putinserver(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public client_disconnect(id)
{
jumpnum[id] = 0
dojump[id] = false
}
public plugin_precache()
{
precache_model(ModelSk);
}
public Player_TakeDamage(victim, inflicator, attacker, Float:damage, damage_type, bitsDamage)
{
if(!is_user_connected(attacker))
return PLUGIN_HANDLED
if(get_user_team(attacker) == get_user_team(victim) || !is_user_alive(attacker) || !is_user_alive(victim))
return PLUGIN_HANDLED
if(get_user_team(attacker) == 1)
{
if(get_user_weapon(attacker) == CSW_KNIFE && g_knife[attacker])
{
if(pev(attacker, pev_button) & IN_ATTACK )
SetHamParamFloat(4, damage*2)
else if(pev(attacker, pev_button) & IN_ATTACK2 )
SetHamParamFloat(4, damage*2)
}
}else if(get_user_team(attacker) == 2){
if(pev(attacker, pev_button) & IN_ATTACK && get_user_weapon(attacker) == CSW_M4A1 && g_item[attacker] == 4)
SetHamParamFloat(4, damage*2)
else if(pev(attacker, pev_button) & IN_ATTACK && get_user_weapon(attacker) == CSW_AK47 && g_item[attacker] == 5)
SetHamParamFloat(4, damage*2)
}
return PLUGIN_HANDLED
}
public Event_CurWeapon(player)
{
if(!is_user_alive(player) || !is_user_connected(player))
return PLUGIN_HANDLED
if(get_user_weapon(player) == CSW_KNIFE && g_item[player] == 0 && get_user_team(player) == 1)
set_pev(player, pev_viewmodel2, ModelSk);
return PLUGIN_HANDLED
}
public vip_main(id)
{
if(!is_user_connected(id))
return PLUGIN_HANDLED
if(!(get_user_flags(id) & read_flags(Vip_Flag)))
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece nu esti VIP.",Tag)
return PLUGIN_HANDLED
}
switch(get_user_team(id))
{
case 1: vip_vz(id);
case 2: vip_vh(id);
}
return PLUGIN_HANDLED
}
public vip_vz(id)
{
if(!is_user_alive(id))
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece esti mort !",Tag)
return PLUGIN_HANDLED
}
if(get_user_team(id) != 1)
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece nu esti Zombie !",Tag)
return PLUGIN_HANDLED
}
if(once[id])
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece l-ai folosit deja runda asta !",Tag)
return PLUGIN_HANDLED
}
new menu = menu_create( "Meniu VIPBB:", "vmz_handler" );
menu_additem(menu, "SuperKnife[x2Dmg]", "1", 0);
menu_additem(menu, "200 credite", "2", 0);
menu_additem(menu, "Speed", "3", 0);
menu_additem(menu, "+1000 HP", "4", 0);
menu_setprop( menu, MPROP_EXITNAME, "Exit")
menu_display( id, menu, 0);
return PLUGIN_HANDLED
}
public vmz_handler(id, menu, item)
{
if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 1)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
static data[6], name[64], acs, cllbck, key
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck)
key = str_to_num(data)
switch(key)
{
case 1:{
once[id] = true;
solve_knife_bug(id);
g_knife[id] = true;
g_item[id] = 0;
set_pev(id, pev_viewmodel2, ModelSk);
}
case 2:{
once[id] = true;
g_item[id] = 1;
set_user_credits(id,get_user_credits(id) + 200);
}
case 3:{
once[id] = true;
g_item[id] = 2;
set_user_maxspeed(id,get_pcvar_float(speed_zombie));
}
case 4:{
once[id] = true;
g_item[id] = 3;
set_user_health(id,get_user_health(id) + get_pcvar_num(health_zombie));
}
}
ChatColor(id,"!g%s !yAi ales !team%s !ypoti folosi meniul runda viitoare.",Tag,Nume_Item);
menu_destroy(menu)
return PLUGIN_HANDLED
}
public vip_vh(id)
{
if(!is_user_alive(id))
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece esti mort !",Tag)
return PLUGIN_HANDLED
}
if(get_user_team(id) != 2)
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece nu esti OM !",Tag)
return PLUGIN_HANDLED
}
if(once[id])
{
ChatColor(id, "!g%s !yNu poti accesa !teamMENIUL!y deoarece l-ai folosit deja runda asta !",Tag)
return PLUGIN_HANDLED
}
new menu = menu_create( "Meniu VIPBB:", "vmz_handler" );
menu_additem(menu, "Ak47[x2Dmg]", "1", 0);
menu_additem(menu, "M4a1[x2Dmg]", "2", 0);
menu_additem(menu, "Gravity", "3", 0);
menu_additem(menu, "Gloante Infinite", "4", 0);
menu_additem(menu, "Double Jump", "5", 0);
menu_additem(menu, "200 Credite", "6", 0);
menu_additem(menu, "NoClip 5sec.[APASA Z PENTRU ACTIVARE]", "7", 0);
menu_setprop( menu, MPROP_EXITNAME, "Exit")
menu_display( id, menu, 0);
return PLUGIN_HANDLED
}
public vmh_handler(id, menu, item)
{
if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
static data[6], name[64], acs, cllbck, key
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck)
key = str_to_num(data)
switch(key)
{
case 1:{
once[id] = true;
g_item[id] = 4;
give_item(id,"weapon_ak47");
cs_set_user_bpammo(id,CSW_AK47,250);
}
case 2:{
once[id] = true;
g_item[id] = 5;
give_item(id,"weapon_m4a1");
cs_set_user_bpammo(id,CSW_M4A1,250);
}
case 3:{
once[id] = true;
g_item[id] = 6;
set_user_gravity(id,get_pcvar_float(human_gravity));
}
case 4:{
once[id] = true;
g_item[id] = 7;
}
case 5:{
once[id] = true;
g_item[id] = 8;
}
case 6:{
once[id] = true;
g_item[id] = 1;
set_user_credits(id,get_user_credits(id) + 200);
}
case 7:{
once[id] = true;
g_item[id] = 9;
}
}
ChatColor(id,"!g%s !yAi ales !team%s !ypoti folosi meniul runda viitoare din nou.",Tag,Nume_Item[g_item[id]]);
menu_destroy(menu)
return PLUGIN_HANDLED
}
public no_clipability(id)
{
if(g_item[id] != 9 || get_user_team(id) != 2)
return PLUGIN_HANDLED
set_user_noclip(id,1)
set_task(5.0,"reset",id)
ChatColor(id,"!g%s !yNoClip on pentru !team5 secunde!y|!gDEBUG MODE ON.",Tag);
return PLUGIN_HANDLED
}
public reset(id)
{
set_user_noclip(id,0);
g_item[id] = -1;
ChatColor(id,"!g%s !yAi folosit !teamNoClipul !ypt 5 secunde.",Tag);
UnStuck(id);
}
public client_PreThink(id)
{
if(!is_user_alive(id) || get_user_team(id) != 2) return PLUGIN_CONTINUE
if(g_item[id] != 8) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < 2)
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(g_item[id] != 8) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
//********************STOCK-URI********************//
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, "!team", "^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();
}
}
}
}
public UnStuck( const id ) {
new i_Value;
if ( ( i_Value = UTIL_UnstickPlayer ( id, 32, 128 ) ) != 1 )
{
switch ( i_Value )
{
case 0 : client_print ( id, print_chat, "Te-ai blocat,asteapta cateva secunde pentru a te debloca.!" );
case -1 : client_print ( id, print_console, "..." );
}
}
return PLUGIN_CONTINUE;
}
UTIL_UnstickPlayer ( const id, const i_StartDistance, const i_MaxAttempts ) {
// --| Not alive, ignore.
if ( !is_user_alive ( id ) ) return -1
static Float:vf_OriginalOrigin[ Coord_e ], Float:vf_NewOrigin[ Coord_e ];
static i_Attempts, i_Distance;
// --| Get the current player's origin.
pev ( id, pev_origin, vf_OriginalOrigin );
i_Distance = i_StartDistance;
while ( i_Distance < 1000 )
{
i_Attempts = i_MaxAttempts;
while ( i_Attempts-- )
{
vf_NewOrigin[ x ] = random_float ( vf_OriginalOrigin[ x ] - i_Distance, vf_OriginalOrigin[ x ] + i_Distance );
vf_NewOrigin[ y ] = random_float ( vf_OriginalOrigin[ y ] - i_Distance, vf_OriginalOrigin[ y ] + i_Distance );
vf_NewOrigin[ z ] = random_float ( vf_OriginalOrigin[ z ] - i_Distance, vf_OriginalOrigin[ z ] + i_Distance );
engfunc ( EngFunc_TraceHull, vf_NewOrigin, vf_NewOrigin, DONT_IGNORE_MONSTERS, GetPlayerHullSize ( id ), id, 0 );
// --| Free space found.
if ( get_tr2 ( 0, TR_InOpen ) && !get_tr2 ( 0, TR_AllSolid ) && !get_tr2 ( 0, TR_StartSolid ) )
{
// --| Set the new origin .
engfunc ( EngFunc_SetOrigin, id, vf_NewOrigin );
return 1;
}
}
i_Distance += i_StartDistance;
}
// --| Could not be found.
return 0;
}
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
if (g_item[msg_id] != 7)
return;
// Player not alive or not an active weapon
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1 || get_user_team(msg_entity) != 2)
return;
static weapon, clip
weapon = get_msg_arg_int(2) // get weapon ID
clip = get_msg_arg_int(3) // get weapon clip
// Unlimited Clip Ammo
if (MAXCLIP[weapon] > 2) // skip grenades
{
set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
if (clip < 2) // refill when clip is nearly empty
{
// Get the weapon entity
static wname[32], weapon_ent
get_weaponname(weapon, wname, sizeof wname - 1)
weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
// Set max clip on weapon
fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
}
}
}
// Find entity by its owner (from fakemeta_util)
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;
}
// Set Weapon Clip Ammo
stock fm_set_weapon_ammo(entity, amount)
{
set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_LINUX_WEAPONS);
}
Spoiler:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <fvault>
#include <amxmisc>
#pragma tabsize 0
native delete_this(id);
new const g_vaultName[] = "ZmShop"
#define CharsMax(%1) sizeof %1 - 1
#define PLUGIN "ShopBB"
#define VERSION "1.0"
#define AUTHOR "D3luxe"
new const g_szTag[ ] = "[SCredits]";
new const g_szGiveCreditsFlag[ ] = "abcdefghijklmopqrstu";
new g_credite[33]
new g_killcredite, g_killhscredite
new g_knifezm[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
RegisterHam(Ham_Killed, "player", "fw_player_killed")
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1)
register_clcmd("say /shop", "shop")
register_clcmd("say_team /shop", "shop")
register_clcmd( "amx_giveshop_credits", "ClCmdGiveCredits2" );
register_clcmd( "amx_takeshop_credits", "ClCmdTakeCredits2" );
g_killcredite = register_cvar("bb_killcredite", "40");
g_killcredite = register_cvar("bb_bonushskill","60");
}
public Spawn_player(id)
{
if(is_user_alive(id) && is_user_connected(id))
g_knifezm[id] = false;
}
public mesajshop()
ChatColor(0, "!g[BB] !yPentru a cumpara ceva tasteaza !team/shop !")
public ClCmdGiveCredits2( id )
{
if( !( get_user_flags( id ) & read_flags( g_szGiveCreditsFlag ) ) )
{
client_cmd( id, "echo 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, "echo amx_giveshop_credits < nume/ @ALL/ @T/ @CT > < credite >" );
return 1;
}
new iPlayers[ 32 ];
new iPlayersNum;
new iCredits = str_to_num( szSecondArg );
if( iCredits <= 0 )
{
client_cmd( id, "echo Valoare creditelor trebuie sa fie mai mare decat 0!" );
return 1;
}
if( szFirstArg[ 0 ] == '@' )
{
switch ( szFirstArg[ 1 ] )
{
case 'A':
{
if( equal( szFirstArg, "@ALL" ) )
{
get_players( iPlayers, iPlayersNum, "ch" );
for( new i = 0; i < iPlayersNum ; i++ )
g_credite[ iPlayers[ i ] ] += iCredits;
new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );
ChatColor(0, "!g%s !yAdminul !team%s !ya dat !g%d !ycredite tuturor jucatorilor.", g_szTag, szName, iCredits );
return 1;
}
}
case 'T':
{
if( equal( szFirstArg, "@T" ) )
{
get_players( iPlayers, iPlayersNum, "ceh", "TERRORIST" );
if( iPlayersNum == 0 )
{
client_cmd( id, "echo NU se afla niciun jucator in aceasta echipa!" );
return 1;
}
for( new i = 0; i < iPlayersNum ; i++ )
g_credite[ iPlayers[ i ] ] += iCredits;
new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );
ChatColor(0, "!g%s !yAdminul !team%s !ya dat !g%d !ycredite tuturor jucatorilor Zombie.", g_szTag, szName, iCredits );
return 1;
}
}
case 'C':
{
if( equal( szFirstArg, "@CT" ) )
{
get_players( iPlayers, iPlayersNum, "ceh", "CT" );
if( iPlayersNum == 0 )
{
client_cmd( id, "echo NU se afla niciun jucator in aceasta echipa!" );
return 1;
}
for( new i = 0; i < iPlayersNum ; i++ )
g_credite[ iPlayers[ i ] ] += iCredits;
new szName[ 32 ];
get_user_name( id, szName, sizeof ( szName ) -1 );
ChatColor(0, "!g%s !yAdminul !team%s !ya dat !g%d !ycredite tuturor jucatorilor Human.", g_szTag, szName, iCredits );
return 1;
}
}
}
}
new iPlayer = cmd_target( id, szFirstArg, 8 );
if( !iPlayer )
{
client_cmd( id, "echo Jucatorul %s nu a fost gasit!", szFirstArg );
return 1;
}
g_credite[ 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, "!g%s !yAdminul !team%s !ya dat !g%d !ycredite lui !team%d.", g_szTag, szName, iCredits, _szName );
return 1;
}
public ClCmdTakeCredits2( id )
{
if( !( get_user_flags( id ) & read_flags( g_szGiveCreditsFlag ) ) )
{
client_cmd( id, "echo 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, "echo amx_takeshop_credits < nume > < credite >" );
return 1;
}
new iCredits = str_to_num( szSecondArg );
if( iCredits <= 0 )
{
client_cmd( id, "echo Valoare creditelor trebuie sa fie mai mare decat 0!" );
return 1;
}
new iPlayer = cmd_target( id, szFirstArg, 8 );
if( !iPlayer )
{
client_cmd( id, "echo Jucatorul %s nu a fost gasit!", szFirstArg );
return 1;
}
if( g_credite[ iPlayer ] < iCredits )
{
client_cmd( id, "echo Jucatorul %s nu are atatea credite!Are doar %i", szFirstArg, g_credite[ iPlayer ] );
return 1;
}
g_credite[ 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, "!g%s !yAdminul !team%s !ya luat !g%d !ycredite lui !team%d.", g_szTag, szName, iCredits, _szName );
return 1;
}
public plugin_precache( )
{
precache_model( "models/shopBB/v_skinshop.mdl" )
}
public plugin_natives()
{
register_native("get_user_credits","native_get",1);
register_native("set_user_credits","native_set",1);
register_native("solve_knife_bug","native_knife",1);
}
public native_knife(id) g_knifezm[id] = false
public native_get( iPlugin, iParams )
return g_credite[ get_param( 1 ) ];
public native_set( iPlugin, iParams )
{
new id = get_param( 1 );
g_credite[ id ] = max( 0, get_param( 2 ) );
return g_credite[ id ];
Save( id );
}
public Player_TakeDamage(victim, inflicator, attacker, Float:damage, damage_type, bitsDamage)
{
if(!is_user_connected(attacker) || get_user_weapon(attacker) != CSW_KNIFE)
return;
if(get_user_team(attacker) == get_user_team(victim) || !is_user_alive(attacker) || !is_user_alive(victim))
return;
if(pev(attacker, pev_button) & IN_ATTACK && g_knifezm[attacker])
SetHamParamFloat(4, damage*2)
else if(pev(attacker, pev_button) & IN_ATTACK2 && g_knifezm[attacker])
SetHamParamFloat(4, damage*2)
}
public fw_player_killed(victim, attacker, shouldgib)
{
if(is_user_alive(attacker) && get_user_team(attacker) == 1)
{
if(get_pdata_int(victim, 75) == HIT_HEAD)
g_credite[attacker] += get_pcvar_num(g_killhscredite);
else
g_credite[attacker] += get_pcvar_num(g_killcredite);
}
}
public Event_CurWeapon(player)
{
if(!is_user_alive(player))
return PLUGIN_HANDLED
if(get_user_weapon(player) == CSW_KNIFE && g_knifezm[player])
set_pev(player, pev_viewmodel2, "models/shopBB/v_skinshop.mdl")
return PLUGIN_HANDLED
}
public shop(id)
{
if(!is_user_alive(id))
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL!y deoarece esti mort !")
return PLUGIN_HANDLED
}
if(get_user_team(id) != 1)
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL!y deoarece nu esti Zombie !")
return PLUGIN_HANDLED
}
new szText[ 555 char ];
formatex( szText, charsmax( szText ), "Shop Zombie :^n-\wCredite\r[%d] :",g_credite[id]);
new menu = menu_create( szText, "shop_handler" );
menu_additem(menu, "Speed \r[300 credite]", "1", 0);
menu_additem(menu, "Gravity \r[350 credite]", "2", 0);
menu_additem(menu, "SuperKnife\w[x2dmg] \r[400 credite]", "3", 0);
menu_additem(menu, "Invizibilitate 5sec.\r[500 credite]", "4", 0);
menu_additem(menu, "Godmode 5sec.\r[550 credite]", "5", 0);
menu_setprop( menu, MPROP_EXITNAME, "Exit")
menu_display( id, menu, 0);
return PLUGIN_HANDLED
}
public shop_handler(id, menu, item, client)
{
if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 1)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
static data[6], name[64], acs, cllbck, key
menu_item_getinfo(menu, item, acs, data, 5, name, 63, cllbck)
key = str_to_num(data)
switch(key)
{
case 1:
{
if(is_user_alive(id))
{
if(g_credite[id]>=300)
{
g_credite[id] = g_credite[id]-300
set_user_maxspeed(id, 800.0)
ChatColor(id, "!g[ShopZm] !yAi cumparat !teamSpeed.")
return PLUGIN_HANDLED
}else{
ChatColor(id, "!g[ShopZm] !yNu ai destule !teamcredite !")
}
}else
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL ShopZm !ydeoarece esti MORT!")
}
}
case 2:
{
if(is_user_alive(id))
{
if(g_credite[id]>=350)
{
g_credite[id] = g_credite[id]-350
set_user_gravity(id, 0.4)
ChatColor(id, "!g[ShopZm] !yAi cumparat !teamGravity")
return PLUGIN_HANDLED
}else{
ChatColor(id, "!g[ShopZm] !yNu ai destule !teamcredite !")
}
}else
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL ShopZm !ydeoarece esti MORT!")
}
}
case 3:
{
if(is_user_alive(id))
{
if(g_credite[id]>=400)
{
g_credite[id] = g_credite[id]-400
delete_this(id);
engclient_cmd(id, "weapon_knife")
g_knifezm[id] = true;
set_pev(id, pev_viewmodel2, "models/shopBB/v_skinshop.mdl")
ChatColor(id, "!g[ShopZm] !yAi cumparat !teamSuperKnife (2x Dmg)")
return PLUGIN_HANDLED
}else{
ChatColor(id, "!g[ShopZm] !yNu ai destule !teamcredite !")
}
}else
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL ShopZm !ydeoarece esti MORT!")
}
}
case 4:
{
if(is_user_alive(id))
{
if(g_credite[id]>=500)
{
g_credite[id] = g_credite[id]-500
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha,0)
set_task(5.0, "scoateinv", id);
ChatColor(id, "!g[ShopZm] !yAi cumparat !teamInvizibilitate timp de 5 sec")
return PLUGIN_HANDLED
}else{
ChatColor(id, "!g[ShopZm] !yNu ai destule !teamcredite !")
}
}else
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL ShopZm !ydeoarece esti MORT!")
}
}
case 5:
{
if(is_user_alive(id))
{
if(g_credite[id]>=550)
{
g_credite[id] = g_credite[id]-550
set_user_godmode(id, 1 );
set_task(5.0, "scoategodmode", id);
ChatColor(id, "!g[ShopZm] !yAi cumparat !teamInvincibilitate !ytimp de 5 sec.")
return PLUGIN_HANDLED
}else{
ChatColor(id, "!g[ShopZm] !yNu ai destule !teamcredite !")
}
}else
{
ChatColor(id, "!g[ShopZm] !yNu poti accesa !teamMENIUL ShopZm !ydeoarece esti MORT!")
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public scoate_inv(id)
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha,100)
ChatColor(id, "!g[ShopZm] !yTi-a expirat invizibilitatea")
}
public scoategodmode(id) {
set_user_godmode(id, 0 );
ChatColor(id, "!g[ZmShop]!yAu exiprat cele 5 secunde de godmode !");
}
public client_putinserver(id)
{
if(get_user_team(id) == 1)
set_task(240.0, "mesajshop");
}
public client_connect(client)
{
Load(client)
}
public client_disconnect(client)
{
Save(client)
}
Load(client) {
new data[ 16 ], name[33];
get_user_name( client,name, sizeof( name ) - 1);
if( fvault_get_data( g_vaultName, name, data, sizeof( data ) - 1 ) )
{
g_credite[ client ] = str_to_num( data );
return;
}
g_credite[ client ] = 0;
}
Save(client) {
new data[ 16 ], name[33];
get_user_name( client,name, sizeof( name ) - 1);
num_to_str( g_credite[ client ], data, sizeof( data ) - 1 );
fvault_set_data( g_vaultName,name, data );
return;
}
//********************STOCK-URI********************
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, "!team", "^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();
}
}
}
}
Retired from Amxmodx
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 19-08-2015, 00:11:09
| Translate post to:
... (
Click for more languages
)
Nu ai mai dat reply deci cred ca merge daca nu imi dai pm..
Retired from Amxmodx
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
destroi112
, 18 August 2015 22:11
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Go to page
Previous
1
,
2
The time now is 03-04-2025, 18:28:37
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details