Raised This Month: $ Target: $400
 0% 

[REQ] Knife Kill Bonus


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-12-2014 , 07:55   Re: [REQ] Knife Kill Bonus
#1

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <fun> #define PLUGIN "Knife Kill Bonuses" #define VERSION "1.0" #define AUTHOR "Flicker" const TASK_ID = 6969 const Float:FAST_SPEED = 330.0 //Your speed bonus new const g_szSound[] = "knife_kill.mp3" new g_iSync new bool:g_bHasSpeed[33] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("DeathMsg", "onDeathMsgEvent", "a")     register_event("CurWeapon", "onCurWeaponEvent", "be", "1=1")         g_iSync = CreateHudSyncObj() } public plugin_precache()     precache_sound(g_szSound) public onDeathMsgEvent() {     new id = read_data(1)         new szWeapon[32]     read_data(4, szWeapon, charsmax(szWeapon))         if(equal(szWeapon, "knife") && is_user_alive(id))     {         new szName[32], szName2[32]         get_user_name(id, szName, charsmax(szName))         get_user_name(read_data(2), szName2, charsmax(szName2))                 set_hudmessage(255, 0, 0, 0.02, 0.2, 1, 0.1, 6.0, 0.1, 0.1, -1)         ShowSyncHudMsg(0, g_iSync, "Player %s knifed %s Hahahaha", szName, szName2)                 client_cmd(id, "mp3 play %s", g_szSound)                 set_user_health(id, get_user_health( id ) + 50 )                 g_bHasSpeed[id] = true         remove_task(id + TASK_ID)         set_task(10.0, "taskRemoveSpeed", id + TASK_ID)         set_user_maxspeed(id, FAST_SPEED)         set_user_frags( id, get_user_frags( id ) + 2 )     } } public onCurWeaponEvent(id)     if(g_bHasSpeed[id])         set_user_maxspeed(id, FAST_SPEED) public taskRemoveSpeed(id) {     id -= TASK_ID     g_bHasSpeed[id] = false     set_user_maxspeed(id, 241.0) }
__________________
HamletEagle is offline
alyona
Member
Join Date: Nov 2013
Location: tver
Old 10-09-2014 , 02:59   Re: [REQ] Knife Kill Bonus
#2

as per above code ... it showed can load file name 123.mp3 from sound/sound/mp3 , so i created another sound folder in sound folder n placed 123.mp3 n joined server n server downloaded the files too but its not playing the file... is it problem with the mp3 files?? or any size limit ?? the file is 16kb n converted from .wav to mp3 in 128 bitrate ...
alyona is offline
rusky
New Member
Join Date: Oct 2014
Old 10-16-2014 , 10:40   Re: [REQ] Knife Kill Bonus
#3

can you give the mp3 file please?
rusky is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-13-2014 , 07:59   Re: [REQ] Knife Kill Bonus
#4

Need help ? How to reduce speed it's too much i tried changing set_user_maxspeed to 250 still same speed

And another thing is how to set speed only for 5 seconds ?

Thanks
Awesome_man is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-13-2014 , 08:32   Re: [REQ] Knife Kill Bonus
#5

Quote:
Originally Posted by Awesome_man View Post
Need help ? How to reduce speed it's too much i tried changing set_user_maxspeed to 250 still same speed

And another thing is how to set speed only for 5 seconds ?

Thanks
Look at the task, and change the time to 5.0 seconds.
__________________

Last edited by HamletEagle; 08-13-2014 at 08:32.
HamletEagle is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-13-2014 , 09:55   Re: [REQ] Knife Kill Bonus
#6

Quote:
Originally Posted by HamletEagle View Post
Look at the task, and change the time to 5.0 seconds.
oh.. thanks mate
Awesome_man is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-13-2014 , 08:12   Re: [REQ] Knife Kill Bonus
#7

You need to edit this line only:
Quote:
const Float:FAST_SPEED = 330.0 //Your speed bonus
zmd94 is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-13-2014 , 09:54   Re: [REQ] Knife Kill Bonus
#8

Quote:
Originally Posted by zmd94 View Post
You need to edit this line only:
Can you please tell me the current value for just a little speed
Awesome_man is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-13-2014 , 10:43   Re: [REQ] Knife Kill Bonus
#9

Quote:
Originally Posted by Awesome_man View Post
Can you please tell me the current value for just a little speed
Can't you just test it out and find out which value will be good for you? I mean, such a question is lazy and useless, because it depends on what YOU want and you can make it better than everybody. However, i'd suggest something like 280.0 (the default is 245.0 ~250.0)
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-14-2014 , 02:38   Re: [REQ] Knife Kill Bonus
#10

Quote:
Originally Posted by Flick3rR View Post
Can't you just test it out and find out which value will be good for you? I mean, such a question is lazy and useless, because it depends on what YOU want and you can make it better than everybody. However, i'd suggest something like 280.0 (the default is 245.0 ~250.0)
ok thanks mate
Awesome_man 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 15:22.


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