Raised This Month: $32 Target: $400
 8% 

OciXCrom's Custom Shop + API


Post New Thread Reply   
 
Thread Tools Display Modes
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-16-2017 , 16:38   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #91

it's work i just make one myself thanks you so much for this cool examples now i learn how to set a item for shop.

but i keep get loose indentation in this line :

PHP Code:
public cshop_item_selected(iditem)
{
    if(
item != ITEM_VULCANUS5)
        return
    
Set_BitVar(g_Had_Vulcanus5,id// <-- loose indentation here why ? help me fix this
    
give_item(idweapon_vulcanus5)
    
    
g_Zoom[id] = 1
    g_GunState
[id] = 0
    
    
static GunGun fm_get_user_weapon_entity(idCSW_VULCANUS5)
    if(
pev_valid(Gun)) cs_set_weapon_ammo(GunCLIP)
    
    
cs_set_user_bpammo(idCSW_VULCANUS5BPAMMO)

yas17sin is offline
Send a message via ICQ to yas17sin
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-16-2017 , 17:01   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #92

Leave a blank line after the return. Anyways, it's not something you need to worry about.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-16-2017 , 17:34   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #93

yes it's working fine i just made 3 other one and they work

wow i love that shop
yas17sin is offline
Send a message via ICQ to yas17sin
vAx
Junior Member
Join Date: Oct 2011
Location: Hungary
Old 01-23-2017 , 01:15   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #94

Still doesn't save/load points allways (after reinstall server and trying with clean)!
vAx is offline
Send a message via MSN to vAx
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-23-2017 , 07:47   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #95

I really don't see how I can help you. You are the only one who has this problem.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-27-2017 , 12:57   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #96

Quote:
Originally Posted by OciXCrom View Post
1. Add this where all of the #includes are:

PHP Code:
#include <customshop> 
----------------------------------------
2. Add this under all the #include lines:

PHP Code:
additem ITEM_SOME_WEAPON 
(you can name it whatever you want)
----------------------------------------
3. Add this in plugin_precache():

PHP Code:
ITEM_SOME_WEAPON cshop_register_item("some_weapon""Some Very Cool Weapon"160001
16000 is the price and 1 is the limit. You can change all of the parameters in the function.

*if there is no plugin_precache() in the code, add the entire function:

PHP Code:
public plugin_precache()
{
    
ITEM_SOME_WEAPON cshop_register_item("some_weapon""Some Very Cool Weapon"160001)

----------------------------------------
4. Locate the code that registers the command that gives the weapon in plugin_init(). For example:

PHP Code:
register_clcmd "get_at4""give_at4"); 
Remove that line (or simply comment it with "//").
----------------------------------------
5. Locate the function that you just deleted. From Step #4 it's "give_at4" and it looks like this:

PHP Code:
public give_at4(id)
{
    
// Some code...

Change the function's name to cshop_item_selected(id, item) and in the beginning of the function add this:

PHP Code:
public cshop_item_selected(iditem)
{
    if(
item != ITEM_SOME_WEAPON)
        return

    
// The rest of the code remains the same...

----------------------------------------
6. Find out how the weapon is removed from the player. For example, the at4cs plugin uses this line to remove it:

PHP Code:
g_had_at4cs[id] = 
According to that line, create the following function:

PHP Code:
public cshop_item_removed(iditem)
{
    if(
item == ITEM_SOME_WEAPON)
    {
        
g_had_at4cs[id] = 0
    
}

and if i want to make a item with point how ?
yas17sin is offline
Send a message via ICQ to yas17sin
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-27-2017 , 15:16   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #97

i try the new version you post and all cmpile fine and good but the plugins not work check this :

Spoiler
yas17sin is offline
Send a message via ICQ to yas17sin
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-27-2017 , 17:47   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #98

Try compiling again. The new version is literally a fix in just 1 line of the code, so you obviously did something wrong.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 01-27-2017 , 18:42   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #99

no all compile fine.

but i jsut don't know.

please fix this.
yas17sin is offline
Send a message via ICQ to yas17sin
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-27-2017 , 20:45   Re: OciXCrom's Custom Shop 3.5 + API
Reply With Quote #100

I can't fix something that isn't broken. You either compiled them with a different AMXX version or you didn't add the .amxx files at all.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



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 22:59.


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