Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]Probleme plugine
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Counter-Strike: Help zone
Author
Message
660
Aleex Armanu
[Detinator Server]
Status: Offline
(since 16-05-2022 10:06)
Joined: 25 Feb 2015
Posts: 2285
,
Topics: 267
Location:
Cluj Napoca
Reputation:
844.2
Votes
: 96
Posted: 14-04-2015, 13:26:38
| Translate post to:
... (
Click for more languages
)
Am modificat plugin shop incat sa nu mai apara shop.
Pe serverul de teste mergea, l-am pus in furien.ini al 3-lea. Cand l-am pus in plugin.ini nu mai aparea cutitul la T
.
Din ce cauza nu merge?
Spoiler:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN "Furien Shop Menu"
#define VERSION "0.1"
#define AUTHOR "sasuke_cstrike"
// -- || Take Damage
#define IsPlayer(%0) ( 1 <= %0 <= g_iMaxPlayers )
new g_iMaxPlayers;
// -- || Bool's
new bool:superknife [ 33 ];
// -- || Constante
new const v_superknife [ 66 ] = "models/fr_freakz/v_knife.mdl"; // Pui tu model-ul
new const p_superknife [ 64 ] = "models/fr_freakz/v_knife.mdl"; // Pui tu model-ul
new const PICK_AMMO[] = "items/9mmclip1.wav";
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// -- || Chat
register_clcmd( "say shop", "ShopCmd", -1);
register_clcmd( "say /shop", "ShopCmd", -1);
register_clcmd( "say_team shop", "ShopCmd", -1);
register_clcmd( "say_team /shop", "ShopCmd", -1);
// -- || Event's
register_event("DeathMsg", "eDeath", "a")
register_event ( "CurWeapon", "CurrWeapon", "be", "1=1" );
// -- || HamSandwich
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
RegisterHam ( Ham_Spawn, "player", "Spawn", true );
// -- || TakeDamage
g_iMaxPlayers = get_maxplayers ( );
// Add your code here...
}
public eDeath ( ) {
if ( superknife [ read_data ( 2 ) ] ) {
superknife [ read_data ( 2 ) ] = false;
}
}
public plugin_precache ( ) {
//Super-Knife
precache_model ( v_superknife );
precache_model ( p_superknife );
precache_sound(PICK_AMMO);
}
public client_disconnect ( id ) {
superknife[ id ] = false;
}
public Spawn( id ) {
if(get_user_team(id) == 1) {
fm_strip_user_weapons(id) ;
fm_give_item(id, "weapon_knife") ;
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_flashbang");
cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
}
if(get_user_team(id) == 2) {
fm_strip_user_weapons(id) ;
fm_give_item(id, "weapon_knife") ;
fm_give_item(id, "weapon_hegrenade");
superknife[ id ] = false;
}
}
public CurrWeapon ( id ) {
if ( superknife [ id ] && get_user_weapon ( id ) == CSW_KNIFE ) {
set_pev ( id, pev_viewmodel2, v_superknife );
set_pev ( id, pev_weaponmodel2, p_superknife );
}
}
public ShopCmd(id) {
new iMoney = cs_get_user_money(id);
switch(get_user_team(id))
{
case 1:
{
new Titlu[101];
formatex(Titlu, 100, "\yFurien Shop^n\yBani Tai:\r%d$", iMoney);
new ShopMenu = menu_create(Titlu, "weaponshandler");
if(iMoney < 10000) {
menu_additem(ShopMenu, "Super Knife \d10000$", "1", 0);
}
else
{
menu_additem(ShopMenu, "Super Knife \y10000$", "1", 0);
}
if(iMoney < 3000) {
menu_additem(ShopMenu, "\r+50 \wHP \d3000$", "2", 0);
}
else
{
menu_additem(ShopMenu, "\r+50 \wHP \y3000$", "2", 0);
}
if(iMoney < 500) {
menu_additem(ShopMenu, "\r+50\w AP \d500$", "3", 0);
}
else
{
menu_additem(ShopMenu, "\r+50\w AP \y500$", "3", 0);
}
if(iMoney < 3000) {
menu_additem(ShopMenu, "He Grenade \d3000$", "4", 0);
}
else
{
menu_additem(ShopMenu, "He Grenade \y3000$", "4", 0);
}
menu_setprop(ShopMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, ShopMenu, 0);
}
case 2:
{
new Titlu[101];
formatex(Titlu, 100, "\yAnti-Furien Shop^n\yBani Tai:\r%d$", iMoney);
new ShopMenu = menu_create( Titlu, "weaponshandler");
if(iMoney < 500) {
menu_additem(ShopMenu, "Defuse KIT \d500$", "1", 0);
}
else
{
menu_additem(ShopMenu, "Defuse KIT \y500$", "1", 0);
}
if(iMoney < 3000) {
menu_additem(ShopMenu, "\r+50 \wHP \d3000$", "2", 0);
}
else
{
menu_additem(ShopMenu, "\r+50 \wHP \y3000$", "2", 0);
}
if(iMoney < 500) {
menu_additem(ShopMenu, "\r+50\w AP \d500$", "3", 0);
}
else
{
menu_additem(ShopMenu, "\r+50\w AP \y500$", "3", 0);
}
if(iMoney < 6000) {
menu_additem(ShopMenu, "He Grenade \d6000$", "4", 0);
}
else
{
menu_additem(ShopMenu, "He Grenade \y6000$", "4", 0);
}
menu_setprop(ShopMenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, ShopMenu, 0);
}
}
return 1;
}
public weaponshandler(id, ShopMenu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(ShopMenu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(ShopMenu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
switch(get_user_team(id))
{
case 1:
{
if(superknife[ id ]) {
ColorChat(id, "^x04[Shop]^x01 Ai deja super knife.");
return 1;
}
else
{
new iMoney = cs_get_user_money(id) - 10000;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
superknife[ id ] = true;
CurrWeapon(id);
cs_set_user_money(id, iMoney);
}
}
}
case 2:
{
new iMoney = cs_get_user_money(id) - 500;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_give_item ( id, "item_thighpack" );
cs_set_user_money(id, iMoney);
}
}
}
}
case 2:
{
switch(get_user_team(id))
{
case 1:
{
new iMoney = cs_get_user_money(id) - 3000;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
new iHealth = get_user_health(id);
if(iHealth >= 250) {
ColorChat(id, "^x04[Shop]^x01 Ai atins limita maxima de hp.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_set_user_health(id, iHealth + 50);
cs_set_user_money(id, iMoney);
}
}
}
case 2:
{
new iMoney = cs_get_user_money(id) - 3000;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
new iHealth = get_user_health(id);
if(iHealth >= 250) {
ColorChat(id, "^x04[Shop]^x01 Ai atins limita maxima de hp.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_set_user_health(id, iHealth + 50);
cs_set_user_money(id, iMoney);
}
}
}
}
}
case 3:
{
switch(get_user_team(id))
{
case 1:
{
new iMoney = cs_get_user_money(id) - 500;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
new iArmor = get_user_armor(id);
if(iArmor >= 200) {
ColorChat(id, "^x04[Shop]^x01 Ai atins limita maxima de ap.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_set_user_armor(id, iArmor + 50);
cs_set_user_money(id, iMoney);
}
}
}
case 2:
{
new iMoney = cs_get_user_money(id) - 500;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
new iArmor = get_user_armor(id);
if(iArmor >= 200) {
ColorChat(id, "^x04[Shop]^x01 Ai atins limita maxima de ap.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_set_user_armor(id, iArmor + 50);
cs_set_user_money(id, iMoney);
}
}
}
}
}
case 4:
{
switch(get_user_team(id))
{
case 1:
{
new iMoney = cs_get_user_money(id) - 3000;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_give_item ( id, "weapon_hegrenade" );
cs_set_user_money(id, iMoney);
}
}
case 2:
{
new iMoney = cs_get_user_money(id) - 6000;
if(iMoney < 0) {
ColorChat(id, "^x04[Shop]^x01 Nu ai suficienti bani.");
}
else
{
emit_sound(id, CHAN_ITEM, PICK_AMMO, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
fm_give_item ( id, "weapon_hegrenade" );
cs_set_user_money(id, iMoney);
}
}
}
}
}
menu_destroy(ShopMenu);
return PLUGIN_HANDLED;
}
public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits ) {
if ( IsPlayer ( iAttacker ) ) {
if( iInflictor == iAttacker && superknife [ iAttacker ] && is_user_alive( iAttacker ) && get_user_weapon( iAttacker ) == CSW_KNIFE && get_user_team( iAttacker ) == 1 ) {
SetHamParamFloat( 4, fDamage * 2.0);
return HAM_HANDLED;
}
}
return HAM_IGNORED;
}
stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!x04", "^4");
replace_all(msg, 190, "!x01", "^1");
replace_all(msg, 190, "!x03", "^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();
}
}
}
}
ZOMBIE.FREAKZ.RO
#
INTERNATIONAL ZM
0
0
Back to top
[Freakz]Mr.Andrei
[Mentally Stable]
Status: Offline
(since 04-06-2015 12:25)
Joined: 14 Apr 2015
Posts: 11
,
Topics: 1
Location:
Romania
Reputation:
32.4
Votes
: 1
Posted: 14-04-2015, 18:10:36
| Translate post to:
... (
Click for more languages
)
Eu am vazut ca la tine pe server atunci cand scri shop ,apare in chat,dar atunci cand scri /shop nu apare.
Ar fi bine sa scoti shopul atunci cand scri "shop" si sa il pastrezi doar cand se scrie "/shop"
 
Staff message
(
-P!C@-
):
Citeste ce scrie aici te rog: https://www.freakz.ro/forum/Info-t342834.html
0
0
Back to top
Aleex Armanu
[Detinator Server]
Status: Offline
(since 16-05-2022 10:06)
Joined: 25 Feb 2015
Posts: 2285
,
Topics: 267
Location:
Cluj Napoca
Reputation:
844.2
Votes
: 96
Posted: 14-04-2015, 18:50:50
| Translate post to:
... (
Click for more languages
)
Nu ma ajuta..
Ce plugine afecteaza neafisarea cuvantului shop?
ZOMBIE.FREAKZ.RO
#
INTERNATIONAL ZM
0
0
Back to top
EDUTz
[HardcoreAmxxScripter]
Status: Offline
(since 15-08-2021 16:34)
Joined: 27 Dec 2010
Posts: 4306
,
Topics: 244
Location:
Jud. Miserupia, sat Bagadanc
Reputation:
4085
Votes
: 179
Posted: 15-04-2015, 00:26:22
| Translate post to:
... (
Click for more languages
)
Pluginurire pe care le-ai bagat tu,evident ...
Eventual lasa lista aici pt amandoua listele si vedem apoi ce si cum ...
Pentru pluginuri complicate le fac cu $$ pe paypal/psc. PM
0
0
Back to top
Aleex Armanu
[Detinator Server]
Status: Offline
(since 16-05-2022 10:06)
Joined: 25 Feb 2015
Posts: 2285
,
Topics: 267
Location:
Cluj Napoca
Reputation:
844.2
Votes
: 96
Posted: 15-04-2015, 08:58:56
| Translate post to:
... (
Click for more languages
)
Am rezolvat. Dati TC
ZOMBIE.FREAKZ.RO
#
INTERNATIONAL ZM
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
TwisTer
, 16 April 2015 14:51
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Counter-Strike: Help zone
The time now is 11-01-2025, 00:14:02
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