Raised This Month: $138 Target: $400
 34% 

[Request] 2 Erorr VIP SHOP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Member
Join Date: Sep 2019
Old 09-10-2019 , 07:40   [Request] 2 Erorr VIP SHOP
Reply With Quote #1

Can anyone fix this problem please...

Quote:
#include <amxmodx>
#include <colorchat>
#include <fun>
#include <cstrike>

#define VIP_FLAG ADMIN_LEVEL_H
#pragma semicolon 1

new const szCmds[][] = { "say /vip", "say_team /vip" };
new bool:Vip[33], g_maxplayers, MainMenu, WeaponsMenu, HealthMenu;
new const szGuns[][] = { "weapon_ak47", "weapon_m4a1", "weapon_famas", "weapon_galil", "weapon_m249", "weapon_g3sg1", "weapon_awp" };
new const szGunsNames[][] = { "AK47", "M4A1", "Famas", "Galil", "M249", "G3SG1", "AWP" };
new const iCenaPuske[] = { 2300, 2000, 2000, 2700, 8000, 7000, 3000 };
new const iCenaHP[] = { 1500, 2500, 3000, 4000};
new const iHealth[] = { 50, 100, 150, 200 };
new const szMainMenuItems[][] = { "\rWeapons Shop", "\yHealth Shop" };
new const szHealthMenuItems[][] = { "\y+50 HP \rCena: \w1500$", "\y+100 HP \rCena: \w2500$", "\y+150 HP \rCena: \w3000$", "\y+200 HP \rCena: \w4000$" };
new const szWeaponsMenuItems[][] = {
"\yAK47 Cena: \w2300$", "\yM4A1 Cena: \w2000$", "\yFAMAS Cena: \w2000$", "\yGALIL Cena: \w2700$",
"\yM249 \r(MASINKA) \yCena: \w8000$", "\yG3SG1 \r(RAFALNI SNIPER) \yCena: \w7000$", "\yAWP Cena: \w3000$"
};

public plugin_init() {
register_plugin("VIP BB", "1.0", "Cs-Pr0.");
register_message(get_user_msgid( "ScoreAttrib" ),"VipScoreboard");
register_event("DeathMsg", "Death", "a");
register_clcmd("say /vipshop", "VipShopCmd");
set_task(120.0, "reklama", _, _, _, "b");
g_maxplayers = get_maxplayers();
for(new i = 0; i < sizeof szCmds; i++) register_clcmd(szCmds[i], "cjenovnikCmd");

MainMenu = menu_create("VIP Shop", "VipShopHandler");
for(new i = 0; i < sizeof szMainMenuItems; i++) menu_additem(MainMenu, szMainMenuItems[i]);

WeaponsMenu = menu_create("\rWeapons Shop", "WeaponsMenuHandler");
for(new x = 0; x < sizeof szWeaponsMenuItems; x++) menu_additem(WeaponsMenu, szWeaponsMenuItems[x]);

HealthMenu = menu_create("\rHealth Shop", "HealthMenuHandler");
for(new z = 0; z < sizeof szHealthMenuItems; z++) menu_additem(HealthMenu, szHealthMenuItems[z]);
}

public client_putinserver(id) if(get_user_flags(id) & VIP_FLAG) Vip[id] = true;
public client_disconnect(id) if(Vip[id]) Vip[id] = false;

public VipScoreboard() {
new i = get_msg_arg_int(1);
if(is_user_alive(i) && Vip[i]) set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);
}

public Death(id) {
new attacker = read_data(1);
if(attacker > g_maxplayers || !Vip[attacker] || !is_user_alive(attacker)) return;
set_user_health(attacker, get_user_health(attacker) + 20);
}

public VipShopCmd(id) if(Vip[id] && is_user_alive(id)) menu_display(id, MainMenu);

public VipShopHandler(id, menu, item) {
if(item == MENU_EXIT) return PLUGIN_HANDLED;
switch(item) {
case 0: menu_display(id, WeaponsMenu);
case 1: menu_display(id, HealthMenu);
}
return PLUGIN_HANDLED;
}

public WeaponsMenuHandler(id, menu, item) {
if(item == MENU_EXIT) return PLUGIN_HANDLED;
new iMoney = cs_get_user_money(id);
new szText[200];
if(iMoney < iCenaPuske[item]) szText = "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu";
else {
cs_set_user_money(id, iMoney - iCenaPuske[item]);
give_item(id, szGuns[item]);
cs_set_user_bpammo(id, szGuns, 200);
formatex(szText, charsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$", szGunsNames[item], iCenaPuske[item]);
}
ColorChat(id, TEAM_COLOR, szText);
return PLUGIN_HANDLED;
}


public HealthMenuHandler(id, menu, item) {
if(item == MENU_EXIT) return PLUGIN_HANDLED;
new iMoney = cs_get_user_money(id);
new szText[200];
if(iMoney < iCenaHP[item]) szText = "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu";
else {
cs_set_user_money(id, iMoney - iCenaHP[item]);
set_user_health(id, get_user_health(id) + iHealth[item]);
formatex(szText, charsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$", iHealth[item], iCenaHP[item]);
}
ColorChat(id, TEAM_COLOR, szText);
return PLUGIN_HANDLED;
}

public cjenovnikCmd(id) {
static motd[1501], len;
new szName[33];
get_user_name(id, szName, charsmax(szName));
len = format(motd, 1500,"<body bgcolor=#000000><font color=#87cefa><pre>");
len += format(motd[len], 1500-len,"<h4><font color=^"blue^">%s - Sta dobijas ako si vip ? :</font></h4>", szName);
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP za svaki kill dobija 20 HP</font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"red^">U ScoreBaru pise VIP</font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP ima svoj SHOP!</font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>");
show_motd(id, motd, "cjenovnik");
return PLUGIN_CONTINUE;
}

public reklama() ColorChat(0, TEAM_COLOR, "^4[Shop]^1 Ako si^4 VIP^3 say /vipshop^1 da otvoris shop, VIP Sposobnosti say^3 /vip");

Last edited by Supremache; 09-10-2019 at 07:41.
Supremache is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-10-2019 , 07:57   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #2

put code in [PHP] or [PAWN]

Last edited by LearninG; 09-10-2019 at 07:58.
LearninG is offline
Supremache
Member
Join Date: Sep 2019
Old 09-10-2019 , 08:13   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #3

This is A problem https://prnt.sc/14zofv

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <fun>
#include <cstrike>

#define VIP_FLAG ADMIN_LEVEL_H
#pragma semicolon 1

new const szCmds[][] = { "say /vip""say_team /vip" };
new 
bool:Vip[33], g_maxplayersMainMenuWeaponsMenuHealthMenu;
new const 
szGuns[][] = { "weapon_ak47""weapon_m4a1""weapon_famas""weapon_galil""weapon_m249""weapon_g3sg1""weapon_awp" };
new const 
szGunsNames[][] = { "AK47""M4A1""Famas""Galil""M249""G3SG1""AWP" };
new const 
iCenaPuske[] = { 2300200020002700800070003000 };
new const 
iCenaHP[] = { 1500250030004000};
new const 
iHealth[] = { 50100150200 };
new const 
szMainMenuItems[][] = { "\rWeapons Shop""\yHealth Shop" };
new const 
szHealthMenuItems[][] = { "\y+50 HP \rCena: \w1500$""\y+100 HP \rCena: \w2500$""\y+150 HP \rCena: \w3000$""\y+200 HP \rCena: \w4000$" };
new const 
szWeaponsMenuItems[][] = {
"\yAK47 Cena: \w2300$""\yM4A1 Cena: \w2000$""\yFAMAS Cena: \w2000$""\yGALIL Cena: \w2700$",
"\yM249 \r(MASINKA) \yCena: \w8000$""\yG3SG1 \r(RAFALNI SNIPER) \yCena: \w7000$""\yAWP Cena: \w3000$"
};

public 
plugin_init() {
register_plugin("VIP BB""1.0""Cs-Pr0.");
register_message(get_user_msgid"ScoreAttrib" ),"VipScoreboard");
register_event("DeathMsg""Death""a");
register_clcmd("say /vipshop""VipShopCmd");
set_task(120.0"reklama"___"b");
g_maxplayers get_maxplayers();
for(new 
0sizeof szCmdsi++) register_clcmd(szCmds[i], "cjenovnikCmd");

MainMenu menu_create("VIP Shop""VipShopHandler");
for(new 
0sizeof szMainMenuItemsi++) menu_additem(MainMenuszMainMenuItems[i]);

WeaponsMenu menu_create("\rWeapons Shop""WeaponsMenuHandler");
for(new 
0sizeof szWeaponsMenuItemsx++) menu_additem(WeaponsMenuszWeaponsMenuItems[x]);

HealthMenu menu_create("\rHealth Shop""HealthMenuHandler");
for(new 
0sizeof szHealthMenuItemsz++) menu_additem(HealthMenuszHealthMenuItems[z]);
}

public 
client_putinserver(id) if(get_user_flags(id) & VIP_FLAGVip[id] = true;
public 
client_disconnect(id) if(Vip[id]) Vip[id] = false;

public 
VipScoreboard() {
new 
get_msg_arg_int(1);
if(
is_user_alive(i) && Vip[i]) set_msg_arg_int(2ARG_BYTEget_msg_arg_int(2)|4);
}

public 
Death(id) {
new 
attacker read_data(1);
if(
attacker g_maxplayers || !Vip[attacker] || !is_user_alive(attacker)) return;
set_user_health(attackerget_user_health(attacker) + 20);
}

public 
VipShopCmd(id) if(Vip[id] && is_user_alive(id)) menu_display(idMainMenu);

public 
VipShopHandler(idmenuitem) {
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
switch(
item) {
case 
0menu_display(idWeaponsMenu);
case 
1menu_display(idHealthMenu);
}
return 
PLUGIN_HANDLED;
}

public 
WeaponsMenuHandler(idmenuitem) {
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id);
new 
szText[200];
if(
iMoney iCenaPuske[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu";
else {
cs_set_user_money(idiMoney iCenaPuske[item]);
give_item(idszGuns[item]);
cs_set_user_bpammo(idszGuns200);
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"szGunsNames[item], iCenaPuske[item]);
}
ColorChat(idTEAM_COLORszText);
return 
PLUGIN_HANDLED;
}


public 
HealthMenuHandler(idmenuitem) {
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id);
new 
szText[200];
if(
iMoney iCenaHP[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu";
else {
cs_set_user_money(idiMoney iCenaHP[item]);
set_user_health(idget_user_health(id) + iHealth[item]);
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"iHealth[item], iCenaHP[item]);
}
ColorChat(idTEAM_COLORszText);
return 
PLUGIN_HANDLED;
}

public 
cjenovnikCmd(id) {
static 
motd[1501], len;
new 
szName[33];
get_user_name(idszNamecharsmax(szName));
len format(motd1500,"<body bgcolor=#000000><font color=#87cefa><pre>");
len += format(motd[len], 1500-len,"<h4><font color=^"blue^">%s - Sta dobijas ako si vip ? :</font></h4>"szName);
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP za svaki kill dobija 20 HP</font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"red^">U ScoreBaru pise VIP</font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP ima svoj SHOP!</font></h4>");
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>");
show_motd(idmotd"cjenovnik");
return 
PLUGIN_CONTINUE;
}

public 
reklama() ColorChat(0TEAM_COLOR"^4[Shop]^1 Ako si^4 VIP^3 say /vipshop^1 da otvoris shop, VIP Sposobnosti say^3 /vip"); 

Last edited by Supremache; 09-10-2019 at 08:14.
Supremache is offline
I AM NOOB
Junior Member
Join Date: May 2019
Location: NEPAL BOARDER
Old 09-10-2019 , 08:14   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #4

TRY THIS ONE :-

PHP Code:
#include <amxmodx> 
#include <colorchat> 
#include <fun>
#include <cstrike>

#define VIP_FLAG ADMIN_LEVEL_H 
#pragma semicolon 1 

new const szCmds[][] = { "say /vip""say_team /vip" };
new 
bool:Vip[33], g_maxplayersMainMenuWeaponsMenuHealthMenu
new const 
szGuns[][] = { "weapon_ak47""weapon_m4a1""weapon_famas""weapon_galil""weapon_m249""weapon_g3sg1""weapon_awp" };
const 
WEAPON_BITSUM = ((1<<CSW_SCOUT) | (1<<CSW_XM1014) | (1<<CSW_MAC10) | (1<<CSW_AUG) | (1<<CSW_UMP45) | (1<<CSW_SG550) | (1<<CSW_P90) | (1<<CSW_FAMAS) | (1<<CSW_AWP) | (1<<CSW_MP5NAVY) | (1<<CSW_M249) | (1<<CSW_M3) | (1<<CSW_M4A1) | (1<<CSW_TMP) | (1<<CSW_G3SG1) | (1<<CSW_SG552) | (1<<CSW_AK47) | (1<<CSW_GALI));

new const 
szGunsNames[][] = { "AK47""M4A1""Famas""Galil""M249""G3SG1""AWP" }; 
new const 
iCenaPuske[] = { 2300200020002700800070003000 }; 
new const 
iCenaHP[] = { 1500250030004000}; 
new const 
iHealth[] = { 50100150200 };
new const 
szMainMenuItems[][] = { "\rWeapons Shop""\yHealth Shop" };
new const 
szHealthMenuItems[][] = { "\y+50 HP \rCena: \w1500$""\y+100 HP \rCena: \w2500$""\y+150 HP \rCena: \w3000$""\y+200 HP \rCena: \w4000$" };
new const 
szWeaponsMenuItems[][] = {
"\yAK47 Cena: \w2300$""\yM4A1 Cena: \w2000$""\yFAMAS Cena: \w2000$""\yGALIL Cena: \w2700$"
"\yM249 \r(MASINKA) \yCena: \w8000$""\yG3SG1 \r(RAFALNI SNIPER) \yCena: \w7000$""\yAWP Cena: \w3000$"
};

public 
plugin_init()  
register_plugin("VIP BB""1.0""Cs-Pr0."); 
register_message(get_user_msgid"ScoreAttrib" ),"VipScoreboard"); 
register_event("DeathMsg""Death""a"); 
register_clcmd("say /vipshop""VipShopCmd"); 
set_task(120.0"reklama"___"b"); 
g_maxplayers get_maxplayers(); 
for(new 
0sizeof szCmdsi++) register_clcmd(szCmds[i], "cjenovnikCmd");

MainMenu menu_create("VIP Shop""VipShopHandler"); 
for(new 
0sizeof szMainMenuItemsi++) menu_additem(MainMenuszMainMenuItems[i]);

WeaponsMenu menu_create("\rWeapons Shop""WeaponsMenuHandler");
for(new 
0sizeof szWeaponsMenuItemsx++) menu_additem(WeaponsMenuszWeaponsMenuItems[x]);

HealthMenu menu_create("\rHealth Shop""HealthMenuHandler"); 
for(new 
0sizeof szHealthMenuItemsz++) menu_additem(HealthMenuszHealthMenuItems[z]);


public 
client_putinserver(id) if(get_user_flags(id) & VIP_FLAGVip[id] = true
public 
client_disconnect(id) if(Vip[id]) Vip[id] = false

public 
VipScoreboard() { 
new 
get_msg_arg_int(1); 
if(
is_user_alive(i) && Vip[i]) set_msg_arg_int(2ARG_BYTEget_msg_arg_int(2)|4); 


public 
Death(id) { 
new 
attacker read_data(1); 
if(
attacker g_maxplayers || !Vip[attacker] || !is_user_alive(attacker)) return; 
set_user_health(attackerget_user_health(attacker) + 20); 


public 
VipShopCmd(id) if(Vip[id] && is_user_alive(id)) menu_display(idMainMenu);

public 
VipShopHandler(idmenuitem) {
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
switch(
item) {
case 
0menu_display(idWeaponsMenu);
case 
1menu_display(idHealthMenu);
}
return 
PLUGIN_HANDLED


public 
WeaponsMenuHandler(idmenuitem) { 
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id); 
new 
szText[200]; 
if(
iMoney iCenaPuske[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu"
else { 
cs_set_user_money(idiMoney iCenaPuske[item]); 
give_item(idszGuns[item]);

static 
weapons[32], num;
get_user_weapons(idweaponsnum);

    for (new 
0numi++)
    {
        if (
WEAPON_BITSUM & (1<<weapons[i]))
        {
            static 
wname[32];
            
get_weaponname(weapons[i], wnamesizeof wname 1);
            
cs_set_user_bpammo(idWEAPON_BITSUM200);
        }
    }
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"szGunsNames[item], iCenaPuske[item]); 
}
ColorChat(idTEAM_COLORszText); 
return 
PLUGIN_HANDLED



public 
HealthMenuHandler(idmenuitem) { 
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id); 
new 
szText[200]; 
if(
iMoney iCenaHP[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu"
else { 
cs_set_user_money(idiMoney iCenaHP[item]); 
set_user_health(idget_user_health(id) + iHealth[item]); 
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"iHealth[item], iCenaHP[item]); 

ColorChat(idTEAM_COLORszText); 
return 
PLUGIN_HANDLED;


public 
cjenovnikCmd(id) { 
static 
motd[1501], len
new 
szName[33]; 
get_user_name(idszNamecharsmax(szName)); 
len format(motd1500,"<body bgcolor=#000000><font color=#87cefa><pre>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"blue^">%s - Sta dobijas ako si vip ? :</font></h4>"szName); 
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP za svaki kill dobija 20 HP</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">U ScoreBaru pise VIP</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP ima svoj SHOP!</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>"); 
show_motd(idmotd"cjenovnik"); 
return 
PLUGIN_CONTINUE;
}

public 
reklama() ColorChat(0TEAM_COLOR"^4[Shop]^1 Ako si^4 VIP^3 say /vipshop^1 da otvoris shop, VIP Sposobnosti say^3 /vip"); 
__________________
"Never think yourself as successfull ror DON because "
DON stands for DONKEY OF NATION

GIVE RESPECT = TAKE RESPECT

ONLY SIGNATURE , NO PERSONAL
I AM NOOB is offline
Supremache
Member
Join Date: Sep 2019
Old 09-10-2019 , 08:30   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #5

Now it's Have 8 erorr
Proof: https://i.ibb.co/1K1gkdj/Untitled.png


Quote:
Originally Posted by I AM NOOB View Post
TRY THIS ONE :-

PHP Code:
#include <amxmodx> 
#include <colorchat> 
#include <fun>
#include <cstrike>

#define VIP_FLAG ADMIN_LEVEL_H 
#pragma semicolon 1 

new const szCmds[][] = { "say /vip""say_team /vip" };
new 
bool:Vip[33], g_maxplayersMainMenuWeaponsMenuHealthMenu
new const 
szGuns[][] = { "weapon_ak47""weapon_m4a1""weapon_famas""weapon_galil""weapon_m249""weapon_g3sg1""weapon_awp" };
const 
WEAPON_BITSUM = ((1<<CSW_SCOUT) | (1<<CSW_XM1014) | (1<<CSW_MAC10) | (1<<CSW_AUG) | (1<<CSW_UMP45) | (1<<CSW_SG550) | (1<<CSW_P90) | (1<<CSW_FAMAS) | (1<<CSW_AWP) | (1<<CSW_MP5NAVY) | (1<<CSW_M249) | (1<<CSW_M3) | (1<<CSW_M4A1) | (1<<CSW_TMP) | (1<<CSW_G3SG1) | (1<<CSW_SG552) | (1<<CSW_AK47) | (1<<CSW_GALI));

new const 
szGunsNames[][] = { "AK47""M4A1""Famas""Galil""M249""G3SG1""AWP" }; 
new const 
iCenaPuske[] = { 2300200020002700800070003000 }; 
new const 
iCenaHP[] = { 1500250030004000}; 
new const 
iHealth[] = { 50100150200 };
new const 
szMainMenuItems[][] = { "\rWeapons Shop""\yHealth Shop" };
new const 
szHealthMenuItems[][] = { "\y+50 HP \rCena: \w1500$""\y+100 HP \rCena: \w2500$""\y+150 HP \rCena: \w3000$""\y+200 HP \rCena: \w4000$" };
new const 
szWeaponsMenuItems[][] = {
"\yAK47 Cena: \w2300$""\yM4A1 Cena: \w2000$""\yFAMAS Cena: \w2000$""\yGALIL Cena: \w2700$"
"\yM249 \r(MASINKA) \yCena: \w8000$""\yG3SG1 \r(RAFALNI SNIPER) \yCena: \w7000$""\yAWP Cena: \w3000$"
};

public 
plugin_init()  
register_plugin("VIP BB""1.0""Cs-Pr0."); 
register_message(get_user_msgid"ScoreAttrib" ),"VipScoreboard"); 
register_event("DeathMsg""Death""a"); 
register_clcmd("say /vipshop""VipShopCmd"); 
set_task(120.0"reklama"___"b"); 
g_maxplayers get_maxplayers(); 
for(new 
0sizeof szCmdsi++) register_clcmd(szCmds[i], "cjenovnikCmd");

MainMenu menu_create("VIP Shop""VipShopHandler"); 
for(new 
0sizeof szMainMenuItemsi++) menu_additem(MainMenuszMainMenuItems[i]);

WeaponsMenu menu_create("\rWeapons Shop""WeaponsMenuHandler");
for(new 
0sizeof szWeaponsMenuItemsx++) menu_additem(WeaponsMenuszWeaponsMenuItems[x]);

HealthMenu menu_create("\rHealth Shop""HealthMenuHandler"); 
for(new 
0sizeof szHealthMenuItemsz++) menu_additem(HealthMenuszHealthMenuItems[z]);


public 
client_putinserver(id) if(get_user_flags(id) & VIP_FLAGVip[id] = true
public 
client_disconnect(id) if(Vip[id]) Vip[id] = false

public 
VipScoreboard() { 
new 
get_msg_arg_int(1); 
if(
is_user_alive(i) && Vip[i]) set_msg_arg_int(2ARG_BYTEget_msg_arg_int(2)|4); 


public 
Death(id) { 
new 
attacker read_data(1); 
if(
attacker g_maxplayers || !Vip[attacker] || !is_user_alive(attacker)) return; 
set_user_health(attackerget_user_health(attacker) + 20); 


public 
VipShopCmd(id) if(Vip[id] && is_user_alive(id)) menu_display(idMainMenu);

public 
VipShopHandler(idmenuitem) {
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
switch(
item) {
case 
0menu_display(idWeaponsMenu);
case 
1menu_display(idHealthMenu);
}
return 
PLUGIN_HANDLED


public 
WeaponsMenuHandler(idmenuitem) { 
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id); 
new 
szText[200]; 
if(
iMoney iCenaPuske[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu"
else { 
cs_set_user_money(idiMoney iCenaPuske[item]); 
give_item(idszGuns[item]);

static 
weapons[32], num;
get_user_weapons(idweaponsnum);

    for (new 
0numi++)
    {
        if (
WEAPON_BITSUM & (1<<weapons[i]))
        {
            static 
wname[32];
            
get_weaponname(weapons[i], wnamesizeof wname 1);
            
cs_set_user_bpammo(idWEAPON_BITSUM200);
        }
    }
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"szGunsNames[item], iCenaPuske[item]); 
}
ColorChat(idTEAM_COLORszText); 
return 
PLUGIN_HANDLED



public 
HealthMenuHandler(idmenuitem) { 
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id); 
new 
szText[200]; 
if(
iMoney iCenaHP[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu"
else { 
cs_set_user_money(idiMoney iCenaHP[item]); 
set_user_health(idget_user_health(id) + iHealth[item]); 
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"iHealth[item], iCenaHP[item]); 

ColorChat(idTEAM_COLORszText); 
return 
PLUGIN_HANDLED;


public 
cjenovnikCmd(id) { 
static 
motd[1501], len
new 
szName[33]; 
get_user_name(idszNamecharsmax(szName)); 
len format(motd1500,"<body bgcolor=#000000><font color=#87cefa><pre>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"blue^">%s - Sta dobijas ako si vip ? :</font></h4>"szName); 
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP za svaki kill dobija 20 HP</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">U ScoreBaru pise VIP</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP ima svoj SHOP!</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>"); 
show_motd(idmotd"cjenovnik"); 
return 
PLUGIN_CONTINUE;
}

public 
reklama() ColorChat(0TEAM_COLOR"^4[Shop]^1 Ako si^4 VIP^3 say /vipshop^1 da otvoris shop, VIP Sposobnosti say^3 /vip"); 
Supremache is offline
thEsp
Veteran Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 09-10-2019 , 08:37   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #6

Quote:
Originally Posted by thEsp View Post
And always use local compiler instead of websites (supposedly "modified") made by some mentally-paralyzed fellows.
__________________
thEsp is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: I am living in house bsd
Old 09-10-2019 , 08:58   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #7

he forgot "{" in code


HTML Code:
AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Header size:           1148 bytes
Code size:             6980 bytes
Data size:            11956 bytes
Stack/heap size:      16384 bytes
Total requirements:   36468 bytes

PHP Code:
#include <amxmodx> 
#include <colorchat> 
#include <fun>
#include <cstrike>

#define VIP_FLAG ADMIN_LEVEL_H 
#pragma semicolon 1 

new const szCmds[][] = { "say /vip""say_team /vip" };
new 
bool:Vip[33], g_maxplayersMainMenuWeaponsMenuHealthMenu
new const 
szGuns[][] = { "weapon_ak47""weapon_m4a1""weapon_famas""weapon_galil""weapon_m249""weapon_g3sg1""weapon_awp" };
const 
WEAPON_BITSUM = ((1<<CSW_SCOUT) | (1<<CSW_XM1014) | (1<<CSW_MAC10) | (1<<CSW_AUG) | (1<<CSW_UMP45) | (1<<CSW_SG550) | (1<<CSW_P90) | (1<<CSW_FAMAS) | (1<<CSW_AWP) | (1<<CSW_MP5NAVY) | (1<<CSW_M249) | (1<<CSW_M3) | (1<<CSW_M4A1) | (1<<CSW_TMP) | (1<<CSW_G3SG1) | (1<<CSW_SG552) | (1<<CSW_AK47) | (1<<CSW_GALI));

new const 
szGunsNames[][] = { "AK47""M4A1""Famas""Galil""M249""G3SG1""AWP" }; 
new const 
iCenaPuske[] = { 2300200020002700800070003000 }; 
new const 
iCenaHP[] = { 1500250030004000}; 
new const 
iHealth[] = { 50100150200 };
new const 
szMainMenuItems[][] = { "\rWeapons Shop""\yHealth Shop" };
new const 
szHealthMenuItems[][] = { "\y+50 HP \rCena: \w1500$""\y+100 HP \rCena: \w2500$""\y+150 HP \rCena: \w3000$""\y+200 HP \rCena: \w4000$" };
new const 
szWeaponsMenuItems[][] = {
"\yAK47 Cena: \w2300$""\yM4A1 Cena: \w2000$""\yFAMAS Cena: \w2000$""\yGALIL Cena: \w2700$"
"\yM249 \r(MASINKA) \yCena: \w8000$""\yG3SG1 \r(RAFALNI SNIPER) \yCena: \w7000$""\yAWP Cena: \w3000$"
};

public 
plugin_init()
{  
/// THERE WAS HIS MISTAKE 
register_plugin("VIP BB""1.0""Cs-Pr0."); 
register_message(get_user_msgid"ScoreAttrib" ),"VipScoreboard"); 
register_event("DeathMsg""Death""a"); 
register_clcmd("say /vipshop""VipShopCmd"); 
set_task(120.0"reklama"___"b"); 
g_maxplayers get_maxplayers(); 
for(new 
0sizeof szCmdsi++) register_clcmd(szCmds[i], "cjenovnikCmd");

MainMenu menu_create("VIP Shop""VipShopHandler"); 
for(new 
0sizeof szMainMenuItemsi++) menu_additem(MainMenuszMainMenuItems[i]);

WeaponsMenu menu_create("\rWeapons Shop""WeaponsMenuHandler");
for(new 
0sizeof szWeaponsMenuItemsx++) menu_additem(WeaponsMenuszWeaponsMenuItems[x]);

HealthMenu menu_create("\rHealth Shop""HealthMenuHandler"); 
for(new 
0sizeof szHealthMenuItemsz++) menu_additem(HealthMenuszHealthMenuItems[z]);


public 
client_putinserver(id) if(get_user_flags(id) & VIP_FLAGVip[id] = true
public 
client_disconnect(id) if(Vip[id]) Vip[id] = false

public 
VipScoreboard() { 
new 
get_msg_arg_int(1); 
if(
is_user_alive(i) && Vip[i]) set_msg_arg_int(2ARG_BYTEget_msg_arg_int(2)|4); 


public 
Death(id) { 
new 
attacker read_data(1); 
if(
attacker g_maxplayers || !Vip[attacker] || !is_user_alive(attacker)) return; 
set_user_health(attackerget_user_health(attacker) + 20); 


public 
VipShopCmd(id) if(Vip[id] && is_user_alive(id)) menu_display(idMainMenu);

public 
VipShopHandler(idmenuitem) {
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
switch(
item) {
case 
0menu_display(idWeaponsMenu);
case 
1menu_display(idHealthMenu);
}
return 
PLUGIN_HANDLED


public 
WeaponsMenuHandler(idmenuitem) { 
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id); 
new 
szText[200]; 
if(
iMoney iCenaPuske[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu"
else { 
cs_set_user_money(idiMoney iCenaPuske[item]); 
give_item(idszGuns[item]);

static 
weapons[32], num;
get_user_weapons(idweaponsnum);

for (new 
0numi++)
{
if (
WEAPON_BITSUM & (1<<weapons[i]))
{
            static 
wname[32];
            
get_weaponname(weapons[i], wnamesizeof wname 1);
            
cs_set_user_bpammo(idWEAPON_BITSUM200);
        }
    }
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"szGunsNames[item], iCenaPuske[item]); 
}
ColorChat(idTEAM_COLORszText); 
return 
PLUGIN_HANDLED



public 
HealthMenuHandler(idmenuitem) { 
if(
item == MENU_EXIT) return PLUGIN_HANDLED;
new 
iMoney cs_get_user_money(id); 
new 
szText[200]; 
if(
iMoney iCenaHP[item]) szText "^4[Shop]^1 Nemas dovoljno para za ovu kupovinu"
else { 
cs_set_user_money(idiMoney iCenaHP[item]); 
set_user_health(idget_user_health(id) + iHealth[item]); 
formatex(szTextcharsmax(szText), "^4[Shop]^1 Kupio si^3 %s^1 za^3 %i^1$"iHealth[item], iCenaHP[item]); 

ColorChat(idTEAM_COLORszText); 
return 
PLUGIN_HANDLED;


public 
cjenovnikCmd(id) { 
static 
motd[1501], len
new 
szName[33]; 
get_user_name(idszNamecharsmax(szName)); 
len format(motd1500,"<body bgcolor=#000000><font color=#87cefa><pre>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"blue^">%s - Sta dobijas ako si vip ? :</font></h4>"szName); 
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP za svaki kill dobija 20 HP</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">U ScoreBaru pise VIP</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"red^">VIP ima svoj SHOP!</font></h4>"); 
len += format(motd[len], 1500-len,"<h4><font color=^"white^"><B>-</B> </font></h4>"); 
show_motd(idmotd"cjenovnik"); 
return 
PLUGIN_CONTINUE;
}

public 
reklama() ColorChat(0TEAM_COLOR"^4[Shop]^1 Ako si^4 VIP^3 say /vipshop^1 da otvoris shop, VIP Sposobnosti say^3 /vip"); 
__________________
MY ENGLISH = A0

FB : https://m.facebook.com/lucky.mali.755 (LUCKY GEHLOT)

SENTRY GUN LOVER : NEW SENTRY GUN MOD(CLICK HERE)
SHIELD755 is offline
Supremache
Member
Join Date: Sep 2019
Old 09-10-2019 , 12:24   Re: [Request] 2 Erorr VIP SHOP
Reply With Quote #8

Thx
Supremache is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:18.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode