Raised This Month: $ Target: $400
 0% 

Suggestion / Subplugin Request [Req] Need ZP Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-21-2011 , 22:30   Re: [Req] Need ZP Plugin
Reply With Quote #11

Problem:
It gives ammo to Everybody even to people who have no admin flags.
yOou Know Me is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-22-2011 , 00:22   Re: [Req] Need ZP Plugin
Reply With Quote #12

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <zombieplague>

#define PLUGIN "People with this flag gain extra 5 ammo"
#define VERSION "0.1"
#define AUTHOR "MuhdZaim"

new cvar_ammo

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
cvar_ammo register_cvar("zp_people_flag_amount""5")
}

public 
client_connect(id)
{
    if ( 
is_user_connected(id) )
    {
        if ( 
get_user_flags(id) && ADMIN_LEVEL_A )
        {
            
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + get_pcvar_num cvar_ammo ) )
        }
    }

Nedd STEAM for this

client_connect(id) will only detect player that connected with steam . It have several way for non-steam but I won't support
__________________
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-22-2011 , 11:55   Re: [Req] Need ZP Plugin
Reply With Quote #13

No, no it's good thanks man. Not that the problem.
yOou Know Me is offline
klatro
Senior Member
Join Date: Oct 2009
Location: The world and at home
Old 12-22-2011 , 15:56   Re: [Req] Need ZP Plugin
Reply With Quote #14

JoKeR LauGh, make a difference between && and &
klatro is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-23-2011 , 02:57   Re: [Req] Need ZP Plugin
Reply With Quote #15

It's same , just like
PHP Code:
*= 
and
PHP Code:

is the same.
__________________
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
klatro
Senior Member
Join Date: Oct 2009
Location: The world and at home
Old 12-23-2011 , 05:44   Re: [Req] Need ZP Plugin
Reply With Quote #16

Code:
if ( get_user_flags(id) && ADMIN_LEVEL_A )

->

Code:
if ( get_user_flags(id) & ADMIN_LEVEL_A )
klatro is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-23-2011 , 06:31   Re: [Req] Need ZP Plugin
Reply With Quote #17

it's the same -.-
__________________
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
klatro
Senior Member
Join Date: Oct 2009
Location: The world and at home
Old 12-23-2011 , 07:05   Re: [Req] Need ZP Plugin
Reply With Quote #18

You do not know how to use basic operators! For you everything is SAME...
klatro is offline
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-23-2011 , 14:30   Re: [Req] Need ZP Plugin
Reply With Quote #19

So it should be like this, thanks, but i have another problem. I have "save ammo" and when i connect i get 5 ammo automatically, and when i retry i can make 50 ammo in less than few seconds.. Can you make it to give ammo, only when you were in the previus round and you have staid for the new round. I hope you undarstand me ? Like to skip the first round when you connect, you stay true the round and when it comes the next round than to give 5 ammo. That is why i needet it to be only on new round, but i didn't explain it well the first time.
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

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

#define FLAGS ADMIN_LEVEL_A

new cvar_ammo

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    RegisterHam(Ham_Spawn, "player", "Fw_Spawn", 1)
    
    cvar_ammo = register_cvar("zp_extra_ap", "5")
}

public Fw_Spawn(id) 
{
    if ( is_user_alive(id) ) 
    {
        if ( get_user_flags(id) & FLAGS ) 
        {
            zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num ( cvar_ammo ) )
        }
    }
}
yOou Know Me is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 12-23-2011 , 15:08   Re: [Req] Need ZP Plugin
Reply With Quote #20

means like when you connect you join team but still you can't play after the round end and the new round started and then the person should get the AP ?
__________________
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
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 20:58.


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