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

[CS:GO] AchievementsGO 2.0 - create your own achievements!


Post New Thread Reply   
 
Thread Tools Display Modes
MAGNET12
Member
Join Date: Dec 2017
Old 06-03-2020 , 05:51   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #11

Perhaps you should update languange file?

https://github.com/MAGNET1/Achieveme...go.phrases.txt
__________________
MAGNET12 is offline
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 06-03-2020 , 08:10   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #12

is it possible to do my request?
XHUNTERX is offline
MAGNET12
Member
Join Date: Dec 2017
Old 06-03-2020 , 10:59   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #13

Quote:
Originally Posted by XHUNTERX View Post
is it possible to do my request?
Look at it from my perspective - you've requested some abstract fraction of what should have been provided. I don't get what do u want man.
__________________
MAGNET12 is offline
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 06-03-2020 , 19:54   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #14

Code:
  AGO_AddAchievement("Killer [Beginner]", "Kill 50 enemies\nPrice: 10 credits", "Zabójca", 50, 0, OnIdGranted);
  AGO_AddAchievement("Killer [Advanced]", "Kill 250 enemies\nPrice: 20 credits", "Zabójca", 250, 1, OnIdGranted);
  AGO_AddAchievement("Killer [Veteran]", "Kill 750 enemies\nPrice: 30 credits", "Zabójca", 750, 2, OnIdGranted);
  AGO_AddAchievement("Killer [Expert]", "Kill 1500 enemies\nPrice: 40 credits", "Zabójca", 1500, 3, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Beginner]", "Kill 25 enemies with HS\nPrice: 10 credits", "Head Hunter", 25, 4, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Advanced]", "Kill 125 enemies with HS\nPrice: 20 credits", "Head Hunter", 125, 5, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Veteran]", "Kill 325 enemies with HS\nPrice: 30 credits", "Head Hunter", 375, 6, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Expert]", "Kill 750 enemies with HS\nPrice: 40 credits", "Head Hunter", 750, 7, OnIdGranted);
  AGO_AddAchievement("Grenadier [Beginner]", "Kill 5 enemies with grenade\nPrice: 10 credits", "Grenadier", 5, 8, OnIdGranted);
  AGO_AddAchievement("Grenadier [Advanced]", "Kill 20 enemies with grenade\nPrice: 20 credits", "Grenadier", 20, 9, OnIdGranted);
  AGO_AddAchievement("Grenadier [Veteran]", "Kill 100 enemies with grenade\nPrice: 30 credits", "Grenadier", 100, 10, OnIdGranted);
  AGO_AddAchievement("Grenadier [Expert]", "Kill 250 enemies with grenade\nPrice: 40 credits", "Grenadier", 250, 11, OnIdGranted);
  AGO_AddAchievement("Incendiary [Beginner]", "Kill 5 enemies with molotov\nPrice: 10 credits", "Incendiary", 5, 12, OnIdGranted);
  AGO_AddAchievement("Incendiary [Advanced]", "Kill 20 enemies with molotov\nPrice: 20 credits", "Incendiary", 20, 13, OnIdGranted);
  AGO_AddAchievement("Incendiary [Veteran]", "Kill 100 enemies with molotov\nPrice: 30 credits", "Incendiary", 100, 14, OnIdGranted);
  AGO_AddAchievement("Incendiary [Expert]", "Kill 250 enemies with molotov\nPrice: 40 credits", "Incendiary", 250, 15, OnIdGranted);
  AGO_AddAchievement("Planter [Beginner]", "Plant 10 bombs\nPrice: 10 credits", "Planter", 10, 16, OnIdGranted);
  AGO_AddAchievement("Planter [Advanced]", "Plant 50 bombs\nPrice: 20 credits", "Planter", 50, 17, OnIdGranted);
  AGO_AddAchievement("Planter [Veteran]", "Plant 250 bombs\nPrice: 30 credits", "Planter", 250, 18, OnIdGranted);
  AGO_AddAchievement("Planter [Expert]", "Plant 750 bombs\nPrice: 40 credits", "Planter", 750, 19, OnIdGranted);
  AGO_AddAchievement("Defuser [Beginner]", "Defuse 10 bombs\nPrice: 10 credits", "Defuser", 10, 20, OnIdGranted);
  AGO_AddAchievement("Defuser [Advanced]", "Defuse 50 bombs\nPrice: 20 credits", "Defuser", 50, 21, OnIdGranted);
  AGO_AddAchievement("Defuser [Veteran]", "Defuse 250 bombs\nPrice: 30 credits", "Defuser", 250, 22, OnIdGranted);
  AGO_AddAchievement("Defuser [Expert]", "Defuse 750 bombs\nPrice: 40 credits", "Defuser", 750, 23, OnIdGranted);
  AGO_AddAchievement("Wealth [Beginner]", "Spend 50000$\nPrice: 10 credits", "Wealth", 50000, 24, OnIdGranted);
  AGO_AddAchievement("Wealth [Advanced]", "Spend 500000$\nPrice: 20 credits", "Wealth", 500000, 25, OnIdGranted);
  AGO_AddAchievement("Wealth [Veteran]", "Spend 1200000$\nPrice: 30 credits", "Wealth", 1200000, 26, OnIdGranted);
  AGO_AddAchievement("Wealth [Expert]", "Spend 6400000$\nPrice: 40 credits", "Wealth", 6400000, 27, OnIdGranted);
  AGO_AddAchievement("AWP Master [Beginner]", "Kill 25 enemies with AWP\nPrice: 10 credits", "AWP Master", 25, 28, OnIdGranted);
  AGO_AddAchievement("AWP Master [Advanced]", "Kill 125 enemies with AWP\nPrice: 20 credits", "AWP Master", 125, 29, OnIdGranted);
  AGO_AddAchievement("AWP Master [Veteran]", "Kill 325 enemies with AWP\nPrice: 30 credits", "AWP Master", 375, 30, OnIdGranted);
  AGO_AddAchievement("AWP Master [Expert]", "Kill 750 enemies with AWP\nPrice: 40 credits", "AWP Master", 750, 31, OnIdGranted);
in addition to these missions

I want to add the AK47 and DEAGLE missions

Last edited by XHUNTERX; 06-03-2020 at 19:54.
XHUNTERX is offline
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 06-03-2020 , 20:06   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #15

Code:
#include <AchievementsGO>
#include <store>
#include <sdkhooks>

#define MISSIONS_NUM 10
#define LEVELS 4

#define KILLER 0
#define HEAD_HUNTER 1
#define GRENADIER 2
#define INCENDIARY 3
#define PLANTER 4
#define DEFUSER 5
#define WEALTH 6
#define AWP_MASTER 7
#define AK47_MASTER 8
#define DEAGLE_MASTER 9

int missionID[MISSIONS_NUM][LEVELS];

public void OnPluginStart() {
  HookEvent("player_death", PlayerDeath);
  HookEvent("bomb_defused", BombDefused);
  HookEvent("bomb_planted", BombPlanted);
}

public void AGO_OnRegisterAchievements() {
  AGO_AddAchievement("Killer [Beginner]", "Kill 50 enemies\nPrice: 10 credits", "Zabójca", 50, 0, OnIdGranted);
  AGO_AddAchievement("Killer [Advanced]", "Kill 250 enemies\nPrice: 20 credits", "Zabójca", 250, 1, OnIdGranted);
  AGO_AddAchievement("Killer [Veteran]", "Kill 750 enemies\nPrice: 30 credits", "Zabójca", 750, 2, OnIdGranted);
  AGO_AddAchievement("Killer [Expert]", "Kill 1500 enemies\nPrice: 40 credits", "Zabójca", 1500, 3, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Beginner]", "Kill 25 enemies with HS\nPrice: 10 credits", "Head Hunter", 25, 4, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Advanced]", "Kill 125 enemies with HS\nPrice: 20 credits", "Head Hunter", 125, 5, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Veteran]", "Kill 325 enemies with HS\nPrice: 30 credits", "Head Hunter", 375, 6, OnIdGranted);
  AGO_AddAchievement("Head Hunter [Expert]", "Kill 750 enemies with HS\nPrice: 40 credits", "Head Hunter", 750, 7, OnIdGranted);
  AGO_AddAchievement("Grenadier [Beginner]", "Kill 5 enemies with grenade\nPrice: 10 credits", "Grenadier", 5, 8, OnIdGranted);
  AGO_AddAchievement("Grenadier [Advanced]", "Kill 20 enemies with grenade\nPrice: 20 credits", "Grenadier", 20, 9, OnIdGranted);
  AGO_AddAchievement("Grenadier [Veteran]", "Kill 100 enemies with grenade\nPrice: 30 credits", "Grenadier", 100, 10, OnIdGranted);
  AGO_AddAchievement("Grenadier [Expert]", "Kill 250 enemies with grenade\nPrice: 40 credits", "Grenadier", 250, 11, OnIdGranted);
  AGO_AddAchievement("Incendiary [Beginner]", "Kill 5 enemies with molotov\nPrice: 10 credits", "Incendiary", 5, 12, OnIdGranted);
  AGO_AddAchievement("Incendiary [Advanced]", "Kill 20 enemies with molotov\nPrice: 20 credits", "Incendiary", 20, 13, OnIdGranted);
  AGO_AddAchievement("Incendiary [Veteran]", "Kill 100 enemies with molotov\nPrice: 30 credits", "Incendiary", 100, 14, OnIdGranted);
  AGO_AddAchievement("Incendiary [Expert]", "Kill 250 enemies with molotov\nPrice: 40 credits", "Incendiary", 250, 15, OnIdGranted);
  AGO_AddAchievement("Planter [Beginner]", "Plant 10 bombs\nPrice: 10 credits", "Planter", 10, 16, OnIdGranted);
  AGO_AddAchievement("Planter [Advanced]", "Plant 50 bombs\nPrice: 20 credits", "Planter", 50, 17, OnIdGranted);
  AGO_AddAchievement("Planter [Veteran]", "Plant 250 bombs\nPrice: 30 credits", "Planter", 250, 18, OnIdGranted);
  AGO_AddAchievement("Planter [Expert]", "Plant 750 bombs\nPrice: 40 credits", "Planter", 750, 19, OnIdGranted);
  AGO_AddAchievement("Defuser [Beginner]", "Defuse 10 bombs\nPrice: 10 credits", "Defuser", 10, 20, OnIdGranted);
  AGO_AddAchievement("Defuser [Advanced]", "Defuse 50 bombs\nPrice: 20 credits", "Defuser", 50, 21, OnIdGranted);
  AGO_AddAchievement("Defuser [Veteran]", "Defuse 250 bombs\nPrice: 30 credits", "Defuser", 250, 22, OnIdGranted);
  AGO_AddAchievement("Defuser [Expert]", "Defuse 750 bombs\nPrice: 40 credits", "Defuser", 750, 23, OnIdGranted);
  AGO_AddAchievement("Wealth [Beginner]", "Spend 50000$\nPrice: 10 credits", "Wealth", 50000, 24, OnIdGranted);
  AGO_AddAchievement("Wealth [Advanced]", "Spend 500000$\nPrice: 20 credits", "Wealth", 500000, 25, OnIdGranted);
  AGO_AddAchievement("Wealth [Veteran]", "Spend 1200000$\nPrice: 30 credits", "Wealth", 1200000, 26, OnIdGranted);
  AGO_AddAchievement("Wealth [Expert]", "Spend 6400000$\nPrice: 40 credits", "Wealth", 6400000, 27, OnIdGranted);
  AGO_AddAchievement("AWP Master [Beginner]", "Kill 25 enemies with AWP\nPrice: 10 credits", "AWP Master", 25, 28, OnIdGranted);
  AGO_AddAchievement("AWP Master [Advanced]", "Kill 125 enemies with AWP\nPrice: 20 credits", "AWP Master", 125, 29, OnIdGranted);
  AGO_AddAchievement("AWP Master [Veteran]", "Kill 325 enemies with AWP\nPrice: 30 credits", "AWP Master", 375, 30, OnIdGranted);
  AGO_AddAchievement("AWP Master [Expert]", "Kill 750 enemies with AWP\nPrice: 40 credits", "AWP Master", 750, 31, OnIdGranted);
  AGO_AddAchievement("AK47 Master [Beginner]", "Kill 25 enemies with AK47\nPrice: 10 credits", "AK47 Master", 25, 28, OnIdGranted);
  AGO_AddAchievement("AK47 Master [Advanced]", "Kill 125 enemies with AK47\nPrice: 20 credits", "AK47 Master", 125, 29, OnIdGranted);
  AGO_AddAchievement("AK47 Master [Veteran]", "Kill 325 enemies with AK47\nPrice: 30 credits", "AK47 Master", 375, 30, OnIdGranted);
  AGO_AddAchievement("AK47 Master [Expert]", "Kill 750 enemies with AK47\nPrice: 40 credits", "AK47 Master", 750, 31, OnIdGranted);
  AGO_AddAchievement("DEAGLE Master [Beginner]", "Kill 25 enemies with DEAGLE\nPrice: 10 credits", "DEAGLE Master", 25, 28, OnIdGranted);
  AGO_AddAchievement("DEAGLE Master [Advanced]", "Kill 125 enemies with DEAGLE\nPrice: 20 credits", "DEAGLE Master", 125, 29, OnIdGranted);
  AGO_AddAchievement("DEAGLE Master [Veteran]", "Kill 325 enemies with DEAGLE\nPrice: 30 credits", "DEAGLE Master", 375, 30, OnIdGranted);
  AGO_AddAchievement("DEAGLE Master [Expert]", "Kill 750 enemies with DEAGLE\nPrice: 40 credits", "DEAGLE Master", 750, 31, OnIdGranted);
}

public void OnIdGranted(int achievementID, int temporaryID) {
  if (temporaryID == 0) {
    missionID[0][0] = achievementID;
    return;
  }
  missionID[temporaryID / 4][temporaryID % 4] = achievementID;
}

void AddPoint(int client, int which) {
  AGO_AddPoint(client, missionID[which][0]);
  if (AGO_IsAchievementCompleted(client, missionID[which][0]))
    AGO_AddPoint(client, missionID[which][1]);
  if (AGO_IsAchievementCompleted(client, missionID[which][1]))
    AGO_AddPoint(client, missionID[which][2]);
  if (AGO_IsAchievementCompleted(client, missionID[which][2]))
    AGO_AddPoint(client, missionID[which][3]);
}

void AddPoints(int client, int which, int n) {
  AGO_AddPoints(client, missionID[which][0], n);
  if (AGO_IsAchievementCompleted(client, missionID[which][0]))
    AGO_AddPoints(client, missionID[which][1], n);
  if (AGO_IsAchievementCompleted(client, missionID[which][1]))
    AGO_AddPoints(client, missionID[which][2], n);
  if (AGO_IsAchievementCompleted(client, missionID[which][2]))
    AGO_AddPoints(client, missionID[which][3], n);
}

void AddPointsZephyrus(int client, int n) {
  Store_SetClientCredits(client, Store_GetClientCredits(client) + n);
}

public void AGO_OnAchievementAccomplished(int client, int IdOfAchievement) {
  for (int i = 0; i < MISSIONS_NUM; i++) {
    for (int j = 0; j < LEVELS; j++) {
      if (missionID[i][j] == IdOfAchievement) {
        AddPointsZephyrus(client, 10 * (j + 1)); // BEGINNER - 10, ADVANCED - 20, VETERAN - 30, EXPERT - 40
        return;
      }
    }
  }
}

public Action PlayerDeath(Event event, char[] name, bool dontbroadcast) {
  int client = GetClientOfUserId(event.GetInt("userid"));
  int killer = GetClientOfUserId(event.GetInt("attacker"));
  bool headshot = event.GetBool("headshot");

  char weaponName[128];
  event.GetString("weapon", weaponName, sizeof(weaponName));

  if (!IsValidClient(client) || !IsValidClient(killer))
    return Plugin_Continue;

  AddPoint(killer, KILLER);

  if (headshot)
    AddPoint(killer, HEAD_HUNTER);

  if (StrEqual(weaponName, "hegrenade"))
    AddPoint(killer, GRENADIER);

  if (StrEqual(weaponName, "inferno"))
    AddPoint(killer, INCENDIARY);

  if (StrEqual(weaponName, "awp"))
    AddPoint(killer, AWP_MASTER);

  if (StrEqual(weaponName, "ak47"))
    AddPoint(killer, AK47_MASTER);

  if (StrEqual(weaponName, "deagle"))
    AddPoint(killer, DEAGLE_MASTER);

  return Plugin_Continue;
}

public Action BombPlanted(Event event,
  const char[] name, bool dontbroadcast) {
  AddPoint(GetClientOfUserId(event.GetInt("userid")), PLANTER);
}

public Action BombDefused(Event event,
  const char[] name, bool dontbroadcast) {
  AddPoint(GetClientOfUserId(event.GetInt("userid")), DEFUSER);
}

public Action CS_OnGetWeaponPrice(int client,
  const char[] weapon, int & price) {
  AddPoints(client, WEALTH, price);
}

public bool IsValidClient(int client) {
  if (client >= 1 && client <= MaxClients && IsClientInGame(client))
    return true;

  return false;
}

is there anything wrong with that
how can i fix it if any
Could you help
XHUNTERX is offline
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 06-03-2020 , 22:10   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #16

Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// ago_sample_missions.sp
//
// J:\sourcemod-1.10.0-git6488-windows\addons\sourcemod\scripting\include\store.inc(24) : error 050: constant 'szName' already defined
// J:\sourcemod-1.10.0-git6488-windows\addons\sourcemod\scripting\include\store.inc(55) : error 050: constant 'iId' already defined
// J:\sourcemod-1.10.0-git6488-windows\addons\sourcemod\scripting\include\store.inc(78) : warning 241: Array-based enum structs will be removed in 1.11. See https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Enum_Structs
// J:\sourcemod-1.10.0-git6488-windows\addons\sourcemod\scripting\include\store.inc(79) : warning 241: Array-based enum structs will be removed in 1.11. See https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Enum_Structs
// J:\sourcemod-1.10.0-git6488-windows\addons\sourcemod\scripting\include\store.inc(82) : warning 241: Array-based enum structs will be removed in 1.11. See https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Enum_Structs
// J:\sourcemod-1.10.0-git6488-windows\addons\sourcemod\scripting\ago_sample_missions.sp(6) : warning 203: symbol is never used: "g_cvarChatTag"
//
// 2 Errors.
//
// Compilation Time: 0,11 sec
// ----------------------------------------

Press enter to exit ...
XHUNTERX is offline
djded
Member
Join Date: Jul 2019
Location: Czech Republic
Old 06-06-2020 , 04:45   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #17

Hello.
Wery interesting plugin.
It possible to make it for css v91?
Thanks
djded is offline
MAGNET12
Member
Join Date: Dec 2017
Old 06-06-2020 , 08:21   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #18

I'm not sure what needs to be adjusted for this plugin to work with css

Have you actually tried to run it?
__________________
MAGNET12 is offline
djded
Member
Join Date: Jul 2019
Location: Czech Republic
Old 06-06-2020 , 08:38   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #19

Quote:
Originally Posted by MAGNET12 View Post
I'm not sure what needs to be adjusted for this plugin to work with css

Have you actually tried to run it?
No, I don't try it. Because it marks [CSGO]
And one more question, it possible to give players rewards in a thc_rpg credits/levels/experience?

Last edited by djded; 06-06-2020 at 08:39.
djded is offline
MAGNET12
Member
Join Date: Dec 2017
Old 06-06-2020 , 08:51   Re: [CS:GO] AchievementsGO 2.0 - create your own achievements!
Reply With Quote #20

I marked it as [CS:GO], because it was only tested in csgo. Can u test it and let me know? I would update range of games then

Yes, this plugin can be used in any place you find suitable. You're not restricted to just one plugin - it can be spread across every single program
__________________
MAGNET12 is offline
Reply


Thread Tools
Display Modes

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 02:08.


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