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 , 13:53   Re: the task menu plugins
Reply With Quote #21

Quote:
Originally Posted by zmd94 View Post
I have updated the code.
I completed the mission in 15 HeadShot [15/15] -- [Active] I want to write and the reward is unlimited retrieving

Last edited by forumm; 11-04-2014 at 13:53.
forumm is offline
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 11-04-2014 , 14:29   Re: the task menu plugins
Reply With Quote #22

Quote:
Originally Posted by zmd94 View Post
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

Thanks

i have question i not sure u do it aval if u can.

mission - Save system [ip,steamid] of client
and when i finish all mission i can't reset them or whatever.

ty
Snitch is offline
Send a message via Skype™ to Snitch
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 14:36   Re: the task menu plugins
Reply With Quote #23

Quote:
Originally Posted by Snitch View Post
Thanks

i have question i not sure u do it aval if u can.

mission - Save system [ip,steamid] of client
and when i finish all mission i can't reset them or whatever.

ty
award for the 1st time, I want to give

constantly I don't want to give

I completed the mission in 15 HeadShot [15/15] -- [Active] I want to write and the reward is unlimited retrieving

Last edited by forumm; 11-04-2014 at 14:36.
forumm is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 11-04-2014 , 15:28   Re: the task menu plugins
Reply With Quote #24

Your English is hard to understand. Are you saying you only want a person to get a mission reward one time?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
forumm
Senior Member
Join Date: Nov 2013
Old 11-04-2014 , 15:35   Re: the task menu plugins
Reply With Quote #25

Quote:
Originally Posted by joshknifer View Post
Your English is hard to understand. Are you saying you only want a person to get a mission reward one time?
yess a person who completes the task 1 times and award-winning reset task.
forumm is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 11-04-2014 , 15:45   Re: the task menu plugins
Reply With Quote #26

So after they complete, reset to 0 and let them complete again?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-04-2014 , 18:42   Re: the task menu plugins
Reply With Quote #27

I have updated the code. Now, the count will be reset again when they have completed the mission. ;)

https://forums.alliedmods.net/showpo...94&postcount=8

By the way, Snitch, just use this version: https://forums.alliedmods.net/showthread.php?t=149342

Last edited by zmd94; 11-04-2014 at 18:46.
zmd94 is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-05-2014 , 04:54   Re: the task menu plugins
Reply With Quote #28

Quote:
Originally Posted by joshknifer View Post
So after they complete, reset to 0 and let them complete again?

Quote:
Originally Posted by zmd94 View Post
I have updated the code. Now, the count will be reset again when they have completed the mission. ;)

https://forums.alliedmods.net/showpo...94&postcount=8

By the way, Snitch, just use this version: https://forums.alliedmods.net/showthread.php?t=149342
for this task I prize I don't want to auto

when the task is completed [completed] writing out


Edit/Delete Message Reply With Quote Multi-Quote This Message Quick reply to this message #1
I'm you from the task menu plugin plugin, I want the number of /the menu will open and write to the following menu options the player will be 15 CT killed so [10/10] when the task completes by clicking on the option [$2000] award


10 CT Kill [$2000] -- [0/10] -- [INCOMPLETE]

10 T Kill [$2000] -- [0/10] -- [INCOMPLETE]

15 Player Head Kill [$4000] -- [0/15] -- [INCOMPLETE]

15 Died [$3000] -- [0/15] -- [INCOMPLETE]

15 Survived![$4000] -- [0/15] -- [INCOMPLETE]
________________________________________

10 CT Kill [$2000] -- [10/10] -- [COMPLETE]

10 T Kill [$2000] -- [10/10] -- [COMPLETE]

15 Player Head Kill [$4000] -- [15/15] -- [COMPLETE]

15 Died [$3000] -- [15/15] -- [COMPLETE]

15 Survived![$4000] -- [15/15] -- [COMPLETE]

the task is completed by pressing taken to allow

Last edited by forumm; 11-05-2014 at 05:04.
forumm is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-05-2014 , 05:00   Re: the task menu plugins
Reply With Quote #29

Do you mean that you want the money will only be given if do something which mean you do not want the money to be given automatically when a player has completed the mission?
zmd94 is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-05-2014 , 05:06   Re: the task menu plugins
Reply With Quote #30

Quote:
Originally Posted by zmd94 View Post
Do you mean that you want the money will only be given if do something which mean you do not want the money to be given automatically when a player has completed the mission?
when the task is completed by pressing task of the award, I want to be taken
forumm 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 20:38.


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