AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Points System by AlferD (https://forums.alliedmods.net/showthread.php?t=325712)

alferd 07-03-2020 11:21

Points System by AlferD
 
4 Attachment(s)
Points System
Version 1.0


Description:
With this plugin you can score points, And with points you can buy items,
This plugin has a shopping menu that you can easily give the menu features


Requirements:
  • AMX Mod X 1.8.2 and up
  • Amx Settings Api


Commands:
  • amx_give_points <name> <value> | gives Points to the player ( admin flag a )
  • amx_take_points <name> <value> | takes Points from the player ( admin flag a )
  • donate_points <name> <value> | Ability to transfer points ( by console )
  • say /donatepoints\donatep\dpm | Ability to transfer points ( by menu )
  • say /showpoints\sp | Watch players points ( by menu ) ( admin only )
  • say /items\ps\pshop | Buy Item Menu


Settings:
  • KILL_POINTS | Specify the amount of points received per person killed
  • POINTS | Set the flag for take / give points for the admin
  • SHOW_MENU | Set the flag for "say /showpoints\sp" for the admin


Explanation about adding item to menu:

for example:

The following plugin is for receiving health, And we want to add that to menu
Code:
#include <amxmodx> #include <fun> #include <cstrike> new hpamount public plugin_init() {     register_plugin("Buy Health", "1.0", "....")         hpamount = register_cvar("buyhp_amount", "200")         register_clcmd("say /buyhp", "BuyHP") } public BuyHP(id) {     if(!is_user_alive(id))         if(cs_get_user_money(id) >= 1000)         {             set_user_health(id, get_user_health(id) + get_pcvar_num(hpamount))                         cs_set_user_money(id, cs_get_user_money(id) - 1000);         }                 else         {             client_print(id, print_center, "you have insufficient funds!");         }             return PLUGIN_HANDLED; }

Just add the following code to the plugin:
Code:
#include <ad_points> new const name[] = "Buy Health" new g_itemid_buyhp new point = 10 public plugin_init() {     g_itemid_buyhp = adp_register_extra_item(name, point) } public adp_extra_item_selected(id,itemid) {     if(!is_user_alive(id))         return PLUGIN_HANDLED;         if(itemid==g_itemid_buyhp)     {         if(ad_get_user_points(id) >= point)         {             ad_set_user_points(id, ad_get_user_points(id) - point);         }                 else         {         }     }     return PLUGIN_HANDLED; }

Result:
Code:
#include <amxmodx> #include <fun>
 #include <ad_points>
new const name[] = "Buy Health" new g_itemid_buyhp new point = 10 new hpamount public plugin_init() {     register_plugin("Buy Health", "1.0", "....")         hpamount = register_cvar("buyhp_amount", "200")
    g_itemid_buyhp = adp_register_extra_item(name, point)
}
 public adp_extra_item_selected(id,itemid)
{     if(!is_user_alive(id))         return PLUGIN_HANDLED;         if(itemid==g_itemid_buyhp)     {         if(ad_get_user_points(id) >= point)         {             set_user_health(id, get_user_health(id) + get_pcvar_num(hpamount));                         ad_set_user_points(id, ad_get_user_points(id) - point);         }                 else         {         }     }     return PLUGIN_HANDLED; }


All items are displayed in the following folder, And you can make changes to it
Code:

addons/amxmodx/configs/adp_items.ini

Managers who use the "amx_give_points" and "amx_take_points" commands the in the following folder
Code:

addons/amxmodx/configs/AD-Points/Points_log-xxxxxxxx.log

And players who donate points their information will be saved in the following folder
Code:

addons/amxmodx/configs/AD-Points/Donate_log-xxxxxxxx.log

Thanks For ZP Dev Team

DruGzOG 07-03-2020 11:34

Re: Points System by AlferD
 
You wrote this from scratch?

alferd 07-03-2020 11:47

Re: Points System by AlferD
 
Quote:

Originally Posted by DruGzOG (Post 2708411)
You wrote this from scratch?

yes, Except for item menu codes (adp_items.ini)
The item menu codes have been completely changed by me

Did I do something wrong?

fysiks 07-03-2020 14:37

Re: Points System by AlferD
 
You can barely write a simple plugin yet you're claiming to have written this much more complex one? It's just a bit hard to believe based on your other recent posts. No offense intended.

Also, how is this different from all the other plugins that do the same thing?

alferd 07-03-2020 15:41

Re: Points System by AlferD
 
Quote:

Originally Posted by fysiks (Post 2708443)
You can barely write a simple plugin yet you're claiming to have written this much more complex one? It's just a bit hard to believe based on your other recent posts. No offense intended.

?
Quote:

Except for item menu codes (adp_items.ini)
I just couldn't write the code for the following code

PHP Code:

    register_library("adp_items");
    
register_native("adp_items_register""native_items_register");
    
register_native("adp_items_get_id""native_items_get_id");
    
register_native("adp_items_get_name""native_items_get_name");
    
register_native("adp_items_get_real_name""native_items_get_real_name");
    
register_native("adp_items_get_point""native_items_get_point");
    
register_native("adp_items_show_menu""native_items_show_menu");
    
register_native("adp_items_force_buy""native_items_force_buy");
    
register_native("adp_items_menu_text_add""native_items_menu_text_add");
    
register_native("adp_register_extra_item""native_register_extra_item");
    
    
g_ItemRealName ArrayCreate(321);
    
g_ItemName ArrayCreate(321);
    
g_ItemFlag ArrayCreate(321);
    
g_ItemPoint ArrayCreate(11); 

I used another plugin to complete this plugin
That's not to say that someone else wrote this plugin, and I copied it and sent it here

OciXCrom 07-03-2020 16:45

Re: Points System by AlferD
 
Quote:

I used another plugin to complete this plugin
That's not to say that someone else wrote this plugin, and I copied it and sent it here
No, it's just you copied someone else's code and didn't give credits for it.

DruGzOG 07-03-2020 19:10

Re: Points System by AlferD
 
Quote:

Originally Posted by alferd (Post 2708458)
?


I just couldn't write the code for the following code

PHP Code:

    register_library("adp_items");
    
register_native("adp_items_register""native_items_register");
    
register_native("adp_items_get_id""native_items_get_id");
    
register_native("adp_items_get_name""native_items_get_name");
    
register_native("adp_items_get_real_name""native_items_get_real_name");
    
register_native("adp_items_get_point""native_items_get_point");
    
register_native("adp_items_show_menu""native_items_show_menu");
    
register_native("adp_items_force_buy""native_items_force_buy");
    
register_native("adp_items_menu_text_add""native_items_menu_text_add");
    
register_native("adp_register_extra_item""native_register_extra_item");
    
    
g_ItemRealName ArrayCreate(321);
    
g_ItemName ArrayCreate(321);
    
g_ItemFlag ArrayCreate(321);
    
g_ItemPoint ArrayCreate(11); 

I used another plugin to complete this plugin
That's not to say that someone else wrote this plugin, and I copied it and sent it here

As mentioned, its not your work then. Give the credits. There is nothing wrong with giving support to plugins that are no longer being supported AS LONG AS you give credit to the original author AND to make sure that they are not actively updating their plugins.

I really question your authenticity

alferd 07-04-2020 02:53

Re: Points System by AlferD
 
Well, if that's the case, I'll write the author's name on the code I didn't write in the post as well as on the plugin.

( I'm not posting a plugin to say I'm a writer, I am sending a plugin so that players can enjoy more facilities and enjoy playing )

OciXCrom 07-04-2020 08:53

Re: Points System by AlferD
 
Quote:

( I'm not posting a plugin to say I'm a writer, I am sending a plugin so that players can enjoy more facilities and enjoy playing )
Code:
#define AUTHOR "AlferD"

That's not what it says, is it? It doesn't matter why you post it, credits should be given to those who wrote it (or the majority of it).

HamletEagle 08-21-2021 05:17

Re: Points System by AlferD
 
Unapproved, it doesn't appear OP can support this plugin and we have better XP systems.


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

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