Raised This Month: $ Target: $400
 0% 

[HELP] With the SMA file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hashim1591
Member
Join Date: Feb 2012
Location: Valve
Old 06-21-2015 , 12:29   [HELP] With the SMA file
Reply With Quote #1

Hello Everyone! I saw these 2 Zombie classes in a server but when i found these were for zp5.0 ! Can someone please change these two classes for Zombie Plague 4.3 ?? I will be very thankful!

And Pleaseee Change this bank for Zombie Plague 4.3!

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( )
        }
    }
}

Attached Files
File Type: sma Get Plugin or Get Source (zp50_class_zombie_anti_frost.sma - 528 views - 1.5 KB)
File Type: sma Get Plugin or Get Source (zp50_class_zombie_anti_fire.sma - 561 views - 1.5 KB)
__________________

Last edited by hashim1591; 06-21-2015 at 12:39.
hashim1591 is offline
Send a message via MSN to hashim1591
RiFGanG
Member
Join Date: May 2015
Location: AL-Houceïma, Morroco
Old 06-22-2015 , 21:49   Re: [HELP] With the SMA file
Reply With Quote #2

THis PLuGins BY : Me

Last edited by RiFGanG; 06-22-2015 at 21:49.
RiFGanG is offline
Fresh522
Member
Join Date: Mar 2015
Location: Bulgaria
Old 06-24-2015 , 15:46   Re: [HELP] With the SMA file
Reply With Quote #3

Just use zp 5.0 ...
Fresh522 is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-13-2015 , 16:41   Re: [HELP] With the SMA file
Reply With Quote #4

Quote:
Originally Posted by RiFGanG View Post
THis PLuGins BY : Me
by you OMG!!
__________________
Moroccan and proud
Linkin Hisoka is offline
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-13-2015 , 16:48   Re: [HELP] With the SMA file
Reply With Quote #5

Quote:
Originally Posted by RiFGanG View Post
THis PLuGins BY : Me
1- "plugin" not "PLuGins"
2-
PHP Code:
register_plugin("Bank Menu","1.0","BooHLaaL"
You Just edited name of author ..
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-13-2015 , 16:51   Re: [HELP] With the SMA file
Reply With Quote #6

Quote:
Originally Posted by ZiZox View Post
1- "plugin" not "PLuGins"
2-
PHP Code:
register_plugin("Bank Menu","1.0","BooHLaaL"
You Just edited name of author ..
and Prefix Too [R#G]
__________________
Moroccan and proud
Linkin Hisoka is offline
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-13-2015 , 23:33   Re: [HELP] With the SMA file
Reply With Quote #7

Yeap.
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-03-2015 , 10:10   Re: [HELP] With the SMA file
Reply With Quote #8

Try: https://forums.alliedmods.net/showthread.php?t=139291 and https://forums.alliedmods.net/showthread.php?t=80203 or try search about it guy.
__________________








CrazY. 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 19:40.


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