Raised This Month: $32 Target: $400
 8% 

Traps!


Post New Thread Reply   
 
Thread Tools Display Modes
eightn
Junior Member
Join Date: Apr 2004
Location: Russia/Moscow
Old 06-17-2007 , 05:12   Re: Traps!
Reply With Quote #41

Other patches (thanx to wg again!).

//
// Fix: blind traps did't work
//
Code:
Index: amx_traps.sma
===================================================================
--- amx_traps.sma	(revision 1114)
+++ amx_traps.sma	(revision 1115)
@@ -125,7 +125,7 @@
 	register_event("StatusIcon", "Event_BuyZone", "be", "2=buyzone")
 	register_event("DeathMsg", "Event_Death", "a")
 	register_event("ResetHUD", "Event_Restart", "b")
-	register_event("ScreenFade", "Event_ScreenFade", "b")
+	//register_event("ScreenFade", "Event_ScreenFade", "b")
 
 	register_cvar("traps_bury", "1")
 	register_cvar("traps_slap", "1")
@@ -730,7 +730,9 @@
 
 			is_blind[id - 1] = true
 
-			BlindUser(id)
+			new pid[1]
+			pid[0] = id
+			set_task(1.0, "BlindTask", (TASK_BLIND + id), pid, 1, "b")
 		}
 
 		case T_DISARM:
@@ -801,6 +803,7 @@
 //
 // Blinds the user and initializes BlindTask to keep them blind
 //
+/*
 public BlindUser(id)
 {
 	message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)
@@ -816,17 +819,28 @@
 
 	return PLUGIN_CONTINUE
 }
+*/
 
 //
 // Blinds the user
 //
-public BlindTask(id)
+public BlindTask(pid[])
 {
-	if (is_blind[id - 1])
+	if (is_blind[pid[0] - 1])
 	{
-		message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)
+		message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, pid[0])
+		write_short(1<<12)
+		write_short(1<<8)
 		write_short(1<<0)
+		write_byte(0)
+		write_byte(0)
+		write_byte(0)
+		write_byte(255)
+		message_end()
+
+		message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, pid[0])
 		write_short(1<<0)
+		write_short(1<<0)
 		write_short(1<<2)
 		write_byte(0)
 		write_byte(0)
@@ -839,11 +853,13 @@
 //
 // This event is called on a ScreenFade
 //
+/*
 public Event_ScreenFade(id)
 {
 	set_task(0.6, "BlindTask", TASK_BLIND + id)
 	return PLUGIN_CONTINUE
 }
+*/
 
 //
 // Disarms the user

//
// fix: stay tasks after player disconnect
//
Code:
Index: amx_traps.sma
===================================================================
--- amx_traps.sma	(revision 1171)
+++ amx_traps.sma	(revision 1176)
@@ -189,8 +189,22 @@
 }
 
 public client_disconnect(id)
+{
 	ResetPlayerVariables(id)
 
+	// Remove tasks
+	if (task_exists(TASK_BLIND + id))
+		remove_task(TASK_BLIND + id)
+
+	if (task_exists((TASK_PLANT + id)))
+	{
+		remove_task((TASK_PLANT + id))
+		remove_task((TASK_MOVE + id))
+	}
+
+	return PLUGIN_CONTINUE
+}
+
 /*
 public ShowNotice(pArgs[])
 {
__________________
wbr, Evgeniy
eightn is offline
darkassassin
Junior Member
Join Date: Aug 2006
Old 06-27-2007 , 16:53   Re: Traps!
Reply With Quote #42

is there any way you could make it so you dont have to be in a buyzone to buy a trap?
darkassassin is offline
ThePrince
New Member
Join Date: May 2008
Old 05-17-2008 , 15:12   Re: Traps!
Reply With Quote #43

Im pretty new at this. Dont know what im doing wrong. But when i typ "/buytrap" nothing happends. Checked console and it says "Unknown command: amx_buytrap" ???

Heard something about "modules" but i dont know what that is...

Last edited by ThePrince; 05-17-2008 at 15:19.
ThePrince is offline
veryluckko
Junior Member
Join Date: Aug 2008
Old 08-06-2008 , 05:51   Re: Traps!
Reply With Quote #44

i want to see
veryluckko is offline
theic0n
Junior Member
Join Date: Jul 2008
Old 08-13-2008 , 16:28   Re: Traps!
Reply With Quote #45

Quote:
Originally Posted by ThePrince View Post
Im pretty new at this. Dont know what im doing wrong. But when i typ "/buytrap" nothing happends. Checked console and it says "Unknown command: amx_buytrap" ???

Heard something about "modules" but i dont know what that is...
did you try /traps?
theic0n is offline
xx_sirhc_xx
Member
Join Date: Jul 2005
Old 08-13-2008 , 21:25   Re: Traps!
Reply With Quote #46

This was actually updated. Check out the new thread at: http://forums.alliedmods.net/showthread.php?t=75516
xx_sirhc_xx is offline
xirica
New Member
Join Date: Aug 2008
Location: Azores/Portugal
Old 08-27-2008 , 08:19   Re: Traps!
Reply With Quote #47

Only admins are buying traps... why?
xirica is offline
sneazer
BANNED
Join Date: Feb 2010
Location: Sweden>Gothenburg>
Old 03-23-2010 , 14:51   Re: Traps!
Reply With Quote #48

This isn't working for me when i plant a trap nothing happens and when i walk on it nothing happens
sneazer is offline
VaLo1
Junior Member
Join Date: Jan 2011
Location: Kosovo
Old 03-12-2011 , 15:11   Re: Traps!
Reply With Quote #49

Good Job & Good Idea. I have to suggest to this plugin:
I think to add traps models. And don't be all same
VaLo1 is offline
Send a message via MSN to VaLo1 Send a message via Yahoo to VaLo1
Dnsss
Junior Member
Join Date: Nov 2011
Old 12-19-2011 , 03:20   Re: Traps!
Reply With Quote #50

how to use it this plugin??

Last edited by Dnsss; 12-19-2011 at 03:21.
Dnsss 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 18:43.


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