Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 07-14-2016 , 11:07   [ZP] New Give ammopacks 'with menu' (Originale By Arkshine)
Reply With Quote #1

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 }
*/ 
Attached Files
File Type: sma Get Plugin or Get Source (zp_giveap.sma - 841 views - 3.3 KB)
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |

Last edited by Dr Zayd; 08-15-2016 at 23:29. Reason: bad format
Dr Zayd is offline
 



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 23:29.


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