It is currently 19 Nov 2018 21:22



Forum rules


Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .



Reply to topic  [ 3 posts ] 
 Problema compilare plugin dm_items_menu [rezolvat] 
Author Message
Membru, skill +1
Membru, skill +1
User avatar

Joined: 27 Aug 2015 23:23
Posts: 106
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Salut, cand incerc sa compilez pluginul imi da eroarea asta:
Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team


shop2.sma(207) : error 014: invalid statement; not in switch
shop2.sma(207) : warning 215: expression has no effect
shop2.sma(207) : error 001: expected token: ";", but found ":"
shop2.sma(207) : error 029: invalid expression, assumed zero
shop2.sma(207) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
Done.



Aici este pluginul:
Quote:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta >
#include < engine >
#include < fun>

#define PLUGIN "Shop"
#define VERSION "1.0"
#define AUTHOR "50Cent # HackeR"

#pragma tabsize 0

new bool:g_speed[33];
new bool:g_madness[33];

new const knife_model[] = "models/EscapeWATF/v_combatCSO.mdl"

native give_BWGlock(id);
native give_Balrog3(id);

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

register_clcmd("say /shop","ShopMenu");
register_clcmd("say_team /shop","ShopMenu");
register_event("CurWeapon", "check_weapon", "be", "1=1")
register_logevent("round_end", 2, "1=Round_End");
}

public plugin_precache()
precache_model(knife_model)

public Player_Spawn(id){
g_speed[id] = false
g_madness[id] = false
}

public ShopMenu(id)
{

if(is_user_alive(id) && cs_get_user_team( id ) == CS_TEAM_CT)
{
new szTitlu[128];
formatex(szTitlu, charsmax(szTitlu), "\yShop Menu \rHUMAN^n\yBani Tai: \r%d", cs_get_user_money(id));

new menu = menu_create(szTitlu, "CaseShopMenuCT");

menu_additem(menu, " \w Napalm Nades \y[3000 $]", "1");
menu_additem(menu, " \w Glock-18 \y[700 $]", "2");
menu_additem(menu, " \w PipeBomb \y[5000 $]", "3");
menu_additem(menu, " \w Knife Speed [+20%] \y[5500 $]", "4");
menu_additem(menu, " \w EscapeWATF Pack# \y[7000 $]", "5");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0 );
}
if(is_user_alive(id) && cs_get_user_team( id ) == CS_TEAM_T)
{
new szTitlu[128];
formatex(szTitlu, charsmax(szTitlu), "\yShop Menu \rZOMBIE^n\yBani Tai: \r%d", cs_get_user_money(id));

new menu2 = menu_create(szTitlu, "CaseShopMenuT");

menu_additem(menu2, " \w Parachute \y[700 $]", "1");
menu_additem(menu2, " \w Invisibile [3 secunde] \y[6000 $]", "2");
menu_additem(menu2, " \w No KnockBack [3 secunde] \y[8000 $]", "3");
menu_additem(menu2, " \w Drag Ability \y[10000 $]", "4");

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

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

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:{
if (cs_get_user_money(id) < 3000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g3000$");
}
else
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat un !gNapalm Nades");
cs_set_user_money(id, cs_get_user_money(id) - 3000);
give_item(id,"weapon_flashbang");
}
}
case 2: {
if (cs_get_user_money(id) < 700)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g700$");
}
else
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat arma !gGlock-18");
cs_set_user_money(id, cs_get_user_money(id) - 700);
give_BWGlock(id);
}
}
case 3: {
if (cs_get_user_money(id) < 0)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g5000$");
}
else
{
client_cmd(id, "^"say /pipe^"");
cs_set_user_money(id, cs_get_user_money(id) - 0);
}
}
case 4: {
if(g_speed[id])
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi deja !gKnife Speed [+20%]");
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) < 5500)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g5500$");
}
else
{
cs_set_user_money(id, cs_get_user_money(id) - 5500);
g_speed[id] = true
check_weapon(id)
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gKnife speed [+20%]");
}
}
case 5: {
if (cs_get_user_money(id) < 7000)
{
ColorChat(id, "!g[Escape.Watf.Ro]!yAi nevoie de !g7000$");
}
else
{
cs_set_user_money(id, cs_get_user_money(id) - 7000);
if (!user_has_weapon(id, CSW_MP5NAVY))
give_Balrog3(id);
give_item(id,"weapon_g3sg1");
give_item(id,"weapon_sg550");
give_item(id,"weapon_m249");
give_item(id,"weapon_flashbang");
cs_set_user_bpammo( id, CSW_G3SG1, 250 )
cs_set_user_bpammo( id, CSW_SG550, 250 )
cs_set_user_bpammo( id, CSW_M249, 250 )
cs_set_user_bpammo( id, CSW_FLASHBANG, 3)
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gEscape Weapon Pack");

}
}
}
menu_destroy (menu);
return PLUGIN_HANDLED;
}

public CaseShopMenuT(id, menu2, item) {
if(item == MENU_EXIT) {
menu_destroy(menu2);
return PLUGIN_HANDLED;
}

new data [6], szName [64];
new access, callback;
menu_item_getinfo (menu2, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:{
if (cs_get_user_money(id) < 0)
{
ColorChat(id, "!G[Ze.KnowZone.Ro]!yAi nevoie de !g700$");
}
else
{
client_cmd(id, "^"say buy_parachute^"");
cs_set_user_money(id, cs_get_user_money(id) - 0);
}
}
case 2: {
if (cs_get_user_money(id) < 6000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g6000$");
}
else
{
set_entity_visibility(id, 0);
set_task(3.0,"removeInvis",id);
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gInvizibilitate");
cs_set_user_money(id, cs_get_user_money(id) - 6000);
}

case 3: {
if (cs_get_user_money(id) < 8000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g8000$");
}
else
{
g_madness[id] = true;
set_user_godmode(id, 1)
set_task(3.0, "remove_godmode", id)
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gNo KnockBack");
cs_set_user_money(id, cs_get_user_money(id) - 8000);
}
}
case 4: {
if (cs_get_user_money(id) < 10000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g10000$");
}
else
{
if( get_user_armor ( id ) < 1 ) {

client_cmd(id, "^"say /drag^"");
cs_set_user_money(id, cs_get_user_money(id) - 10000);
}
}
}
}
menu_destroy (menu2);
return PLUGIN_HANDLED;
}

public check_weapon(id)
{
if(!is_user_alive(id) || get_user_team(id) != 2)
return;

if(g_speed[id] && get_user_weapon(id) == CSW_KNIFE)
{
set_pev(id, pev_maxspeed, 290.0)
set_pev(id, pev_viewmodel2, knife_model)
}
}

public remove_godmode(id)
{
if(!is_user_alive(id) || !g_madness[id])
return;
ColorChat(id, "!g[Ze.KnowZone.Ro]!yTi-a expirat No KnockBack");
set_user_godmode(id, 0)
g_madness[id] = false
}
public removeInvis(id) {
set_entity_visibility(id, 1);
set_hudmessage ( 255, 255, 0, -1.0, 0.88, 0, 1.0, 1.1, 0.0, 0.0, 7 );
ColorChat(id, "!g[Ze.KnowZone.Ro]!yTi-a expirat invizibilitatea");
return 0;
}
public client_connect(id)
{
g_speed[id] = false
g_madness[id] = false
}

public client_putinserver(id)
{
g_speed[id] = false
g_madness[id] = false
}

public client_disconnect(id)
{
g_speed[id] = false
g_madness[id] = false
}

public round_end()
{
static id
for(id = 1; id <= 32; id++)
{
g_speed[id] = false
g_madness[id] = false
}
}

stock ColorChat(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();
}
}
}
}

in cazul in care este nevoie de pluginul fara modificari: http://www.girlshare.ro/3490146886.6

Ma ajutati sa compilez pluginul asta va rog :)


Last edited by *Or!g!naL* on 19 Jul 2018 18:33, edited 1 time in total.

rezolvat



10 Jul 2018 20:39
Profile multumesc WWW
Online
Utilizator neserios
Utilizator neserios

Joined: 10 Oct 2014 06:21
Posts: 3427
Location: Roman, Neamț
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Membru Club eXtreamCS (6 luni)
Restrictie moderator
Utilizator neserios
Fond eXtream: 0
shop.sma | Afiseaza codul
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta >
#include < engine >
#include < fun>

#define PLUGIN "Shop"
#define VERSION "1.0"
#define AUTHOR "50Cent # HackeR"

#pragma tabsize 0

new bool:g_speed[33];
new bool:g_madness[33];

new const knife_model[] = "models/EscapeWATF/v_combatCSO.mdl"

native give_BWGlock(id);
native give_Balrog3(id);

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

register_clcmd("say /shop","ShopMenu");
register_clcmd("say_team /shop","ShopMenu");
register_event("CurWeapon", "check_weapon", "be", "1=1")
register_logevent("round_end", 2, "1=Round_End");
}

public plugin_precache()
precache_model(knife_model)

public Player_Spawn(id){
g_speed[id] = false
g_madness[id] = false
}

public ShopMenu(id)
{

if(is_user_alive(id) && cs_get_user_team( id ) == CS_TEAM_CT)
{
new szTitlu[128];
formatex(szTitlu, charsmax(szTitlu), "\yShop Menu \rHUMAN^n\yBani Tai: \r%d", cs_get_user_money(id));

new menu = menu_create(szTitlu, "CaseShopMenuCT");

menu_additem(menu, " \w Napalm Nades \y[3000 $]", "1");
menu_additem(menu, " \w Glock-18 \y[700 $]", "2");
menu_additem(menu, " \w PipeBomb \y[5000 $]", "3");
menu_additem(menu, " \w Knife Speed [+20%] \y[5500 $]", "4");
menu_additem(menu, " \w EscapeWATF Pack# \y[7000 $]", "5");

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0 );
}
if(is_user_alive(id) && cs_get_user_team( id ) == CS_TEAM_T)
{
new szTitlu[128];
formatex(szTitlu, charsmax(szTitlu), "\yShop Menu \rZOMBIE^n\yBani Tai: \r%d", cs_get_user_money(id));

new menu2 = menu_create(szTitlu, "CaseShopMenuT");

menu_additem(menu2, " \w Parachute \y[700 $]", "1");
menu_additem(menu2, " \w Invisibile [3 secunde] \y[6000 $]", "2");
menu_additem(menu2, " \w No KnockBack [3 secunde] \y[8000 $]", "3");
menu_additem(menu2, " \w Drag Ability \y[10000 $]", "4");

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

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

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:{
if (cs_get_user_money(id) < 3000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g3000$");
}
else
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat un !gNapalm Nades");
cs_set_user_money(id, cs_get_user_money(id) - 3000);
give_item(id,"weapon_flashbang");
}
}
case 2: {
if (cs_get_user_money(id) < 700)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g700$");
}
else
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat arma !gGlock-18");
cs_set_user_money(id, cs_get_user_money(id) - 700);
give_BWGlock(id);
}
}
case 3: {
if (cs_get_user_money(id) < 0)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g5000$");
}
else
{
client_cmd(id, "^"say /pipe^"");
cs_set_user_money(id, cs_get_user_money(id) - 0);
}
}
case 4: {
if(g_speed[id])
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi deja !gKnife Speed [+20%]");
return PLUGIN_HANDLED;
}
if (cs_get_user_money(id) < 5500)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g5500$");
}
else
{
cs_set_user_money(id, cs_get_user_money(id) - 5500);
g_speed[id] = true
check_weapon(id)
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gKnife speed [+20%]");
}
}
case 5: {
if (cs_get_user_money(id) < 7000)
{
ColorChat(id, "!g[Escape.Watf.Ro]!yAi nevoie de !g7000$");
}
else
{
cs_set_user_money(id, cs_get_user_money(id) - 7000);
if (!user_has_weapon(id, CSW_MP5NAVY))
give_Balrog3(id);
give_item(id,"weapon_g3sg1");
give_item(id,"weapon_sg550");
give_item(id,"weapon_m249");
give_item(id,"weapon_flashbang");
cs_set_user_bpammo( id, CSW_G3SG1, 250 )
cs_set_user_bpammo( id, CSW_SG550, 250 )
cs_set_user_bpammo( id, CSW_M249, 250 )
cs_set_user_bpammo( id, CSW_FLASHBANG, 3)
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gEscape Weapon Pack");

}
}
}
menu_destroy (menu);
return PLUGIN_HANDLED;
}

public CaseShopMenuT(id, menu2, item) {
if(item == MENU_EXIT) {
menu_destroy(menu2);
return PLUGIN_HANDLED;
}

new data [6], szName [64];
new access, callback;
menu_item_getinfo (menu2, item, access, data,charsmax (data), szName,charsmax (szName), callback);
new key = str_to_num (data);

switch (key)
{
case 1:
{
if (cs_get_user_money(id) < 0)
{
ColorChat(id, "!G[Ze.KnowZone.Ro]!yAi nevoie de !g700$");
}
else
{
client_cmd(id, "^"say buy_parachute^"");
cs_set_user_money(id, cs_get_user_money(id) - 0);
}
}
case 2: {
if (cs_get_user_money(id) < 6000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g6000$");
}
else
{
set_entity_visibility(id, 0);
set_task(3.0,"removeInvis",id);
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gInvizibilitate");
cs_set_user_money(id, cs_get_user_money(id) - 6000);
}
}

case 3: {
if (cs_get_user_money(id) < 8000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g8000$");
}
else
{
g_madness[id] = true;
set_user_godmode(id, 1)
set_task(3.0, "remove_godmode", id)
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi cumparat !gNo KnockBack");
cs_set_user_money(id, cs_get_user_money(id) - 8000);
}
}
case 4: {
if (cs_get_user_money(id) < 10000)
{
ColorChat(id, "!g[Ze.KnowZone.Ro]!yAi nevoie de !g10000$");
}
else
{
if( get_user_armor ( id ) < 1 ) {

client_cmd(id, "^"say /drag^"");
cs_set_user_money(id, cs_get_user_money(id) - 10000);
}
}
}
}
menu_destroy (menu2);
return PLUGIN_HANDLED;
}

public check_weapon(id)
{
if(!is_user_alive(id) || get_user_team(id) != 2)
return;

if(g_speed[id] && get_user_weapon(id) == CSW_KNIFE)
{
set_pev(id, pev_maxspeed, 290.0)
set_pev(id, pev_viewmodel2, knife_model)
}
}

public remove_godmode(id)
{
if(!is_user_alive(id) || !g_madness[id])
return;
ColorChat(id, "!g[Ze.KnowZone.Ro]!yTi-a expirat No KnockBack");
set_user_godmode(id, 0)
g_madness[id] = false
}
public removeInvis(id) {
set_entity_visibility(id, 1);
set_hudmessage ( 255, 255, 0, -1.0, 0.88, 0, 1.0, 1.1, 0.0, 0.0, 7 );
ColorChat(id, "!g[Ze.KnowZone.Ro]!yTi-a expirat invizibilitatea");
return 0;
}
public client_connect(id)
{
g_speed[id] = false
g_madness[id] = false
}

public client_putinserver(id)
{
g_speed[id] = false
g_madness[id] = false
}

public client_disconnect(id)
{
g_speed[id] = false
g_madness[id] = false
}

public round_end()
{
static id
for(id = 1; id <= 32; id++)
{
g_speed[id] = false
g_madness[id] = false
}
}

stock ColorChat(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();
}
}
}
}

_________________
METODA BOOST/DROP 2018 GRATUITA (pentru CS 1.6)
AMX XMAS Gifts 2.0 - Private Plugin
AMX Christmass Addons (2018)
[VAND] Addons Zombie v7.1 (Release 10 February 2018)[/center]


10 Jul 2018 22:06
Profile multumesc
Membru, skill +1
Membru, skill +1
User avatar

Joined: 27 Aug 2015 23:23
Posts: 106
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Multumesc mult!


10 Jul 2018 22:34
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 78 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group