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

fr-points


Post New Thread Reply   
 
Thread Tools Display Modes
bad_boy
Member
Join Date: Oct 2018
Old 09-19-2019 , 14:49   Re: fr-points
Reply With Quote #11

I didn't save the points because you didn't ask for it. So I don't know what you want to use to save the points. MYSQL, Nvault, or SQL-Lite. If I do it I will use Steam_ID since everyone say it's the most reliable way.

I probably will not add the points saving. You are using AMXX 1.8.1 and I don't want to waste my time trying to make it work since I don't have any documentation about it

Last edited by bad_boy; 09-19-2019 at 14:55.
bad_boy is offline
Old 09-19-2019, 14:51
Shitty
This message has been deleted by Shitty.
Old 09-19-2019, 14:56
Shitty
This message has been deleted by Shitty.
bad_boy
Member
Join Date: Oct 2018
Old 09-19-2019 , 15:42   Re: fr-points
Reply With Quote #12

Try this one, I changed it so you can use the online compiler.
I did not add MSQY yet
Attached Files
File Type: sma Get Plugin or Get Source (points_menu.sma - 139 views - 10.5 KB)
bad_boy is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-19-2019 , 15:44   Re: fr-points
Reply With Quote #13

As you don't even know what is MYSQL , i suppose you don't have got any host , user , table...
so here is nVault version :
Attached Files
File Type: sma Get Plugin or Get Source (point_system.sma - 151 views - 3.7 KB)
File Type: sma Get Plugin or Get Source (point_shop.sma - 96 views - 5.0 KB)
File Type: inc point_system.inc (717 Bytes, 38 views)

Last edited by LearninG; 09-19-2019 at 15:47.
LearninG is offline
Old 09-19-2019, 15:49
Shitty
This message has been deleted by Shitty.
Old 09-19-2019, 15:49
Shitty
This message has been deleted by Shitty.
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-19-2019 , 15:54   Re: fr-points
Reply With Quote #14

amxmodx/scripting/include

EDIT : before starting to using it , i suggest you to put this on your server as a test mode (few days) to see if it has any issues.

Last edited by LearninG; 09-19-2019 at 15:57.
LearninG is offline
Old 09-19-2019, 15:55
Shitty
This message has been deleted by Shitty.
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-19-2019 , 15:58   Re: fr-points
Reply With Quote #15

put the inc file in amxmodx/scripting/include folder.
LearninG is offline
Old 09-19-2019, 16:00
Shitty
This message has been deleted by Shitty.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-19-2019 , 16:17   Re: fr-points
Reply With Quote #16

1.8.1 is an UNSUPPORTED version. You won't get any help for it around here nor anywhere else.
Compiling the plugin with a 1.9 compiler won't work on an older AMXX version.
If you want NEW plugins, use NEW AMXX versions.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 09-19-2019, 16:26
Shitty
This message has been deleted by Shitty.
Old 09-19-2019, 16:29
Shitty
This message has been deleted by Shitty.
Old 09-19-2019, 18:21
Shitty
This message has been deleted by Shitty.
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-20-2019 , 00:17   Re: fr-points
Reply With Quote #17

with amx_set_point , you can not set points of admin level A ( IMMUNITY) flags (but you can with natives ) , if you have IMMUNITY flag and want to get freepoint "say /freepoint". also there are two natives in poin_system.inc , you can use it in other plugins , shops , menus , decrease point , increase point , etc... (you must have plugin "point_system.amxx" on , then you can include the inc file and use natives)
Code:
/**  * Returns the client's point.  *  * @param index     Client index  *  * @return          Amount of  point the client has. Also returns 0 if  *                  the client is not connected or the index is not within the  *                  range of 1 to MaxClients  */ native get_user_point(index) /**  * Sets client's point amount.  *  * @param index         Client index  * @param value         Amount of point to set  *  * @noreturn  * @error               If player is not connected or not within the range  *                      of 1 to MaxClients.  */  native set_user_point(index , amount)
Code:
/freepoint in chat to get 99999 points ( for admin level A flags )
Code:
amx_set_point "target" "amount"
Code:
#include <amxmodx> #include <amxmisc> #include <point_system> #define FLAG ADMIN_IMMUNITY new const VERSION[]= "1.0" public plugin_init() {     register_plugin("Point Manager" , VERSION , "LearninG")     register_clcmd("say /freepoint" , "free_point")     register_concmd("amx_set_point", "cmd_give_point", FLAG, "<target> <amount>") } public free_point(id , level , cid) {      if (get_user_flags(id) & FLAG)      {           set_user_point(id , 999999)      } } public cmd_give_point(id , level , cid) {      if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED        new Arg1[24]      new Arg2[4]        read_argv(1, Arg1, charsmax(Arg1))      read_argv(2, Arg2, charsmax(Arg2))        new Point = str_to_num(Arg2)      new player = cmd_target(id, Arg1)      if (!player)      {           return PLUGIN_HANDLED      }      else      {           set_user_point(player , Point)      }      return PLUGIN_HANDLED }

Last edited by LearninG; 09-20-2019 at 00:48.
LearninG 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 05:16.


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