Raised This Month: $7 Target: $400
 1% 

Tasks


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   v3x (159)
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 07-03-2008 , 15:27   Tasks
Reply With Quote #1

Tasks 1.02 (with extensions)


Description
You can define tasks for players and award for making them. Now only for kill enemies or survive rounds. It could be prize for using different weapons, not typical kill (fe. Headshots with nade), for player who good evade death or whatever you want.
Now you can define Multi-Tasks.
Default task can be one activity, but if you change constant MAXEXT (read lower about constants) from 0 to 1,2,3....you can add some extenstions.

Thanks

-Texnux for suggestions
- Slim-T for translation [sv]
- helderpostiga1 for translation [pb]

New feature:
If player make task, next award will be more than standard.

n - count of made tasks
NEXT_AWARD = STANDARD_AWARD + n*STANDARD_AWARD*0.25

Adding task:
Create config with list of task define by command add_task (read lower about it), tasks.cfg is default (no required!), but not only this file can contain it. You can use other plugins (fe. http://forums.alliedmods.net/showthread.php?p=379510) to add different tasks on different maps.

Installation
  • tasks.amxx put into plugins folder
  • add tasks.amxx into configs/plugins.ini
  • tasks.txt put into amxmodx/data/lang folder
  • if you want put sounds into sound/tasks folder
  • create or download my config and put as amdmodx/configs/tasks.cfg file or other execute on start server/load map and write there lines with tasks
Required modules
  • <cstrike>
  • <csx>
  • <fakemeta>
  • <engine>
Server Commands/Cvars
  • amx_taskaward 0|1|2
    • 0 - standard (money on de_, cs_ and as_ maps; alternative on other)
    • 1 - money
    • 2 - alternative
  • amx_altaward <num> //work only if amx_taskaward is not 1
    • 0 - random
    • 1 - medkit
    • 2 - increase max health
    • 3 - chance on Berserker Mode
      • more speed
      • extra hp
      • extra knife damage
      • if attacker is next to (< 2m) get slap
Later I will attach video from launch berserker mode
  • amx_taskmedkithp NUM
    • one medkit restore NUM hp
  • add_task args...
    • adding new task
  • add_extend2task args...
    • adding extension for last added task, it accept MAXEXT(look at constants list, lower) extensions
Using:
Quote:
add_task Award What How_many_times [Weapon] [With_hs]
Quote:
add_extend2task What How_many_times [Weapon] [With_hs]
Award - AWARD$ or AWARD/100 medkits, max HP or chance on Berserker Mode
What - KILL or SURVIVE
How_many_times - how many times repeat activity
Weapon* (optional) - weapon with which player kill enemy
  • Weapon can be any of CS . You can see list on http://www.amxmodx.org/funcwiki.php?...d=4#const_cswp without CSW_ prefix, you cant use flashbang, smoke grenade ,c4 and kevlars...i hope that dont need give reason . If kill can be done with any weapon write dm (doesnt matter) as 4th argument
With_hs* (optional) - if 1 victim must be killed with headshot

* only for KILL task

examples of single tasks:

Task:kill 2 enemies with usp for 300$ or 3 alternative award
Quote:
add_task 300 kill 2 usp 0
Task:survive 3 rounds for 500$ or 5 alternative award
Quote:
add_task 500 survive 3
Task:kill 7 enemies with Kalashnikov with headshot for 1000$ or 10 alternative award
Quote:
add_task 1000 kill 7 ak47 1
exaxples of tasks with extensions: (for this examples MAXEXT must be '1')

Task: survive 5 round AND kill 6 enemies for 800$ or 8 alternative award
Quote:
add_task 800 survive 5
add_extend2task kill 6
Task: kill 3 enemies with usp with headshot AND kill 6 enemies with m4a1 for 1000$ or 10 alternative award
Quote:
add_task 1000 kill 3 usp
add_extend2task kill 6 m4a1
Task: survive 5 round for 800$ or 8 alternative award
(bad order of commands)
Quote:
add_extend2task kill 6
add_task 800 survive 5
!IMPORTANT:
this command can be used only on few seconds after load map (in start config only) because changing rules during game is bad
Client Commands
  • tasks - display list of tasks
  • medichelp - display very short manual about using medkits
  • medic - use medkits
Presentation
tasks.sma
Code:
...
#define MAXEXT 2
...
tasks.cfg
Code:
add_task 500 kill 3 dm 1

add_task 400 kill 2 mac10 1
add_extend2task kill 2 tmp

add_task 400 kill 3 MP5NAVY 1
add_extend2task kill 4 m4a1
add_extend2task kill 4 famas 1

add_task 300 kill 2 scout

add_task 800 survive 5
add_extend2task kill 6
Effect:


Sounds
Any sounds of plugins are optional, if you dont want any of them simply dont put it on your server (without any problems)
Languages
  • EN
  • PL
  • SV
  • PB
Constants
  • ( 14 ) #define MAXPLAYERS 32
    • if your server have less change it and recompile
  • ( 16 ) #define MAXTASKC 70
    • max count of tasks, the same effect as MAXPLAYERS - less memory using
  • ( 17 ) #define MAXEXT 0
    • define how much extension are accept
  • ( 19 ) #define messInterval 80.0
    • interval info messages (in seconds)
Change Log
  • 1.0 - Base
  • 1.01 - Fixed few bugs
  • 1.02 - Clean code, repair base, two new awards
Note: In code i write author 'R3X' because it is my real nick, 'Scherzo' i was using on forums when i registered (long ago).
Attached Thumbnails
Click image for larger version

Name:	screen.JPG
Views:	10904
Size:	37.7 KB
ID:	28466  
Attached Files
File Type: sma Get Plugin or Get Source (tasks.sma - 2045 views - 21.5 KB)
File Type: cfg tasks.cfg (839 Bytes, 907 views)
File Type: txt tasks.txt (4.1 KB, 835 views)
File Type: rar sounds.rar (102.4 KB, 956 views)

Last edited by Scherzo; 12-21-2008 at 16:24. Reason: update
Scherzo is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-03-2008 , 15:51   Re: Tasks
Reply With Quote #2

Please upload the file to this post. It makes it easier to update.

Also, it is best to use pcvars all the time. Even if the cvar is already registered, you can use get_cvar_pointer("cvar") to generate the pcvar part of it.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 07-04-2008 , 07:00   Re: Tasks
Reply With Quote #3

Quote:
Even if the cvar is already registered, you can use get_cvar_pointer("cvar") to generate the pcvar part of it.
Ok, done. Thanks

I fixed few bugs and uploaded correct sounds.

//Edit
@down
I had that earlier, but changed. Repaired.

Last edited by Scherzo; 07-04-2008 at 11:03.
Scherzo is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-04-2008 , 10:44   Re: Tasks
Reply With Quote #4

Get the pointer during plugin_init. There is no need to keep getting them when you can do it just once.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-04-2008 , 12:21   Re: Tasks
Reply With Quote #5

Exelent. Very good Idea.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Texnux
Member
Join Date: Mar 2008
Location: Denmark
Old 07-04-2008 , 20:19   Re: Tasks
Reply With Quote #6

Pretty interresting plugin you got there!

Great with awards for killing people with a special weapon!

What would make this plugin outstanding would be features like this:
- Random award for completing a task
- More awards - armor/godmode/noclip and the like
- More tasks
- Special rewards for completing multiple tasks
- Sound effects to some task, example when you are granted godmode it emits one sound

- Texnux
Texnux is offline
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 07-05-2008 , 09:21   Re: Tasks
Reply With Quote #7

Thanks.

Idea is based on Condition Zero Single Player game.

I will add random award option when got more types of award . Thx for suggestion.

Sounds already exists for complete task and use medkit. Later add more on new events.

I`m thinking about Multi-task. I only need time to write it.

More tasks...At start write plugin I had award for doing scenario task, but I was working only on de_ maps (planting, defusing etc), so I deleted it. Maybe later I add more task, now I focus on awards. If somebody got any idea please post it there.
Scherzo is offline
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 07-06-2008 , 13:43   Re: Tasks
Reply With Quote #8

Updated.

//Edit
And again.

//Edit2
Fixed two little bugs.

Update
No more two ways to catch death event. Now it work only with register_event() - (client_death deleted).

Last edited by Scherzo; 07-07-2008 at 13:18. Reason: 4th update :D
Scherzo is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 07-08-2008 , 04:50   Re: Tasks
Reply With Quote #9

Scherzo fakemeta! Don't use FUN
Styles is offline
Send a message via AIM to Styles
Scherzo
Senior Member
Join Date: Feb 2007
Location: Kwidzyn, Poland
Old 07-08-2008 , 06:10   Re: Tasks
Reply With Quote #10

Oh, so I cant use it? I found on function list 'set_user_health' and added medkits


Fixed. Now it is using fakemeta.

Last edited by Scherzo; 07-08-2008 at 07:37.
Scherzo 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 04:31.


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