Raised This Month: $ Target: $400
 0% 

Suggestion / Subplugin Request [Req] Need ZP Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-23-2011 , 15:37   Re: [Req] Need ZP Plugin
Reply With Quote #1

It should be like this:
I connect i don't get Ammo. The round is over starts a new round and than i get the 5 ammo. The round ends and starts a new round i get another 5 ammo and so on. Not like now, now when i connect i get 5 ammo, retry 5 ammo, retry 5 ammo.
yOou Know Me is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 12-23-2011 , 15:48   Re: [Req] Need ZP Plugin
Reply With Quote #2

Joker he wants on every round to get ammo packs...
__________________
H.RED.ZONE is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-23-2011 , 16:03   Re: [Req] Need ZP Plugin
Reply With Quote #3

You didn't undarstand. Now i connect and i get 5 ammo, new round 5 more ammo, new round 5 more ammo. But i don't want the first round to be given any ammo, cuz when i retry i get 5 ammo every time 5 retry = 25 ammo... I want, to connect and not get 5 ammo, and when i was at least one round in the game, to start giving me ammo each round.. but not on connect..
yOou Know Me is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-24-2011 , 01:07   Re: [Req] Need ZP Plugin
Reply With Quote #4

PHP Code:
if ( is_user_connected(id) ) 
==>

PHP Code:
if ( is_user_alive(id) ) 
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 12-24-2011 , 04:59   Re: [Req] Need ZP Plugin
Reply With Quote #5

Just hook round start..

PHP Code:
register_event"HLTV""Event_Round_Start""a""1=0""2=0" 
zombieplague is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-24-2011 , 08:30   Re: [Req] Need ZP Plugin
Reply With Quote #6

something like this? ;)
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <zombieplague>

#define PLUGIN "AmmoPack on this flags"
#define VERSION "0.1"
#define AUTHOR "MuhdZaim"

#define FLAGS ADMIN_LEVEL_A

new cvar_ammo

new g_max

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event"HLTV""Event_Round_Start""a""1=0""2=0" )  
    
    
cvar_ammo register_cvar("zp_extra_ap""5")
    
    
g_max get_maxplayers()
}

public 
Event_Round_Start()
{
    for (new 
id=1;id<=g_max;id++)
    {
        if ( 
is_user_alive(id) ) 
        {
            if ( 
get_user_flags(id) & FLAGS )
            {
                
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + get_pcvar_num cvar_ammo ) )
            }
        }
    }

__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-27-2011 , 03:19   Re: [Req] Need ZP Plugin
Reply With Quote #7

Thank you verry much ! - Two days test, no problems Thnaks for helping !
yOou Know Me is offline
Old 12-27-2011, 03:31
johnbill1236
This message has been deleted by asherkin. Reason: Spam.
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-27-2011 , 03:33   Re: [Req] Need ZP Plugin
Reply With Quote #9

Wait one round it doesn't give ammo when you connect, only when there's a new round, restart the server 1 time if still doesn't give you ammo, it' bugged at first with me don't know why. But it's cool ZP5.0
yOou Know Me is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 12-29-2011 , 11:23   Re: [Req] Need ZP Plugin
Reply With Quote #10

Quote:
Originally Posted by yOou Know Me View Post
Wait one round it doesn't give ammo when you connect, only when there's a new round, restart the server 1 time if still doesn't give you ammo, it' bugged at first with me don't know why. But it's cool ZP5.0
That's what the code does.. Beside, it's more efficient I think. If you want it to call on the very first map start you can use it on forward functions like plugin_init( ) or plugin_cfg( ). I don't think that detecting when a player is connecting to the server is a good idea.. They can simply reconnect to earn more APs..

Last edited by zombieplague; 12-29-2011 at 12:02.
zombieplague is offline
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 00:28.


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