AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] New Give ammopacks 'with menu' (Originale By Arkshine) (https://forums.alliedmods.net/showthread.php?t=285222)

Dr Zayd 07-14-2016 11:07

[ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
 
2 Attachment(s)
This is a new simple addition to zp_giveap originale posted by , Arkshine

This plugin its easly makes you choose a player from the menu given By typing : zp_giveap in console

Originale post
HERE

Script :

PHP Code:

#include <amxmodx> 
#include <amxmisc>
#include <zombieplague>


new players_menuplayers[32], numi
new accessmenuiName[64], callback

public plugin_init ()
{
    
register_plugin "ZP: Give Ammo""1.0.0""Arkshine" );
    
register_clcmd "zp_giveap""CmdGiveAP"ADMIN_RCON"- Players Menu" )
    
register_clcmd "amx_giveap""CmdGiveAP"ADMIN_RCON"- Players Menu" )
    
register_clcmd ("Given""transfer_money"ADMIN_RCON"- Given <name> <amount> : Give Ammo Packs" )
}

public 
CmdGiveAP idlevelcid )
{
    if ( !
cmd_access idlevelcid) )
    {
        return 
PLUGIN_HANDLED;
    }
    
get_players(playersnum"h")
    new 
tempname[32], info[10], tempid
    
    players_menu 
menu_create("\yChoose A player to Give \r[Packs]""players_menu_handler")
    
    for(
0numi++)
    {
        
tempid players ]
        
        
get_user_name(tempidtempname33)
        
num_to_str(tempidinfo9)
        
menu_additem(players_menutempnameinfo0)
    }
    
    
menu_setprop(players_menu,MPROP_EXITNAME,"Exit");
    
menu_setprop(players_menuMPROP_EXITMEXIT_ALL)
    
    
menu_display(idplayers_menu0)
    return 
PLUGIN_CONTINUE
}

public 
players_menu_handler(idplayers_menuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(players_menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6]
    
    
menu_item_getinfo(players_menuitemaccessmenudatacharsmax(data), iNamecharsmax(iName), callback)
    
    new 
tempid str_to_num (data)
    
    
client_cmd(id"messagemode ^"Given %i^""tempid)
    
    return 
PLUGIN_CONTINUE
}

public 
transfer_moneyidlevelcid )
{
    if ( !
cmd_access idlevelcid) )
    {
        return 
PLUGIN_HANDLED;
    }
    new 
param[6]
    
read_argv(2paramcharsmax(param))
    
    for (new 
xstrlen(param); x++)
    {
        if(!
isdigit(param[x]))
        {
            return 
PLUGIN_HANDLED
        
}
    }
    
    new 
amount str_to_num(param)
    
    
read_argv(1paramcharsmax(param))
    new 
player str_to_num(param)
    
    new 
player_money zp_get_user_ammo_packs (player)
    
    
zp_set_user_ammo_packs(playerplayer_money amount)
    
    return 
PLUGIN_HANDLED
}
// Colour Chat
stock client_printc(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^x04"); // Green Color
    
replace_all(msg190"!n""^x01"); // Default Color
    
replace_all(msg190"!t""^x03"); // Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
{
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 


tousif 07-14-2016 13:55

Re: [ZP] New GiveAP 'with menu' (Originale By Arkshine)
 
Well , you could have posted in ZP sub-plugin section.

dr hicham 07-14-2016 17:17

Re: [ZP] New GiveAP 'with menu' (Originale By Arkshine)
 
Zayd Fix The Plugin
The Menu Not Work :/
And Post The Plugins When Have

PHP Code:

#include <zombieplague> 

In Zombie Plague Section

HamletEagle 07-15-2016 07:22

Re: [ZP] New GiveAP 'with menu' (Originale By Arkshine)
 
Moved into zp section.

Dr Zayd 07-15-2016 08:12

Re: [ZP] New GiveAP 'with menu' (Originale By Arkshine)
 
Quote:

Originally Posted by HamletEagle (Post 2436849)
Moved into zp section.


Ah i forgot thnx ^^

Houssam Benmouna 07-25-2016 08:38

Re: [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
 
:v can you post the plugin Working (Sorry For Bad English) !!!

Dr Zayd 07-25-2016 11:17

Re: [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
 
Quote:

Originally Posted by Houssam Benmouna (Post 2439425)
:v can you post the plugin Working (Sorry For Bad English) !!!

Tested on ZPA & working (try the edited version 'the posted script')

Houssam Benmouna 07-25-2016 12:10

Re: [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
 
Dr Zayd The Plugin Working But The Menu Not Yet !!!

dr hicham 07-25-2016 12:15

Re: [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
 
Quote:

Originally Posted by Houssam Benmouna (Post 2439503)
Dr Zayd The Plugin Working But The Menu Not Yet !!!

[AR]
Ui 3ndo L 7a9 Rah L Menu Makhadamch , Plz Zayd Fixi Plugin

[EN]
Yes, It Is Right The Menu Of Plugin Not Work , Plz Zayd Fix The Plugin

Dr Zayd 08-15-2016 23:30

Re: [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
 
Quote:

Originally Posted by dr hicham (Post 2439507)
[AR]
Ui 3ndo L 7a9 Rah L Menu Makhadamch , Plz Zayd Fixi Plugin

[EN]
Yes, It Is Right The Menu Of Plugin Not Work , Plz Zayd Fix The Plugin


as i said
Try updated version .


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

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