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

No slash;exclude shield


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mordi
Senior Member
Join Date: Jul 2007
Location: o rly?
Old 08-04-2007 , 06:48   No slash;exclude shield
Reply With Quote #1

Hello,

I'm running my own package of useful hide n seek scripts and there is something I want to add. I need help modifying the Nubslash plugin by by p3tsin.

Code:
#include <amxmodx>
#include <fakemeta>

new curweapon[33]
new bool:allowslash
new terrwin
new gMsg_SayText
new cv_winlimit

public plugin_init() {
register_plugin("Nubslash","1.00","p3tsin")
cv_winlimit = register_cvar("amx_nubslashlimit","3")
register_forward(FM_CmdStart,"fm_cmdstart",0)
register_event("CurWeapon","event_curweapon", "be","1=1")
gMsg_SayText = get_user_msgid("SayText")
}
public event_curweapon(id) {
curweapon[id] = read_data(2)
}
public fm_cmdstart(id,uc_handle,random_seed) {
if(!allowslash && curweapon[id] == CSW_KNIFE && is_user_alive(id)) {
new button = get_uc(uc_handle,UC_Buttons)
if(button&IN_ATTACK) set_uc(uc_handle,UC_Buttons, button&~IN_ATTACK|IN_ATTACK2)
}
return FMRES_IGNORED
}
//called by hidengeek on roundend
public hide_roundend(winner) {
if(winner == 1) {
terrwin++
new limit = get_pcvar_num(cv_winlimit)
if(!allowslash && 0 < limit <= terrwin) {
allowslash = true
print_red(0,"============================================= =========")
print_red(0,"CTs have lost %d rounds in a row, they are now allowed to use tha NUBSLASH!",limit)
print_red(0,"============================================= =========")
}
}
else terrwin = 0, allowslash = false
}
stock print_red(id,const fmt[],{Float,_}:...) {
if(id && !is_user_connected(id)) return 0
static buffer[192]
buffer[0] = '^x03'
vformat(buffer[1],190, fmt,3)
static players[32], inum
get_players(players,inum, "e","TERRORIST")
if(!inum) {
get_players(players,inum)
if(!inum) return 0 //no players :o
}
message_begin(id ? MSG_ONE : MSG_ALL,gMsg_SayText,{0,0,0},id)
write_byte(players[0])
write_string(buffer)
message_end()
return 1
}
First of all it doesn't allow ct's to slash after 3 rounds.
Second problem is to activate slash for players that hold shield at all times (i use a plugin that give weapons). I've attached the hide n seek source code file if that is any useful (it says "called by hidengeek on roundend" in the nubslash script).
Attached Files
File Type: sma Get Plugin or Get Source (hidenseek.sma - 457 views - 27.9 KB)
__________________
Quote:
Originally Posted by Alka View Post
engine ?! 0o... *barf*
mordi is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-05-2007 , 09:54   Re: No slash;exclude shield
Reply With Quote #2

This script works! But for..

Quote:
Originally Posted by mordi
Second problem is to activate slash for players that hold shield at all times
Dunno...:/
Attached Files
File Type: sma Get Plugin or Get Source (allow_nubslash.sma - 909 views - 1.4 KB)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
mordi
Senior Member
Join Date: Jul 2007
Location: o rly?
Old 08-05-2007 , 12:57   Re: No slash;exclude shield
Reply With Quote #3

Thanks alot Alka. Now, does anyone know a method to exclude it for shield?


EDIT: Alka: the pluin doesn't work, i get no errors though
__________________
Quote:
Originally Posted by Alka View Post
engine ?! 0o... *barf*

Last edited by mordi; 08-05-2007 at 15:58.
mordi is offline
hmrsmpsn
Senior Member
Join Date: Nov 2005
Location: sWeDeN YEEAAAH!!!
Old 08-05-2007 , 12:58   Re: No slash;exclude shield
Reply With Quote #4

does anyone know the engine way for cmdstart
__________________



new Float:second = 1.0
new Float:minute = 60*second
new Float:hour = 60*minute
new Float:day = 24*hour
new Float:year = 365*day
set_task(10.0*years,"clean_my_room")
hmrsmpsn is offline
mordi
Senior Member
Join Date: Jul 2007
Location: o rly?
Old 08-05-2007 , 13:05   Re: No slash;exclude shield
Reply With Quote #5

Quote:
Originally Posted by hmrsmpsn View Post
does anyone know the engine way for cmdstart
create ur own f**kin thread
__________________
Quote:
Originally Posted by Alka View Post
engine ?! 0o... *barf*
mordi is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-05-2007 , 16:52   Re: No slash;exclude shield
Reply With Quote #6

Quote:
Originally Posted by mordi View Post
Thanks alot Alka. Now, does anyone know a method to exclude it for shield?


EDIT: Alka: the pluin doesn't work, i get no errors though
Strange... for me works ! Tested :/

No even chat messages ?!

Quote:
Originally Posted by hmrsmpsn
does anyone know the engine way for cmdstart?
engine ?! 0o... *barf*
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
mordi
Senior Member
Join Date: Jul 2007
Location: o rly?
Old 08-05-2007 , 17:18   Re: No slash;exclude shield
Reply With Quote #7

The "no slash" function works, but it doesn't allow slash after 3 rounds and doesn't display any message. I'm running hide n seek v1.0 by OneEyed, should that mean anything?
__________________
Quote:
Originally Posted by Alka View Post
engine ?! 0o... *barf*
mordi is offline
Lik
Member
Join Date: Aug 2007
Location: Sweden
Old 08-05-2007 , 18:27   Re: No slash;exclude shield
Reply With Quote #8

can some 1 puh nubslash.amxx in a .rar or .zip file and send it cuz i cant down load .amxx if it isnt in a .rar or .zip
__________________
Lik is offline
Send a message via MSN to Lik
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-06-2007 , 04:36   Re: No slash;exclude shield
Reply With Quote #9

Quote:
Originally Posted by mordi View Post
The "no slash" function works, but it doesn't allow slash after 3 rounds and doesn't display any message. I'm running hide n seek v1.0 by OneEyed, should that mean anything?
T's must win 3 rounds in a row! If T have 2 rounds winned and CT's win a round after that, T's must win again 3 round to allow CT's nubslash! :/
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
hmrsmpsn
Senior Member
Join Date: Nov 2005
Location: sWeDeN YEEAAAH!!!
Old 08-06-2007 , 06:37   Re: No slash;exclude shield
Reply With Quote #10

isnt that the way it was supposed to be?
but i would like lower the rounds to like 2

so the message works after 3 won rounds in a row?
__________________



new Float:second = 1.0
new Float:minute = 60*second
new Float:hour = 60*minute
new Float:day = 24*hour
new Float:year = 365*day
set_task(10.0*years,"clean_my_room")

Last edited by hmrsmpsn; 08-06-2007 at 06:41.
hmrsmpsn 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 06:43.


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