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

the task menu plugins


Post New Thread Reply   
 
Thread Tools Display Modes
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 04:21   Re: the task menu plugins
Reply With Quote #11

Quote:
Originally Posted by zmd94 View Post
If you want the advance version of achievement plugin, you can use this: https://forums.alliedmods.net/showthread.php?t=149342

If you want a flexible achievement plugin that can be modified easily, just use Achievements API. Yet, you need to have required knowledge to do it. ;)
20 Times from the Shoulder to kill

20 Times To Kill The Feet

I the inclusion of these options, I want to sorry for my bad English
forumm is offline
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 11-04-2014 , 04:53   Re: the task menu plugins
Reply With Quote #12

Quote:
Originally Posted by zmd94 View Post
I have made a simple achievements plugin based on your request. If you want to open the menu, just say /simple in your chat.

The count will be reset at every disconnet.

The money reward will be given automatically if you have completed the objective.

I like your code
If you can do for me
Add a song when I finish a task?

I mean 15/15 Headshot
Then I finished the chat will be written and plays a song.

And if you can switch between 15 Died!
>
Survive 15 Rounds

I really thank you
Snitch is offline
Send a message via Skype™ to Snitch
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 06:27   Re: the task menu plugins
Reply With Quote #13

you have another version of this plugin ?
forumm is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-04-2014 , 07:08   Re: the task menu plugins
Reply With Quote #14

Snitch, it can be done. ;)
zmd94 is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 07:23   Re: the task menu plugins
Reply With Quote #15

Quote:
Originally Posted by zmd94 View Post
Snitch, it can be done. ;)
the plugin I want the advanced version of
forumm is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-04-2014 , 09:00   Re: the task menu plugins
Reply With Quote #16

If you want the advance version of achievement plugin, just use this: https://forums.alliedmods.net/showthread.php?t=149342

By the way, Snitch, just use this version for your request. ;)
PHP Code:
#include <amxmodx>
#include <cstrike>

// Please configure your own sound. The sound must
// be in .wav format. Next, please put it in the
// misc folder
#define CustomSound "misc/YourSoundName.wav" 

new i_Head[33], i_CounterT[33], i_Terrorist[33]
new 
i_Died[33], is_Died[33]
new 
i_Survive[33], is_Survive[33]

public 
plugin_init()
{
    
register_plugin("Simple ACH""1.0""zmd94")
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_event("DeathMsg""event_DeathMsg""a""1>0")
    
    
register_logevent("logevent_round_end"2"1=Round_End")  
    
    
register_clcmd("say /simple""Simple_ACH")
    
register_clcmd("say_team /simple""Simple_ACH")
}

public 
event_new_round()
{
    new 
iPlayers[32
    new 
iPlayerCountiplayer
    get_players
(iPlayersiPlayerCount"a"
    
    for(
0iPlayerCounti++)
    {
        
player iPlayers[i]
        
        if(
is_Died[player])
        {
            
cs_set_user_money(playercs_get_user_money(player) + 3000)
            
client_print(playerprint_chat"[ZM] Free money for dying 15 times!")
            
            
client_cmd(player"spk %s"CustomSound)
            
            
is_Died[player] = false
        
}
        
        if(
is_Survive[player])
        {
            
cs_set_user_money(playercs_get_user_money(player) + 3000)
            
client_print(playerprint_chat"[ZM] Free money for surviving 15 times!")
            
            
client_cmd(player"spk %s"CustomSound)
            
            
is_Survive[player] = false
        
}
    }
}

public 
logevent_round_end()
{
    new 
iPlayers[32
    new 
iPlayerCountiplayer
    get_players
(iPlayersiPlayerCount"a"
    
    for(
0iPlayerCounti++)
    {
        
player iPlayers[i]
        
        if(
i_Survive[player] >= 15)
        {
            
            
client_print(playerprint_chat"[ZM] Free money for surviving 15 round!")
            
client_print(playerprint_chat"[ZM] The money will be given in new round!")
            
is_Survive[player] = true
        
}
        
        
client_print(playerprint_chat"[ZM] Survived countdown!")
        
i_Survive[player] += 1
    
}
}

public 
client_disconnect(id)
{    
    
ResetCount(id)
}

public 
event_DeathMsg()
{
    new 
iKilleriKiller read_data(1)
    new 
iVictimiVictim read_data(2)
    new 
iIsHeadshotiIsHeadshot read_data(3)
    
    if(
iVictim == iKiller || !is_user_alive(iKiller))
        return
            
    if(
iIsHeadshot)
    {
        if(
i_Head[iKiller] >= 15)
        {
            
cs_set_user_money(iKillercs_get_user_money(iKiller) + 4000)
            
client_print(iKillerprint_chat"[ZM] Free money for 15 headshot!")
            
            
client_cmd(iKiller"spk %s"CustomSound)
        }
        
client_print(iKillerprint_chat"[ZM] Headshot countdown!")
        
i_Head[iKiller] += 1
    
}
    else
    {
        if ( 
cs_get_user_team(iKiller) == CS_TEAM_CT )
        {
            if(
i_Terrorist[iKiller] >= 10)
            {
                
cs_set_user_money(iKillercs_get_user_money(iKiller) + 2000)
                
client_print(iKillerprint_chat"[ZM] Free money for defeating 10 terrorist!")
                
                
client_cmd(iKiller"spk %s"CustomSound)
            }
            
client_print(iKillerprint_chat"[ZM] Defeating terrorist countdown!")
            
i_Terrorist[iKiller] += 1
        
}
        else
        {
            if(
i_CounterT[iKiller] >= 10)
            {
                
cs_set_user_money(iKillercs_get_user_money(iKiller) + 2000)
                
client_print(iKillerprint_chat"[ZM] Free money for defeating 10 counter-terrorist!")
                
                
client_cmd(iKiller"spk %s"CustomSound)
            }
            
client_print(iKillerprint_chat"[ZM] Defeating counter-terrorist countdown!")
            
i_CounterT[iKiller] += 
        
}
    }
    
    if(
i_Died[iVictim] >= 15)
    {
        
is_Died[iVictim] = true
        client_print
(iVictimprint_chat"[ZM] Dying 15 times! Free money will be given in new round!")
    }
    
    
client_print(iVictimprint_chat"[ZM] Dying countdown!")
    
i_Died[iVictim] += 1
}

public 
Simple_ACH(id
{
    new 
szTemp[500 char]
    
formatex(szTempcharsmax(szTemp), "Simple Achievements \rv1.0")
    
    new 
menu menu_create(szTemp"Ach_Handler")
    
    
formatex(szTempcharsmax(szTemp), "15 Headshot! \r%i/15"i_Head[id])
    
menu_additem(menuszTemp"1")
    
    
formatex(szTempcharsmax(szTemp), "10 CT Kill! \r%i/10"i_CounterT[id])
    
menu_additem(menuszTemp"2")
    
    
formatex(szTempcharsmax(szTemp), "10 T Kill! \r%i/10"i_Terrorist[id])
    
menu_additem(menuszTemp"3")
    
    
formatex(szTempcharsmax(szTemp), "15 Died! \r%i/15"i_Died[id])
    
menu_additem(menuszTemp"4")
    
    
formatex(szTempcharsmax(szTemp), "15 Survived! \r%i/15"i_Survive[id])
    
menu_additem(menuszTemp"5")
    
    
menu_display(idmenu)
}

public 
Ach_Handler(idmenuitem
{
    if(
item == MENU_EXIT
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    switch(
item
    {
        case 
0
        {
            
client_print(idprint_chat"[ZM] This is simple achievement!")
        }
        case 
1
        {
            
client_print(idprint_chat"[ZM] This is simple achievement!")
        }
        case 
2
        {
            
client_print(idprint_chat"[ZM] This is simple achievement!")
        }
        case 
3
        {
            
client_print(idprint_chat"[ZM] This is simple achievement!")
        }
        case 
4
        {
            
client_print(idprint_chat"[ZM] This is simple achievement!")
        }
    }
    return 
PLUGIN_HANDLED
}
            
ResetCount(id)
{
    
i_Head[id] = 0
    i_CounterT
[id] = 
    i_Terrorist
[id] = 
    i_Died
[id] = 0
    is_Died
[id] = false
    i_Survive
[id] = 0
    is_Survive
[id] = false


Last edited by zmd94; 11-04-2014 at 09:35.
zmd94 is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 10:24   Re: the task menu plugins
Reply With Quote #17

the plugin does not work
forumm is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-04-2014 , 10:45   Re: the task menu plugins
Reply With Quote #18

What are the problems?
zmd94 is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 10:50   Re: the task menu plugins
Reply With Quote #19

the task of the warning does not [10/10]-- [ACTIVE] such a warning must

the task was done, but did not award
forumm is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-04-2014 , 11:17   Re: the task menu plugins
Reply With Quote #20

I have updated the code.
zmd94 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 23:36.


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