|
![]() |
|
Thread Tools | Display Modes |
![]() |
#1 |
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2013
Location: Semarang,Indonesia
Posts: 410
Reputation: 55
|
![]() ============================ INTRODUCTION ============================ Hello guys, im back with new tutorial. This tutorial explaining about how to getting started on TDM Scripting for you guys that have just getting started and want to make simple TDM. So why wasting time. lets start! REQUIRETMENTS 1.Pawno basic scripting knowledge 2.Brain Working 1.Setting Up Our team by class! Okay so the first step we are going on do here is setting up our team depends by classes. Take it, we had army class skin, so we want to set it as army team, etc. First, we are going to add our classes. We gotta put it on call back function OnGameModeInit pawn Code:
Here i had army class which spawned on Militarry ship on San Fierro: pawn Code:
And that another one is SWAT skin spawned on SFPD Office We have just added our classes!Now time to setting up the team! Before to setting up team, we are going to create a variable which stands for handle player team In the top of your script add this: pawn Code:
pawn Code:
And dont forget to define the team: pawn Code:
And now time to setting up your team. Add this: pawn Code:
Lil explanation: Generally, when we are connected there will be classes to shown. If we switch to first class, we setted the team to ARMY. While, if switch for next class /second class,we setted the team to COP And ofc, we dont want everyone kill each other. Therefore, we gotta set player color depends on their team. Add this: pawn Code:
Okay lil explanation: If player select Army skin on class selection, once they spawned, their color will be turned to Grey. Otherwise, if they selected SWAT skin on class selection, once they spawned, their color will be turned to blue. And, they will be given a M4 Per spawned.Of course you can change it as you want. Okay we have done here, and we setted UP OUR TEAM! ![]() Now, we want make simple anti teamkill! So, when they attacked their teammate, they will get warnings to not do teamkill. Add this: pawn Code:
issuerid is stands for attacker id, that just attacked someone. If he attacked teammate, he will get warning, by gametext. Okay we've done here. I hope this tutorial helped ![]() |
![]() |
![]() |
![]() |
#2 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2008
Posts: 1,114
Reputation: 46
|
![]()
Why use a variable for teams? You could just use natives: GetPlayerTeam / SetPlayerTeam
|
![]() |
![]() |
![]() |
#3 |
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2013
Location: Semarang,Indonesia
Posts: 410
Reputation: 55
|
![]() |
![]() |
![]() |
![]() |
#4 |
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2013
Location: Semarang,Indonesia
Posts: 410
Reputation: 55
|
![]()
No More comments?
![]() |
![]() |
![]() |
![]() |
#5 |
Guest
Posts: n/a
|
![]()
Nice tutorial
+REP |
![]() |
![]() |
#6 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Dec 2007
Location: Yes
Posts: 679
Reputation: 12
|
![]()
What dusk said,
SetPlayerTeam will automatically disable team killing, I would only use variables if I wanted friendly fire turned off. |
![]() |
![]() |
![]() |
#7 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2011
Location: Manchester, England, United Kingdom
Posts: 1,377
Reputation: 134
|
![]() pawn Code:
Is this the beeping noise or what noise is it? And the tutorial is ok. |
![]() |
![]() |
![]() |
#8 |
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2013
Location: Semarang,Indonesia
Posts: 410
Reputation: 55
|
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting a car for just one team not working. | Magic_Time | Scripting Help | 1 | 30/07/2013 11:24 PM |
Setting Default Team | anonymousx | Help Archive | 4 | 19/02/2011 04:02 AM |
Setting team | matdav | Help Archive | 2 | 06/07/2010 07:26 PM |
Setting player to team from skinid | Gould | Help Archive | 2 | 04/08/2009 02:58 PM |
setting score for team HELP PLEASE? | Drift_04 | Help Archive | 1 | 27/02/2009 07:29 AM |