AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Achievements (https://forums.alliedmods.net/showthread.php?t=149342)

Pastout 02-05-2011 15:44

Achievements
 
3 Attachment(s)
Achievements

Version 2.2

by Pastout!!
Introduction:
Any kill you get with a gun adds a point to the weapon.
Each weapon has its max points to unlock it. The more kills
you get the quicker you unlock the Achievement.

Weapon Achiements:
    • God of War - Get a total of 10,000 Kills -
    • Pistol Master - Unlock All Pistols -
    • Rifle Master - Unlock All Rifles -
    • Shotgun Master - Unlock All Shotguns -
    • Spray and Pray - Get a Kill while being flashed -
    • Master At Arms - Unlock All the weapons -
    • And each weapon has its own achievement!

Other Achiements:
    • Ultimate Server Lover - Connect 1000 times to the server -
    • Boom Head-Shot - Get a total of 300 Headshots -
    • Distance Killed - Unlock All killed distances
    • Distance Walked - Unlock All walked distances -
    • OMFG that was close - Defuse bomb right before it explodes
    • Short Fuse - Plant the Bomb Within 25 seconds of round start -
    • Boomala Boomala - Plant the bomb of a total of 100 times -
    • Nothing Can Blow Up - Get a total of 400 bomb defuses -
    • And There are many more
Custom Achiements:
      • Play Around - Spend 1 Hour playing on the Server -
      • Stand Alone - Die 15 times as the last guy on the team -
      • 1 Hp Hero - Kill a enemy while having 1 HP -
      • Bad Friend - Kill 5 teammates in one round -
      • Urban Designer - Spray 300 decals -
      • Graffiti Is My Second Name - Spray 8 times in one round -
      • Ammo Conservation - Kill two enemy players with a single bullet -
      • Fly Away - Kill an enemy while he is in air -
      • Reloader - Reload your weapon 1000 times -
      • Camp Fire - Kill 3 enemies in a row, all within the same area -
      • Hat Trick - Kill 3 enemies with one HeGrenade -
      • Cowboy Diplomacy - Rescue 100 hostages -
Client Commands:
  • say /ach OR say /achievement
- Brings up the achievement Menu.
- In that menu, you can see your current achievement points, see a help screen for how this mod works, open a menu designated for each upgrade, or see the achievement levels of other players in the server.
  • say /deathmessage
- This will enable/disable the chat view of peoples death.
If ach_deathmessage is 1.

Cvars:
  • ach_enable 1/0
    - Default: 1
  • ach_showinfo 1/0
    - Shows the plugin information.
    - Default: 1
  • ach_deathmessage 1/0
    - This displays a message "Player has killed Or Headshot OtherPlayer from a distances of 1337 feet". etc
    - Default: 1
  • ach_flashmessage 1/0
    - This displays a message "Player is full/semi flashed and kill OtherPlayer..." etc.
    - Default: 1
  • ach_bombmessage 1/0
    - This displays a message "Player is planting the bomb" or "Player has planted the bomb" etc.
    - Default: 1
Plugin Configurations:
Open the .sma file, and edit this if you want sql:
Uncomment this in the sma.
//#define USING_SQL

When you are done, save the .sma and compile it here:
http://www.amxmodx.org/webcompiler.cgi
If you are getting compiler errors that don't make sense or the site is slow, you can use this one:
http://webcomp.ak-team.com/
Plugin Requirements:
  • Steam
  • AMX Mod X 1.8.0 or higher
    If you are having problems, please use the latest version of AMXX
  • CStrike Addon
  • Engine Module
  • Fakemeta Module
  • Hamsandwich Module
  • CSX Module
  • Fun Module
  • XS Include
  • If using SQL:

  • - SQLx Module
    If not using SQL:
    - NVault Module
Changelog:
HTML Code:

Version 1.0
Initial Release
 
Version 1.1
Fix menu Bug
 
Version 1.2
Added More Achievements
Added Hamsandwich Module
 
Version 1.3 
Optimized
Fix a bug with Standing achievement
 
Version 1.4
Optimized
Fix a bug SQL
Change the layout of help menu See "achievements.txt" for more details
 
Version 1.5
Optimized - No more Client_Prethink
Added a Hostage Achievement suggested by tuty
Fix a glitch with the 1 shot 2 kills achievement
 
Version 1.6
Optimized
 
Version 1.7
Optimized & Change the max value for Smoke and Flash
 
Version 1.8
Fix a bug with the Max Load for the weapons.
 
Version 1.9
Fix a bug when defusing the bomb achievement
Updated the Achievement Menu looks alot better
Optimized.
 
Version 2.0
Added More Achievements
* Cowboy Diplomacy - Rescured 100 hostages
*You've Made Your Points - Earn 50,000 damage points

Notes:
Please post all suggestions, comments, or improvements you may have.
Do not say anything about Non-Steam support because you will be ignored.

bibu 02-05-2011 15:57

Re: Achievements
 
Good job! WIll definetely use this.

stevenisecko138 02-05-2011 16:21

Re: Achievements
 
nice work

bibu 02-05-2011 17:05

Re: Achievements
 
The achievement menu is bugged, it somestimes shows nothing, sometimes it shows my AMX Super Menu, lol. :)

Quote:

L 02/05/2011 - 23:04:21: Invalid menu id 0(2)
L 02/05/2011 - 23:04:21: [AMXX] Run time error 10 (plugin "achievements.amxx") (native "menu_display") - debug not enable

Pastout 02-05-2011 17:20

Re: Achievements
 
Quote:

Originally Posted by bibu (Post 1407981)
The achievement menu is bugged, it somestimes shows nothing, sometimes it shows my AMX Super Menu, lol. :)

Updated fix bug
Current version 1.1

TzK 02-05-2011 17:24

Re: Achievements
 
If you would make web part for this, it would be awesome : )

.MMYTH. 02-05-2011 17:50

Re: Achievements
 
Some people don't use local mysql, you have to see this, and don't make connection on plugin_precache and yes in plugin_init.

NucL3ra 02-05-2011 17:59

Re: Achievements
 
Holy crap, this is so amazing seriously. Achivements into CS 1.6 is so cool, make more of them, add SQL (best option) and make cool rewards!

lucas_7_94 02-05-2011 18:01

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408023)
Some people don't use local mysql, you have to see this, and don't make connection on plugin_precache and yes in plugin_init.

why in plugin_init ?

.MMYTH. 02-05-2011 18:03

Re: Achievements
 
for optimize
PHP Code:

#if defined USING_SQL
g_sql_tuple SQL_MakeStdTuple()
SQL_ThreadQuery(g_sql_tuple"QueryCreateTable""CREATE TABLE IF NOT EXISTS ^"Achievement^" ( ^"name^" VARCHAR(32) NOT NULL, ^"authid^" VARCHAR(35) NOT NULL, ^"data^" VARCHAR(256) NOT NULL );" )
#else
g_iVault nvault_open("Achievements")
if(
g_iVault == INVALID_HANDLE)
    
set_fail_state"Error opening nVault" )
#endif 

And I think then don't save 'player' achievements.

Pastout 02-05-2011 18:13

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408041)
for optimize
PHP Code:

#if defined USING_SQL
g_sql_tuple SQL_MakeStdTuple()
SQL_ThreadQuery(g_sql_tuple"QueryCreateTable""CREATE TABLE IF NOT EXISTS ^"Achievement^" ( ^"name^" VARCHAR(32) NOT NULL, ^"authid^" VARCHAR(35) NOT NULL, ^"data^" VARCHAR(256) NOT NULL );" )
#else
g_iVault nvault_open("Achievements")
if(
g_iVault == INVALID_HANDLE)
    
set_fail_state"Error opening nVault" )
#endif 

And I think then don't save 'player' achievements.

Yes, No for the optimizing all you did was move it to plugin_init it still gets called in either way so doesnt matter

.MMYTH. 02-05-2011 18:14

Re: Achievements
 
PHP Code:

SQL_MakeStdTuple() 

This doesn't matter.

Pastout 02-05-2011 18:17

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408049)
PHP Code:

SQL_MakeStdTuple() 

This doesn't matter.

And why do you say that...

.MMYTH. 02-05-2011 18:19

Re: Achievements
 
How a simple person that don't know sqlx include, will create a external mysql conection ?

Pastout 02-05-2011 18:54

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408053)
How a simple person that don't know sqlx include, will create a external mysql conection ?

What are you saying Really?

mattisbogus 02-06-2011 01:29

Re: Achievements
 
Dr. Pastout this is fucking amazing man, incredible work. I look forward to using this and I hope it continues to grow.

juan2394 02-06-2011 01:44

Re: Achievements
 
WOW good job! this its just excelent.

mattisbogus 02-06-2011 02:20

Re: Achievements
 
I'm wondering if you could please enable support for bots with this? I say this because the server will crash when going to load data from bots, assuming because it doesn't save data for bots, but still creates an entry in nvault causing the server to crash on map change/server startup

.MMYTH. 02-06-2011 06:22

Re: Achievements
 
This plugin isn't amazing, have many erros and don't save achievements.

Pastout 02-06-2011 08:52

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408351)
This plugin isn't amazing, have many erros and don't save achievements.

Stop Mmyth, if you says it not working or have errors please post them here.
As for the bots edit this line

if( !is_user_bot( id ) && !is_user_hltv( id ) )

to

if( !is_user_hltv( id ) )

and your good to go

bibu 02-06-2011 08:56

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408351)
This plugin isn't amazing, have many erros and don't save achievements.

MMYTH, shut up.

nikhilgupta345 02-06-2011 11:10

Re: Achievements
 
WHy are you telling him to shut up? If there are errors with the plugin, and it's not saving the data, then it really isn't an amazing plugin YET.

But I also think that MMYTH is flaming, so he should just chill out and just post whatever errors he gets.

bibu 02-06-2011 12:01

Re: Achievements
 
Quote:

Originally Posted by nikhilgupta345 (Post 1408565)
just post whatever errors he gets.

Exactly for that. And no one is interested if he dislikes this plugin. If he has any problems, he should clarify it well. And the plugins works and saves correctly (vault).

.MMYTH. 02-06-2011 12:02

Re: Achievements
 
And no one is interested if you like this plugin.

bibu 02-06-2011 12:07

Re: Achievements
 
Quote:

Originally Posted by bibu (Post 1408453)
MMYTH, shut up.


Kreation 02-06-2011 13:59

Re: Achievements
 
Quote:

Originally Posted by .MMYTH. (Post 1408607)
And no one is interested if you like this plugin.

Just post your problem or shut the fuck up.

Good job, Pastout.

ot_207 02-06-2011 14:27

Re: Achievements
 
Gj doing this, I will surely use this or modify it to my needs :).

And about the first post I would like to tell you something about a mistake
XS Module - XS is not a module, it is just a library made specially for complex math applications.

Pastout 02-06-2011 19:40

Re: Achievements
 
Thanks guys for commenting will be adding more achievements soon and ot_207 thanks

Pastout 02-07-2011 12:18

Re: Achievements
 
Updated Added more achievements
Current Version 1.2

Capell 02-07-2011 14:33

Re: Achievements
 
Can you please add cvars for each achievement - to enable/disable? This would be awesome for different mods ;) Like HnS, etc.

Pastout 02-07-2011 19:23

Re: Achievements
 
Quote:

Originally Posted by Capell (Post 1409463)
Can you please add cvars for each achievement - to enable/disable? This would be awesome for different mods ;) Like HnS, etc.

Will work on API soon for this.

anyways

Updated See channel log for details
Current Version 1.3

L1yod 02-08-2011 03:22

Re: Achievements
 
Please add config multilingual

MiKe4444 02-08-2011 07:38

Re: Achievements
 
Awesome!

But i have problem:
1, First time before mapchange it works perfectly, but when map change the server crashed... Now every time when i run server with this plugin it crashes (something wrong with nVault)...

2, When i tryied compile it with sql saving ive got this problem
PHP Code:

Achievements_v1.3.sma(2165) : error 047: array sizes do not match, or destination array is too small 

Pls help

tuty 02-08-2011 07:40

Re: Achievements
 
i worked at this idea too... you should add escape suicide hastage achievements, and much more..otherwise nice plugin

Pastout 02-08-2011 16:10

Re: Achievements
 
Quote:

Originally Posted by MiKe4444 (Post 1409993)
Awesome!

But i have problem:
1, First time before mapchange it works perfectly, but when map change the server crashed... Now every time when i run server with this plugin it crashes (something wrong with nVault)...

2, When i tryied compile it with sql saving ive got this problem
PHP Code:

Achievements_v1.3.sma(2165) : error 047: array sizes do not match, or destination array is too small 

Pls help

Sorry, about that its fix in the newer version

Updated 1.4

.MMYTH. 02-08-2011 16:18

Re: Achievements
 
I can make php files for mysql option. If you want PM me.

gmansparks 02-08-2011 17:41

Re: Achievements
 
works with csdm , war3?

Pastout 02-08-2011 17:45

Re: Achievements
 
Quote:

Originally Posted by gmansparks (Post 1410432)
works with csdm , war3?

It should i don't see why not...

nikhilgupta345 02-08-2011 19:24

Re: Achievements
 
Yea, but you have a newround event, which doesn't happen on CSDM, so Im not sure if it will affect the plugin much though.

ot_207 02-09-2011 13:56

Re: Achievements
 
I think that it would be better to put the older versions in an archive, so that users will not download the same plugin twice. Or let just the newest version I donīt think that it is a problem.


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

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