Raised This Month: $51 Target: $400
 12% 

Trash :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 06-11-2015 , 14:21   Trash :)
Reply With Quote #1

Trash
__________________
Moroccan and proud

Last edited by Linkin Hisoka; 07-10-2015 at 12:52.
Linkin Hisoka is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 06-11-2015 , 19:13   Re: ReQ of Plugin ZP BANK
Reply With Quote #2

No One
__________________
Moroccan and proud
Linkin Hisoka is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-12-2015 , 18:22   Re: ReQ of Plugin ZP BANK
Reply With Quote #3

just use auto save by yokomo
Depresie is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 06-14-2015 , 08:48   Re: ReQ of Plugin ZP BANK
Reply With Quote #4

no i want ban menu ! but i make it
__________________
Moroccan and proud
Linkin Hisoka is offline
RiFGanG
Member
Join Date: May 2015
Location: AL-Houceïma, Morroco
Old 06-21-2015 , 10:52   Re: ReQ of Plugin ZP BANK
Reply With Quote #5

This Plugin Bank Menu & Donate Menu


PHP Code:
#include <amxmodx>  
#include <amxmisc>  
#include <cstrike>  
#include <hamsandwich>  
#include <colorchat>

#include <fun>  
#include <fvault>   

#pragma dynamic 32768   
#define is_valid_player(%1) (1 <= %1 <= 32)   

#define NICK    
  
native dev_get_user_points(id)
native dev_set_user_points(idamount)

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

public plugin_init()  
{  
    
register_plugin("Bank Menu","1.0","BooHLaaL")  

    
register_clcmd("TakeAmount""cmdTakeAmount"
    
register_clcmd("SaveAmount""cmdSaveAmount"
    
    
register_clcmd("say /donate""transfer_menu"ADMIN_ALL"")    
    
register_clcmd("say donate""transfer_menu"ADMIN_ALL"")
    
register_clcmd("transfer""transfer_ammo"ADMIN_ALL"")

     
    
register_clcmd("say /bank""Menu_Bank"
    
register_clcmd("say bank""Menu_Bank"
    
register_clcmd("say_team /bank""Menu_Bank"
      
}  

public 
plugin_natives() {
    
register_native("dev_get_user_ammo""native_get_user_ammo"1);    
}  


public 
native_get_user_ammo(id)
{
    return 
g_AP[id];
}

public 
Menu_Bank(id)  
{      
    if(
is_valid_player(id))  
    {  
        new 
title[100]  
        
formatex(title99"\r[R#G] \wBank Menu^n\wYou Have \r%i AmmoPacks"g_AP[id])  
          
          
        new 
bankMenu menu_create(title"menuBankHandler")  
          
        
menu_additem(bankMenu"\wTake Amount""1")  
        
menu_additem(bankMenu"\wTake All^n""2")  
          
        
menu_additem(bankMenu"\wSave Amount""3")  
        
menu_additem(bankMenu"\wSave All Ammo^n""4")  
          
        
menu_additem(bankMenu"\rDonate^n^n""5")  
     
          
          
        
menu_display(idbankMenu0)  
    }  
    return 
PLUGIN_HANDLED;  
}  

public 
menuBankHandler(idmenuitem)  
{          
    new 
data[6], iName[64], accesscallback  
    menu_item_getinfo
(menuitemaccessdata5iName63callback)  
      
    new 
key str_to_num(data)  
      
    switch(
key)  
    {  
        case 
1:  
        {  
            
client_cmd(id"messagemode TakeAmount")  
        }  
        case 
2:  
        {  
            
cmdTakeAll(id)  
        }  
        case 
3:  
        {  
            
client_cmd(id"messagemode SaveAmount")  
        }  
        case 
4:  
        {  
            
cmdSaveAll(id)  
        }  
        case 
5:  
        {  
            
transfer_menu(id
        }  
    }  
}  

public 
cmdTakeAmount(id)  
{  
    new 
szAps[11]  
    
read_args(szAps10)  
    
remove_quotes(szAps)  
      
    if(
equal(szAps"") || equal(szAps" "))  
        return 
PLUGIN_HANDLED  
      
    
new iAps str_to_num(szAps)  
      
    if(
iAps 1) return PLUGIN_HANDLED  
      
    
new iApsSum iAps dev_get_user_points(id)  
      
    if(
iAps <= g_AP[id] && iApsSum <= 999999)  
    {  
        
dev_set_user_points(idiApsSum)  
        
g_AP[id] -= iAps  
          
        ChatColor
(id"^4[R#G] ^1You Took ^4%i ^1AmmoPacKs From Your Bank. Now You Have ^4%i ^1AmmoPacKs In Your Bank."iApsg_AP[id])  
          
        return 
PLUGIN_CONTINUE  
    
}  
    else  
    {  
        
ChatColor(id"^4[R#G] ^1You Don't Have Enough AmmoPacKs Or You Wanted To Take Too Much AmmoPacKs.")  
    }  
      
    return 
PLUGIN_CONTINUE  
}  

public 
cmdTakeAll(id)  
{  
    new 
iApsSum dev_get_user_points(id) + g_AP[id]  
      
    if(
iApsSum <= 999999)  
    {  
        
dev_set_user_points(idiApsSum)  
          
        
ChatColor(id"^4[R#G] ^1You Took All ^4%i ^1AmmoPacks From Your Bank."g_AP[id])  
          
        
g_AP[id] = 0  
    
}  
    else if(
iApsSum 999999)  
    {  
        new 
giveAps 999999 dev_get_user_points(id)  
          
        if(
giveAps <= g_AP[id])  
        {  
            
dev_set_user_points(idgiveAps dev_get_user_points(id))  
            
g_AP[id] -= giveAps  
              
            ChatColor
(id"^4[R#G] ^1You Took ^4%i ^1AmmoPacKs From Your Bank. Now You Have ^4%i ^1AmmoPacKs In Your Bank."giveApsg_AP[id])  
        }  
    }  
}  

public 
cmdSaveAmount(id)  
{  
    new 
szAps[11]  
    
read_args(szAps10)  
    
remove_quotes(szAps)  
      
    if(
equal(szAps"") || equal(szAps" "))  
        return 
PLUGIN_HANDLED  
      
    
new iAps str_to_num(szAps)  
      
    if(
iAps 1) return PLUGIN_HANDLED  
      
    
new haveAps dev_get_user_points(id)  
      
    if(
iAps <= haveAps)  
    {  
        
dev_set_user_points(idhaveAps iAps)  
        
g_AP[id] += iAps  
          
        ChatColor
(id"^4[R#G] ^1You Saved ^4%i ^1AmmoPacKs In Your Bank. Now You Have ^4%i ^1AmmoPacKs In Your Bank."iApsg_AP[id])  
    }  
    else  
    {  
        
ChatColor(id"^4[R#G] ^1You Don't Have Enough AmmoPacKs")  
    }  
      
    return 
PLUGIN_CONTINUE  
}  

public 
cmdSaveAll(id)  
{  
    new 
haveAps dev_get_user_points(id)  
      
    
dev_set_user_points(id0)  
    
g_AP[id] += haveAps  
      
    ChatColor
(id"^4[R#G] ^1You Saved ^4%i ^1AmmoPacKs To Your Bank. Now You Have ^4%i ^1AmmoPacKs In Your Bank."haveApsg_AP[id])  
}  

public 
transfer_menu(id)
{   
get_players(playersnum"ch")       
if (
num <= 1)  
{       
set_hudmessage(01550, -1.00.400.05.01.01.0false)                 
show_hudmessage(id,"")       
return 
PLUGIN_HANDLED    
}   
    
new 
tempname[32], info[10]  
  
players_menu menu_create("\r[R#G] \wChoose A Player To Donate:""players_menu_handler")  
 
for(
0numi++) 
{       
if(
players[i] == id)           
continue  
             
get_user_name(players[i], tempname31)       
num_to_str(players[i], info9)       
menu_additem(players_menutempnameinfo0)    
}       
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 
player str_to_num(data)  
      
client_cmd(id"messagemode ^"Transfer %i^""player)  

return 
PLUGIN_CONTINUE
}

public 
transfer_ammo(id)
{    
new 
param[6]    
read_argv(2paramcharsmax(param))

for (new 
xstrlen(param); x++)    
{       
if(!
isdigit(param[x]))       
 {            
set_hudmessage(25500, -1.00.400.05.01.01.0false)            
show_hudmessage(id,"")            
return 
0        
}    
}    
   
new 
amount str_to_num(param)   
    
new 
ammo dev_get_user_points(id

if (
ammo amount)    
{             
ChatColor(id,"^4[R#G] ^1You Don't Have Enough AmmoPacKs !")       
return 
0    

      
read_argv(1paramcharsmax(param))   
new 
player str_to_num(param
      
new 
player_ammo dev_get_user_points(player)

dev_set_user_points(idammo amount)    
dev_set_user_points(playerplayer_ammo amount)    
   
new 
names[2][32]        

get_user_name(idnames[0], 31
   
get_user_name(playernames[1], 31)        
ColorChat(0GREY"^4[R#G] ^1Player ^4 %s  ^1Donated ^4%d ^1AmmoPacKs To Player ^4%s ^1!"names[0], amountnames[1]) 
return 
0
}  

public 
SaveData(id)    
{    
    new 
szMethod65 ];   
       
    
#if defined STEAM   
    
get_user_authididszMethod34 );   
    
#endif   
       
    #if defined NICK   
    
get_user_nameidszMethod34 );   
    
#endif   
       
    #if defined IP   
    
get_user_ipidszMethod34);   
    
#endif   
       
    
new vaultkey[64], vaultdata[328];    
    
format(vaultkey63"bb_%s"szMethod);    
    
format(vaultdata327"%i"g_AP[id]);    
       
    
fvault_set_data"bbVault"vaultkeyvaultdata );   
}    

// Load data function    
public LoadData(id)    
{    
    new 
szMethod65 ];   
       
    
#if defined STEAM   
    
get_user_authididszMethod34 );   
    
#endif   
       
    #if defined NICK   
    
get_user_nameidszMethod34 );   
    
#endif   
       
    #if defined IP   
    
get_user_ipidszMethod34);   
    
#endif   
       
    
new vaultkey[64], vaultdata[328];    
    
format(vaultkey63"bb_%s"szMethod);    
    
format(vaultdata327"%i"g_AP[id]);    
       
    
fvault_get_data"bbVault"vaultkeyvaultdatacharsmaxvaultdata ) );   
       
    
g_APid ] = str_to_numvaultdata );   
}    
// When client enter on server    
public client_putinserver(id)    
{    
    
LoadData(id);    
}    

// When client disconnect    
public client_disconnect(id)    
{  
    
cmdSaveAll(id);      
    
SaveData(id);      
}  


stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players32 ]
    static 
msg191 ]
    
vformatmsg190input)    
    
replace_allmsg190"!g""^4" )
    
replace_allmsg190"!y""^1" )
    
replace_allmsg190"!t""^3" )    
    if(
idplayers] = id; else get_playersplayerscount"ch" )
    {
    for(new 
0counti++)
    {
        if( 
is_user_connectedplayers] ) )
        {
            
message_beginMSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players] )  
            
write_byteplayers] )
            
write_stringmsg )
            
message_end( )
        }
    }
}


Last edited by RiFGanG; 06-21-2015 at 10:54.
RiFGanG is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 06-23-2015 , 23:31   Re: ReQ of Plugin ZP BANK
Reply With Quote #6

i have this and i edit her
+ this is not for zp
+ native dev_get_user_points ( this is ammopack ) ?
__________________
Moroccan and proud
Linkin Hisoka is offline
RiFGanG
Member
Join Date: May 2015
Location: AL-Houceïma, Morroco
Old 06-25-2015 , 18:48   Re: ReQ of Plugin ZP BANK
Reply With Quote #7

oK
__________________
AL-Houceïma

[RiF#GanG] - [RiF#BoYs] - [Bario#Briro] - [Morroco]
RiFGanG is offline
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-10-2015 , 06:25   Re: ReQ of Plugin ZP BANK
Reply With Quote #8

RiFGanG Stop Copy/PAST ! --'
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
Drissdev1
Senior Member
Join Date: Jun 2014
Old 07-12-2015 , 11:08   Re: Trash :)
Reply With Quote #9

Lol Bank Dar fikom had l7ala kamla ? [dev]_get_user_points lool
__________________
Drissdev1 is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-12-2015 , 13:56   Re: Trash :)
Reply With Quote #10

Quote:
Originally Posted by Drissdev1 View Post
Lol Bank Dar fikom had l7ala kamla ? [dev]_get_user_points lool
hahah yeah so easy i make it :p
__________________
Moroccan and proud
Linkin Hisoka 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 21:54.


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