AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Small plugin. (https://forums.alliedmods.net/showthread.php?t=277815)

Mostafa abukhalaf 01-17-2016 09:02

[REQ] Small plugin.
 
hey all.
i need a plugin for vip and admins, witch it gives the vips and admin 999999999 ammo pack.
please help and ty.
P.S : ONly ADMINS AND VIPS.

JoaoVieira 02-01-2016 17:11

Re: [REQ] Small plugin.
 
1 Attachment(s)
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "Give ammo packs"
#define VERSION "1.0.2"
#define AUTHOR "Fry!+sempz"

#if ADMIN_RESERVATION & ADMIN_MENU
#endif

new g_max_ammo_packs

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_max_ammo_packs register_cvar("howmanyammopacksfriend""999999999")
    
    
register_forward(FM_PlayerPreThink"vip_admin_ammo_packs")
}

public 
vip_admin_ammo_packs(id)
{
    for (
id 1id <= 32id++)
    {
        new 
g_ammo_packs zp_get_user_ammo_packs(id)
    
        if (
g_ammo_packs == get_pcvar_num(g_max_ammo_packs))
        {
            
zp_set_user_ammo_packs(idg_ammo_packs 0)
        }        
    }



NOT TESTED

Mostafa abukhalaf 05-25-2017 10:21

Re: [REQ] Small plugin.
 
Alright thx man gotta try it now.

OciXCrom 05-25-2017 10:26

Re: [REQ] Small plugin.
 
Quote:

Originally Posted by Mostafa abukhalaf (Post 2523365)
Alright thx man gotta try it now.

Don't rush it. We can wait another year.

PS - I hope that the code is a joke.

Dr Zayd 05-25-2017 12:45

Re: [REQ] Small plugin.
 
PHP Code:

#include <amxmodx> 
#include <fakemeta> 
#include <zombieplague> 
#include <zmvip>

#define PLUGIN "Give ammo packs" 
#define VERSION "1.0.2" 
#define AUTHOR "Fry!+sempz" 

#if ADMIN_RESERVATION & ADMIN_MENU
#endif 

new g_max_ammo_packs 

public plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
     
    
g_max_ammo_packs register_cvar("howmanyammopacksfriend""999999999"
     
    
register_forward(FM_PlayerPreThink"vip_admin_ammo_packs"


public 
vip_admin_ammo_packs(id

    for (
id 1id <= 32id++) 
    { 
        new 
g_ammo_packs zp_get_user_ammo_packs(id
        if(
zv_get_user_flags(id))
        {
            if (
g_ammo_packs == get_pcvar_num(g_max_ammo_packs)) 
            { 
                
zp_set_user_ammo_packs(idg_ammo_packs 0
            }
        }
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED


Added VIP :p

Quote:

PS - I hope that the code is a joke.

OciXCrom 05-25-2017 13:28

Re: [REQ] Small plugin.
 
I still hope it's a joke. Using client_prethink for this - LOL! Even using a loop in there, double lol.

PHP Code:

#if ADMIN_RESERVATION & ADMIN_MENU
#endif 

WTF

Mostafa abukhalaf 05-25-2017 16:54

Re: [REQ] Small plugin.
 
Quote:

Originally Posted by OciXCrom (Post 2523368)
Don't rush it. We can wait another year.

PS - I hope that the code is a joke.

Will u stop being rude ? I was busy with school/other stuff so I left the forum for one year and even more, and left the whole game then I wanted to come back plz understand its not yhat complicated...

DjSoftero 05-26-2017 02:27

Re: [REQ] Small plugin.
 
PHP Code:

#include <amxmodx> 
#include <zombieplague> 

#define VIP ADMIN_LEVEL_H    //change to you own vip flag

#define PLUGIN "Give ammo packs" 
#define VERSION "1.0.0" 
#define AUTHOR "some random guy" 


new g_max_ammo_packs 

public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
     
    
g_max_ammo_packs register_cvar("zp_ammo_packs_for_vip""999999999"



public 
client_connect(id) {
    if(
get_user_flags(id) & VIP)
        
zp_set_user_ammo_packs(idget_pcvar_num(g_max_ammo_packs))



Mostafa abukhalaf 05-26-2017 16:58

Re: [REQ] Small plugin.
 
Quote:

Originally Posted by DjSoftero (Post 2523537)
PHP Code:

#include <amxmodx> 
#include <zombieplague> 

#define VIP ADMIN_LEVEL_H    //change to you own vip flag

#define PLUGIN "Give ammo packs" 
#define VERSION "1.0.0" 
#define AUTHOR "some random guy" 


new g_max_ammo_packs 

public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
     
    
g_max_ammo_packs register_cvar("zp_ammo_packs_for_vip""999999999"



public 
client_connect(id) {
    if(
get_user_flags(id) & VIP)
        
zp_set_user_ammo_packs(idget_pcvar_num(g_max_ammo_packs))



Tested or no ?

OciXCrom 05-26-2017 17:47

Re: [REQ] Small plugin.
 
You can't test it yourself?


All times are GMT -4. The time now is 23:17.

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