Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the rules.
need script to enable button on team 2 only
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- The_JOKER
- Fighter
- Posts: 38
- Joined: Mon Jul 18, 2016 2:35 am
- Title: I'm Korean JOKER :)
- SFD Account: JOKER_Korea
- SFD Alias: JOKER
- Started SFD: April 2016
- Location: South Korea
- Gender:
- Age: 23
- Contact:
need script to enable button on team 2 only
I need a script to make the button only visible on team 2
not for team 1...
I was wondering is it possible with script?
not for team 1...
I was wondering is it possible with script?
Last edited by The_JOKER on Tue Sep 13, 2016 1:36 pm, edited 1 time in total.
0 x
-
- Superfighter
- Posts: 119
- Joined: Sun Mar 20, 2016 9:50 am
- Started SFD: 1.2.1
- Gender:
- Age: 25
IPlayer ply = (IPlayer)args.Sender;
if(ply.GetTeam == PlayerTeam.Team2){
These Are Enough to Make Sure Only Team2 Can Use The Button , But What do You Want The Button to do ?
if(ply.GetTeam == PlayerTeam.Team2){
These Are Enough to Make Sure Only Team2 Can Use The Button , But What do You Want The Button to do ?
1 x
Never Surrender !
Always Fight For Your Rights , and Don't Let Your Friends Down .
Always Fight For Your Rights , and Don't Let Your Friends Down .
- The_JOKER
- Fighter
- Posts: 38
- Joined: Mon Jul 18, 2016 2:35 am
- Title: I'm Korean JOKER :)
- SFD Account: JOKER_Korea
- SFD Alias: JOKER
- Started SFD: April 2016
- Location: South Korea
- Gender:
- Age: 23
- Contact:
I JUST MADE CS:GO MAP, And button for PLANTING BOMB XDArmadyl5 wrote:IPlayer ply = (IPlayer)args.Sender;
if(ply.GetTeam == PlayerTeam.Team2){
These Are Enough to Make Sure Only Team2 Can Use The Button , But What do You Want The Button to do ?
but i dont know everything about script, pls give full script of it (if button's script method is 'Button2')
don't forget there must be button for team1 too (for defusing bomb)
2 x
-
- Superfighter
- Posts: 119
- Joined: Sun Mar 20, 2016 9:50 am
- Started SFD: 1.2.1
- Gender:
- Age: 25
You Didn't Answer My Question , What Does The Team 2 Button Do ??? I Can't Give You a Full Script if You Didn't Tell me What Does it Do ...
0 x
Never Surrender !
Always Fight For Your Rights , and Don't Let Your Friends Down .
Always Fight For Your Rights , and Don't Let Your Friends Down .
- The_JOKER
- Fighter
- Posts: 38
- Joined: Mon Jul 18, 2016 2:35 am
- Title: I'm Korean JOKER :)
- SFD Account: JOKER_Korea
- SFD Alias: JOKER
- Started SFD: April 2016
- Location: South Korea
- Gender:
- Age: 23
- Contact:
Team 2 button does planting bomb (like counter strike) i will upload map hereArmadyl5 wrote:You Didn't Answer My Question , What Does The Team 2 Button Do ??? I Can't Give You a Full Script if You Didn't Tell me What Does it Do ...
if its not set as only for team2, team1 plants, and defuse to win...
this is the map that needs script. 'counter terrorists'
https://i.gyazo.com/71f9b7a97ed418382f7 ... 51ead3.png
https://i.gyazo.com/3ed3496a51c7afa29fe ... 3b16c6.png
1 x
- gwendalaze
- Superfighter
- Posts: 84
- Joined: Sat Mar 19, 2016 12:55 pm
- Title: Jarate Yellow Belt
- Started SFD: PreAlpha 1.1.4
- Location: France
Try this, contains a template of a system to plant and defuse bombs
1 x
- Gwendalaze, failing at being fun, just like this signature
- The_JOKER
- Fighter
- Posts: 38
- Joined: Mon Jul 18, 2016 2:35 am
- Title: I'm Korean JOKER :)
- SFD Account: JOKER_Korea
- SFD Alias: JOKER
- Started SFD: April 2016
- Location: South Korea
- Gender:
- Age: 23
- Contact:
thanks, but i only need button script. i already made the others. and also, bomb script you gave didn't work...
0 x
- gwendalaze
- Superfighter
- Posts: 84
- Joined: Sat Mar 19, 2016 12:55 pm
- Title: Jarate Yellow Belt
- Started SFD: PreAlpha 1.1.4
- Location: France
public void button2(TriggerArgs args){
IPlayer ply = (IPlayer)args.Sender;
if (ply.GetTeam() == PlayerTeam.Team2)
((IObjectTrigger)Game.GetSingleObjectByCustomId(“bomb“)).Trigger();
}
Create a script trigger named “bomb“ and put the script method of your button to “button2“. Now link as many trigger as you want to your script trigger
IPlayer ply = (IPlayer)args.Sender;
if (ply.GetTeam() == PlayerTeam.Team2)
((IObjectTrigger)Game.GetSingleObjectByCustomId(“bomb“)).Trigger();
}
Create a script trigger named “bomb“ and put the script method of your button to “button2“. Now link as many trigger as you want to your script trigger
2 x
- Gwendalaze, failing at being fun, just like this signature
- Gurt
- Lead Programmer
- Posts: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
No it's not possible. But see the previously answers for how to only let the button work for team 2 and not team 1.The_JOKER wrote:I need a script to make the button only visible on team 2
not for team 1...
I was wondering is it possible with script?
0 x
Gurt