Raised This Month: $32 Target: $400
 8% 

Subplugin Submission Money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Riste
New Member
Join Date: Aug 2014
Old 08-01-2014 , 14:54   Money
Reply With Quote #1

Plugin Name: Money
Category: Zombie Plague addons
Plugin Author: Riste (Me)

Note: You can translate it to your own language, but don't change plugin author!
This plugin allow you to buy money $ with Ammo Packs (AP).

SOURCE CODE:
Code:
 /* Plugin Radio Riste , Mozete editovati plugin ali ga nesmete Preprodavati , Mozete ga editovati tako sto          * cete postovati pravila autora. 
*/

#include <amxmodx>
#include <fun>
#include <zombieplague>
#include <cstrike>
#include <colorchat>

public plugin_init() 
{
    register_plugin("money","1.0","Riste")  // Me
    register_clcmd("say /buymoney","Money_Handle")
    register_clcmd("say_team /buymoney","Money_Handle")
}
public StartRound()
{
    set_task(45.0,"Reklama")
}
public Reklama()
{
    ColorChat(0,TEAM_COLOR,"^4[ZP] ^1 Ako zelite da kupite Pare ^3 say /buymoney")
}
public Money_Handle(id) {
    new szText[555 char]
         formatex(szText, charsmax(szText), "\rMoney Shop")
    new menu = menu_create(szText, "Money_Items")
    
    formatex(szText, charsmax(szText), "\y2000$ \w[\r15 Ammo Packs\w]")
    menu_additem(menu, szText, "1", 0)
    formatex(szText, charsmax(szText), "\y4000$ \w[\r30 Ammo Packs\w]")
    menu_additem(menu, szText, "2", 0)
    formatex(szText, charsmax(szText), "\y6000$ \w[\r45 Ammo Packs\w]")
    menu_additem(menu, szText, "3", 0)
    formatex(szText, charsmax(szText), "\y8000$ \w[\r60 Ammo Packs\w]")
    menu_additem(menu, szText, "4", 0)
    formatex(szText, charsmax(szText), "\y10000$ \w[\r75 Ammo Packs\w]")
    menu_additem(menu, szText, "5", 0)
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
    menu_display(id, menu)    
    
    return PLUGIN_HANDLED
}


public Money_Items(id,menu,item)
{
    
    if(!is_user_alive(id)) {
        ColorChat(id,TEAM_COLOR,"^4[ZP] ^1Morate biti zivi da bi koristili ^3 Money Shop")
        return PLUGIN_HANDLED
    }
    
    if(item ==MENU_EXIT) {
        menu_destroy(menu)
        return PLUGIN_CONTINUE
    }
    
    new data[6], iName[64], access, callback
    menu_item_getinfo(menu, item, access, data, charsmax(data), iName, charsmax(iName), callback )
    new key = str_to_num(data)
    switch(key)
    {
        case 1: {
                if(is_user_alive(id)) {
                    new money = cs_get_user_money(id)
                    new ammo = zp_get_user_ammo_packs(id)
                    if(ammo < 10) {
                        ColorChat(id, TEAM_COLOR,"^4[ZP] ^1Nemate dovoljno ammo packs za ovaj ^3 Item")
                        return PLUGIN_HANDLED
                    }
                    else {
                        zp_set_user_ammo_packs(id,ammo-15)
                        cs_set_user_money(id,money+2000)
                        ColorChat(id, TEAM_COLOR,"^4[ZP] ^1Kupili ste ^3 2000$ ^1 za ^3 10 Ammo Packs")
                    }
                }
                return PLUGIN_HANDLED
            }
            
        
        case 2: {
                if(is_user_alive(id)) {
                    new money = cs_get_user_money(id)
                    new ammo = zp_get_user_ammo_packs(id)
                    if(ammo < 20) {
                        ColorChat(id, TEAM_COLOR,"^4[ZP] ^1Nemate dovoljno ammo packs za ovaj ^3 item")
                        return PLUGIN_HANDLED
                    }
                    else  {
                        zp_set_user_ammo_packs(id,ammo-30)
                        cs_set_user_money(id,money+4000)
                        ColorChat(id, TEAM_COLOR,"^4[ZP] ^1Kupili ste ^3 4000$ ^1 za ^3 30 Ammo Packs")
                    }
                }
                return PLUGIN_HANDLED
            }
            
        case 3: {
                if(is_user_alive(id)) {
                    new money = cs_get_user_money(id)
                    new ammo = zp_get_user_ammo_packs(id)
                    if(ammo < 30) {
                        ColorChat(id, TEAM_COLOR,"^4[ZP] ^1Nemate dovoljno ammo packs za ovaj ^3 item")
                        return PLUGIN_HANDLED
                    }
                    else {
                        zp_set_user_ammo_packs(id,ammo-45)
                        cs_set_user_money(id,money+6000)
                        ColorChat(id, TEAM_COLOR,"^4[ZP] ^1Kupili ste ^3 6000$ za ^3 45 Ammo Packs")
                    }
                }
                return PLUGIN_HANDLED
            }
                
                
            case 4:    {
                if(is_user_alive(id)) {
                    new money = cs_get_user_money(id)
                    new ammo = zp_get_user_ammo_packs(id)
                    if(ammo < 50) {
                        ColorChat(id,TEAM_COLOR,"^4[ZP] ^1Nemate Dovoljno ammo packs za ovaj ^3 item")
                        return PLUGIN_HANDLED
                    }
                    else {
                        zp_set_user_ammo_packs(id,ammo-60)
                        cs_set_user_money(id,money+8000)
                        ColorChat(id,TEAM_COLOR,"^4[ZP] ^1Kupili ste ^3 8000$ ^1 za ^3 60 Ammo Packs")
                    }
                }
                return PLUGIN_HANDLED
            }
                
            case 5: {
                if(is_user_alive(id)) {
                    new money = cs_get_user_money(id)
                    new ammo = zp_get_user_ammo_packs(id)
                    if(ammo < 60) {
                        ColorChat(id,TEAM_COLOR,"^4[ZP] ^1Nemate Dovoljno ammo packs za ovaj ^3 Item!")
                        return PLUGIN_HANDLED
                    }
                    else {
                        zp_set_user_ammo_packs(id,ammo-75)
                        cs_set_user_money(id,money+10000)
                        ColorChat(id,TEAM_COLOR,"^4[ZP] ^1Kupili ste ^3 10000$ ^1 za ^3 75 Ammo Packs")
                        }
                }
                return PLUGIN_HANDLED
                }
            
        }
    }

Last edited by NiHiLaNTh; 08-02-2014 at 07:01. Reason: update
Riste is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 08-01-2014 , 14:59   Re: Money
Reply With Quote #2

This is not allowed, you can't post amxx files without sma file, your plugin is not on english and it has 0 info about the plugin it self what does it do.
__________________
H.RED.ZONE is offline
Riste
New Member
Join Date: Aug 2014
Old 08-01-2014 , 15:02   Re: Money
Reply With Quote #3

Users can translate it to own language, but don't change plugin author. I post source code look.
In code.

EDIT: Commands is /buymoney - open buy menu
This plugin can help on zombie plague servers to buy money $ for Ammo Packs (AP). What you don't understand?
It's easy to use.

Installation: put money.amxx in "cstrike>addons>amxmodx>plugins"
In plugins.ini, located in "cstrike>addons>amxmodx>configs>plugins.i ni" type money.amxx, restart server or change map to plugin WORK.


That is all.

Last edited by Riste; 08-01-2014 at 15:05.
Riste is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 08-01-2014 , 15:27   Re: Money
Reply With Quote #4

Remove the amxx file! Upload the sma!
__________________

Just an old fart revisiting the nostalgia.
---------
Oh yeah
|[[ZPA/ZPS]NoSound]|[[ZPA/ZPS]Hud Stats(Edited)]|

PS: I go by MoistWomble nowadays.
Just4Games is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-02-2014 , 01:26   Re: Money
Reply With Quote #5

Quote:
Originally Posted by H.RED.ZONE View Post
This is not allowed, you can't post amxx files without sma file, your plugin is not on english and it has 0 info about the plugin itself what does it do.
Yes, I agreed. Please attach the .sma file.

If not this thread will have a possibility to be trash/ deleted.

Last edited by zmd94; 08-02-2014 at 01:26.
zmd94 is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-02-2014 , 07:01   Re: Money
Reply With Quote #6

amxx file removed. You HAVE to post source code.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
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 14:34.


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