Raised This Month: $ Target: $400
 0% 

[TF2] [REQ] Bumpercart "checking"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
protext
Senior Member
Join Date: Sep 2012
Old 02-23-2015 , 11:45   [TF2] [REQ] Bumpercart "checking"
Reply With Quote #1

Hi!

My friend and I are currently making a map where
players can go to a bumpercart racecourse.

The big problem is if players switch to the other team while
they are on the course, they don't have a bumpercart anymore
and can shoot others ect.

My question / request:
Is it possible to make a plugin that is checking
on team switch if the player is in a bumpercart.

And if he is --> Disallow team switch

Thanks in advance!
-------------------------
~ Protext
__________________
protext is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-23-2015 , 21:00   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #2

...why is your map not forcing them to respawn when they switch teams like the game normally does?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
protext
Senior Member
Join Date: Sep 2012
Old 02-24-2015 , 07:53   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
...why is your map not forcing them to respawn when they switch teams like the game normally does?
Because if the player has the addcond 82 (Bumpercar) then the game doesn't respawn the player.
And in the original doomsday map there is a hardcoded team switch block so that means Valve
didn't "fixed" that and only add a block too.
__________________

Last edited by protext; 02-24-2015 at 07:55. Reason: gramma
protext is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 02-24-2015 , 16:17   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #4

PHP Code:
#include <sourcemod>
#include <tf2>

public OnPluginStart(){
    
HookEvent("player_team"Evt_Team);
}

public 
Evt_Team(Handle:event, const String:name[], bool:dontB){
    new 
client GetClientOfUserId(GetEventInt(event"userid")), team GetEventInt(event"team");
    if(
team == || team == 3){
        
TF2_AddCondition(client82);
    }

Attached Files
File Type: sp Get Plugin or Get Source (BumperCheck.sp - 224 views - 340 Bytes)
thecount is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-25-2015 , 02:15   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #5

you should just removecondition on player_spawn and use the trigger to add it
actually if you use -1 on the trigger, it removes the karts if they leave it afaik
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
protext
Senior Member
Join Date: Sep 2012
Old 02-28-2015 , 15:51   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #6

Quote:
Originally Posted by thecount View Post
PHP Code:
#include <sourcemod>
#include <tf2>

public OnPluginStart(){
    
HookEvent("player_team"Evt_Team);
}

public 
Evt_Team(Handle:event, const String:name[], bool:dontB){
    new 
client GetClientOfUserId(GetEventInt(event"userid")), team GetEventInt(event"team");
    if(
team == || team == 3){
        
TF2_AddCondition(client82);
    }

This plugin makes it possible to switch into the other team instantly if you are not in a bumper car...
__________________
protext is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 02-28-2015 , 16:21   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #7

Quote:
Originally Posted by protext View Post
This plugin makes it possible to switch into the other team instantly if you are not in a bumper car...
That's weird because all that it does is add a condition.
thecount is offline
protext
Senior Member
Join Date: Sep 2012
Old 02-28-2015 , 19:08   Re: [TF2] [REQ] Bumpercart "checking"
Reply With Quote #8

Quote:
Originally Posted by thecount View Post
That's weird because all that it does is add a condition.
Can you maybe fix this?
__________________
protext 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 17:46.


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