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

[L4D] Switch players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Horex
Member
Join Date: Sep 2009
Old 09-14-2009 , 19:30   [L4D] Switch players
Reply With Quote #1

Can someone write for me simple plugin?

Player types !swap in chat
select player from opposite team
another player have to agree on switch

Something like that, but for players http://forums.alliedmods.net/showthread.php?p=746082

Last edited by Horex; 09-15-2009 at 03:21.
Horex is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-15-2009 , 05:07   Re: [L4D] Switch players
Reply With Quote #2

It's a little more complicated than you think.

The command is sm_swapwith or !swapwith <playername>


Try it...



EDIT:
A bool mistake was in, i fixed it

EDIT2:
Now has been playtested, works
Attached Files
File Type: sp Get Plugin or Get Source (l4d_swapwithadversary.sp - 429 views - 3.5 KB)

Last edited by AtomicStryker; 09-15-2009 at 12:11.
AtomicStryker is offline
Zul Rivers
Member
Join Date: May 2008
Old 09-15-2009 , 10:07   Re: [L4D] Switch players
Reply With Quote #3

Thanks atomic
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.
Zul Rivers is offline
Zul Rivers
Member
Join Date: May 2008
Old 09-15-2009 , 10:13   Re: [L4D] Switch players
Reply With Quote #4

it kept saying Invalid target though..
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.
Zul Rivers is offline
Zul Rivers
Member
Join Date: May 2008
Old 09-15-2009 , 10:30   Re: [L4D] Switch players
Reply With Quote #5

] sm_swapwith <kilf>
L 09/15/2009 - 22:28:25: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 09/15/2009 - 22:28:25: [SM] Native "ReplyToCommand" reported: Language phrase "No matching client" not found
L 09/15/2009 - 22:28:25: [SM] Displaying call stack trace for plugin "l4d_swapwithadversary.smx":
L 09/15/2009 - 22:28:25: [SM] [0] Line 103, /groups/sourcemod/compiler-1.2/include/commandfilters.inc::ReplyToTargetError()
L 09/15/2009 - 22:28:25: [SM] [1] Line 199, /groups/sourcemod/compiler-1.2/include/helpers.inc::FindTarget()
L 09/15/2009 - 22:28:25: [SM] [2] Line 33, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49836.attach::SwapWish()
(Infected) TEST1 : ty
(Infected) : lolTEST1
] sm_swapwith kilf
L 09/15/2009 - 22:283: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 09/15/2009 - 22:283: [SM] Native "ReplyToCommand" reported: Language phrase "More than one client matched" not found
L 09/15/2009 - 22:283: [SM] Displaying call stack trace for plugin "l4d_swapwithadversary.smx":
L 09/15/2009 - 22:283: [SM] [0] Line 131, /groups/sourcemod/compiler-1.2/include/commandfilters.inc::ReplyToTargetError()
L 09/15/2009 - 22:283: [SM] [1] Line 199, /groups/sourcemod/compiler-1.2/include/helpers.inc::FindTarget()
L 09/15/2009 - 22:283: [SM] [2] Line 33, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49836.attach::SwapWish()
__________________
Projects:
Superhero: Hydrogen [Completed]
Superhero: Liberty Lad [Incomplete]


No Longer AMX Scripting, I Suck At It.
Zul Rivers is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-15-2009 , 11:44   Re: [L4D] Switch players
Reply With Quote #6

Did you even read that errorlog?

1. Your Sourcemod isnt properly installed, translation files are missing

2. When you chose "kilf" as target, it found more than one Players with "kilf" in their name
AtomicStryker is offline
Horex
Member
Join Date: Sep 2009
Old 09-15-2009 , 12:41   Re: [L4D] Switch players
Reply With Quote #7

Some players use really hard to write nick, its annoy smotimes

can you make this plugin to show menu with list of players?

Btw. you can add this to aproved plugins give credits to me for idea ;-)
Horex is offline
Horex
Member
Join Date: Sep 2009
Old 09-21-2009 , 11:06   Re: [L4D] Switch players
Reply With Quote #8

BUMP
Horex is offline
olj
Veteran Member
Join Date: Jun 2009
Old 09-21-2009 , 12:23   Re: [L4D] Switch players
Reply With Quote #9

Type "listplayers" in console then copy-paste name you want.
__________________
olj is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-21-2009 , 12:28   Re: [L4D] Switch players
Reply With Quote #10

You can also type status in console and use the #XX number infront of player names as target. As in "sm_swapwith #12"

A menu would be a little harder to code since common users dont have access to the default Sourcemod menus.


EDIT:

Also, you may not know it, but partial unique Strings are enough to 'find' a player. If someone called himself "%)(/(§$Slayer" you must only type sm_swapwith slay

Last edited by AtomicStryker; 09-21-2009 at 12:38.
AtomicStryker 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 04:58.


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