AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D] Switch players (https://forums.alliedmods.net/showthread.php?t=103632)

Horex 09-14-2009 19:30

[L4D] Switch players
 
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

AtomicStryker 09-15-2009 05:07

Re: [L4D] Switch players
 
3 Attachment(s)
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

Zul Rivers 09-15-2009 10:07

Re: [L4D] Switch players
 
Thanks atomic

Zul Rivers 09-15-2009 10:13

Re: [L4D] Switch players
 
it kept saying Invalid target though..

Zul Rivers 09-15-2009 10:30

Re: [L4D] Switch players
 
] 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:28:33: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 09/15/2009 - 22:28:33: [SM] Native "ReplyToCommand" reported: Language phrase "More than one client matched" not found
L 09/15/2009 - 22:28:33: [SM] Displaying call stack trace for plugin "l4d_swapwithadversary.smx":
L 09/15/2009 - 22:28:33: [SM] [0] Line 131, /groups/sourcemod/compiler-1.2/include/commandfilters.inc::ReplyToTargetError()
L 09/15/2009 - 22:28:33: [SM] [1] Line 199, /groups/sourcemod/compiler-1.2/include/helpers.inc::FindTarget()
L 09/15/2009 - 22:28:33: [SM] [2] Line 33, /home/groups/alliedmodders/forums/files/5/2/2/3/3/49836.attach::SwapWish()

AtomicStryker 09-15-2009 11:44

Re: [L4D] Switch players
 
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

Horex 09-15-2009 12:41

Re: [L4D] Switch players
 
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 09-21-2009 11:06

Re: [L4D] Switch players
 
BUMP

olj 09-21-2009 12:23

Re: [L4D] Switch players
 
Type "listplayers" in console then copy-paste name you want.

AtomicStryker 09-21-2009 12:28

Re: [L4D] Switch players
 
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


All times are GMT -4. The time now is 06:54.

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