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

*****


Post New Thread Closed Thread   
 
Thread Tools Display Modes
D0n
New Member
Join Date: Aug 2006
Old 09-01-2009 , 06:46   Re: [TF2] Custom Achievements
#131

is there a way to work with the "player_calledformedic" for a custom achievement?

i tried it but it never works

in the SourceMod IRC they said me that the "player_calledformedic" isnīt called

i hope there is a way.

here the code i hope there is a way.

PHP Code:
HookEvent("player_calledformedic"eMediccall);

// Keep crying, baby!
public Action:eMediccall(Handle:event, const String:name[], bool:noBroadcast);
{  
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (!
IsValidClient(client))
    {
        return 
Plugin_Handled;
    }
    if (
TF2_GetPlayerClass(client) != TF2_GetClass("heavy"))
    {
        
ProcessAchievement(START_ID+3client);
    }
    return 
Plugin_Handled;

another question:
how can i make achievement with the condition "Get 5 Times killed with the Force_a_nature"?

hope you can help me

D0N
D0n is offline
Gachl
BANNED
Join Date: Feb 2009
Old 09-01-2009 , 08:51   Re: [TF2] Custom Achievements
#132

Quote:
Originally Posted by D0n View Post
how can i make achievement with the condition "Get 5 Times killed with the Force_a_nature"?
With this: http://forums.alliedmods.net/showpos...0&postcount=95 (coming soon)
Gachl is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 09-02-2009 , 04:27   Re: [TF2] Custom Achievements
#133

I'm in the middle of writing up the readme.txt, everything else is good to go and I shall attach the zip today (Remember it's at an early stage and bugs are for certain).

EDIT: Here we go, report any and all bugs, I'll do my best to fix them.

Update: Added support for strict checks on front stabs and body shots.
Attached Files
File Type: zip ach_ktm.zip (11.6 KB, 81 views)
__________________

Last edited by Jindo; 09-04-2009 at 02:05.
Jindo is offline
Gachl
BANNED
Join Date: Feb 2009
Old 09-02-2009 , 05:43   Re: [TF2] Custom Achievements
#134

Little question, can someone pm me a screenshot of a pyro earning an achievement (I need a screen of the effects).
Thanks!
Gachl is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 09-02-2009 , 06:54   Re: [TF2] Custom Achievements
#135

I'll go a recreate this briefly, hang on a minute or two.
__________________
Jindo is offline
Acdervis
Junior Member
Join Date: Jun 2008
Old 09-02-2009 , 06:58   Re: [TF2] Custom Achievements
#136

Quote:
Originally Posted by D0n View Post
is there a way to work with the "player_calledformedic" for a custom achievement?

i tried it but it never works

in the SourceMod IRC they said me that the "player_calledformedic" isnīt called

i hope there is a way.

here the code i hope there is a way.

PHP Code:
HookEvent("player_calledformedic"eMediccall);

// Keep crying, baby!
public Action:eMediccall(Handle:event, const String:name[], bool:noBroadcast);
{  
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (!
IsValidClient(client))
    {
        return 
Plugin_Handled;
    }
    if (
TF2_GetPlayerClass(client) != TF2_GetClass("heavy"))
    {
        
ProcessAchievement(START_ID+3client);
    }
    return 
Plugin_Handled;

another question:
how can i make achievement with the condition "Get 5 Times killed with the Force_a_nature"?

hope you can help me

D0N
Try:
PHP Code:
public OnPluginStart()
{
HookUserMessage(GetUserMessageId("VoiceSubtitle"), CallBack);
}

public 
Action:CallBack(UserMsg:msg_idHandle:bf, const players[], playersNumbool:reliablebool:init)
{
    new 
clientid BfReadByte(bf);
    new 
voicemenu1 BfReadByte(bf);
    new 
voicemenu2 BfReadByte(bf);

    if(
voicemenu1 == && voicemenu2 == 0)
    {
        
//DO SOMETHING!
    
}

Btw: First byte is clientid, second is the voicemenu number, third is selection
Acdervis is offline
JazzCP
Member
Join Date: Aug 2008
Old 09-02-2009 , 07:46   Re: [TF2] Custom Achievements
#137

@Jindo: A quick question.

Quantities.

Example: Kill someone so many times with something.

Is this handled by your plugin? If so, can you post about how (because there is no mention in the readme)? If not, consider this a feature request because this would make the plugin perfect.

Or am I barking up the wrong tree completely and the MySQL handles quantity?

Edit: Also, dominations? This would be amazing if these were implemented.

Last edited by JazzCP; 09-02-2009 at 07:49. Reason: Added an extra request
JazzCP is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 09-02-2009 , 07:56   Re: [TF2] Custom Achievements
#138

Quanities:

It depends in what context: if you want to get # kills with a weapon during any time on the server, then the MySQL side handles that.

Kills in a life/round/map are a feature I plan to add when I can however.

Dominations too, but they're tricky to figure out, because some maps reset them when the round ends, and some maps don't (or atleast they do it differently, if anyone knows the exact logic to when dominations are and are not reset, that would be a great help)
__________________
Jindo is offline
JazzCP
Member
Join Date: Aug 2008
Old 09-02-2009 , 08:02   Re: [TF2] Custom Achievements
#139

For quantities, I was thinking of "Kill Mr. X 10 times with a flare gun" or "Backstab Mr. Y 5 times". So, MySQL can handle that?

Thanks for the quick reply. In the process of making a config file and I was a little worried about how I was going to make the quantities work.
JazzCP is offline
Gachl
BANNED
Join Date: Feb 2009
Old 09-02-2009 , 08:32   Re: [TF2] Custom Achievements
#140

Quote:
Originally Posted by JazzCP View Post
For quantities, I was thinking of "Kill Mr. X 10 times with a flare gun" or "Backstab Mr. Y 5 times". So, MySQL can handle that?
Yes, that's the "amount" (1 = no quantities, >1 = progress bar)
Gachl is offline
Closed Thread



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 21:14.


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