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

PUBNite: BattleRoyale MOD - FINAL VERSION RELEASED!!!


Post New Thread Reply   
 
Thread Tools Display Modes
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-18-2019 , 08:02   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #291

Does callfunc_* returns the value back to the plugin if I want to? Like, callfunc_begin("hasItem", "customitem.amxx") and then

PHP Code:
public hasItem(id)
{
     return 
bHasItem[id]

Is that native able to do that?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 04-18-2019 at 12:50.
EFFx is offline
undead52
Senior Member
Join Date: Dec 2016
Old 04-18-2019 , 10:55   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #292

i'll wait for update for api.

but also there is problem with cvars, they should be pubnite but they are pubg in config file.

pubg_bot_name_t
pubg_bot_name_ct
undead52 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-18-2019 , 11:30   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #293

The #290 reply is already some API support, you can check the explanation there. Also, make sure you're using the lastest pubnite_cvars.cfg file.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
undead52
Senior Member
Join Date: Dec 2016
Old 04-18-2019 , 14:58   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #294

I think, we cant call that is an api since we need to edit sma files. we should able too add custom items with just enable Custom items plugin and include file

edit: cant disable items plugin too, if it get disabled, main plugin throws error, not stable build.

Last edited by undead52; 04-18-2019 at 15:04.
undead52 is offline
totopizza
AlliedModders Donor
Join Date: Oct 2015
Location: Honduras
Old 04-18-2019 , 17:06   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #295

Quote:
Originally Posted by EFFx View Post
Does callfunc_* returns the value back to the plugin if I want to? Like, callfunc_begin("hasItem", "customitem.amxx") and then

PHP Code:
public hasItem(id)
{
     return 
bHasItem[id]

Is that native able to do that?

A example:
PHP Code:
public _hasCustomItem(idiCustonItem)
{
    
    
//static iTotalItems; iTotalItems = ArraySize(g_ArrayCustomItems);
    // or:
    // new g_iTotalItems;
    // Then, When an item is registered you do that: g_iTotalItems++;

    // Item doesn't exists
    
if(iCustonItem >= g_iTotalItems || iCustonItem 0)
        return -
1;

    new 
arrayData[DataArray];
    
ArrayGetArray(g_ArrayCustomItemsiCustonItemarrayData);

    new 
iReturn 0;
    
/*
    public pubnite_has_longjump_native(id, &ret)
    {
        ret = g_HasLongJump[id];

        return ret;
    }
    */
    //iITemFuncID = "pubnite_has_longjump(id, &ret)"

    
callfunc_begin_i(arrayData[iItemFuncID], arrayData[iItemPlugin])
    
callfunc_push_int(id);
    
callfunc_push_intrf(iReturn)
    
callfunc_end();

    return 
iReturn;


Last edited by totopizza; 04-18-2019 at 17:10.
totopizza is offline
undead52
Senior Member
Join Date: Dec 2016
Old 04-19-2019 , 05:10   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #296

when we enabled custom items plugin and add an item custom_items.ini, that item should spawn in game. but nothing should happen since we didn't write any plugin for that item.

After we should able do things with enable pubnite_main.inc when items picked up.

Last edited by undead52; 04-19-2019 at 05:11.
undead52 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-19-2019 , 17:15   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #297

Lol, everything you said that doesn't happen, actually happen if you install ALL files that I shared correctly.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-20-2019 , 04:18   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #298

Quote:
Originally Posted by EFFx View Post
Does callfunc_* returns the value back to the plugin if I want to? Like, callfunc_begin("hasItem", "customitem.amxx") and then

PHP Code:
public hasItem(id)
{
     return 
bHasItem[id]

Is that native able to do that?

Yes it's possible the return value will be saved in callfunc_end.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
totopizza
AlliedModders Donor
Join Date: Oct 2015
Location: Honduras
Old 04-20-2019 , 04:22   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #299

Quote:
Originally Posted by Natsheh View Post
Yes it's possible the return value will be saved in callfunc_end.
https://www.amxmodx.org/api/amxmodx/callfunc_end

Quote:
Return
1 on success
-1 if the plugin was not found
-2 if the function was not found
totopizza is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-20-2019 , 11:44   Re: PUBNITE - BattleRoyale (PUBG + FORTNITE) - [v2.2 VERSION RELEASED]
Reply With Quote #300

Quote:
Originally Posted by totopizza View Post
not everything on the api(web) is correct :>

Code:
/* Make the actual call.
* Return value of the function called. */
native callfunc_end();
if you do not believe me test for yourself.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-20-2019 at 11:44.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 04:10.


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