[Tutorial] How to make teams
#1

Introduction
Hello! I am stuun i am kinda new at samp forums i wanted to teach you how to make teams for newbies hope you enjoy it. It's simple if not explained tell me i will edit.

EDITED.

1.

First of all make sure you have teams under GameModeInit like that

PHP Code:
public OnGameModeInit()
{
  
SetGameModeText("Blank text");
  
AddPlayerClass(Here you put skin id ,Put here your coordinates,weapon 1,weapon_ammo,weapon 2,weapon_ammo,weapon 3,weapon_ammo);//That 
2.

Make how much teams you want but here ima make only 1. if you wanna make more do the same.

3.

Define your team at the top like that

PHP Code:
#define TEAM_TEST//You don't put test, Put your team name 
4.

Go in: public OnPlayerSpawn(playerid)

Put
PHP Code:
switch(GetPlayerTeam(playerid)){ 
5.

Now we will use cases this will be in OnPlayerSpawn

PHP Code:
case .. 5://1 .. 5 is the ids and ".." is the numbers inside it like 2,3,4 and under it add bracket "{" 
Like that:

PHP Code:
case: .. 5:
{
// That is a bracket. 
6.

Now we will use SetPlayerTeam.

PHP Code:
SetPlayerTeam(playeridTEAM_TEST);//SetPlayerTeam is sets the team so the friendly fire will be off. Then put the team name of course so the server will understand that they are team. 
Now close bracket like that "}"

FULL CODE:

PHP Code:
case .. 5:
{
  
SetPlayerTeam(playeridTEAM_TEST);

If you need to add color just put this under SetPlayerTeam

PHP Code:
SetPlayerColor(playeridCOLOR_YOURCOLOUR);//SetPlayerColor sets his color after that choose the color and make sure it's defined at the top 
Like that

PHP Code:
#define COLOR_YOURCOLOR 
FULL CODE
PHP Code:
case: .. 5:
{
  
SetPlayerTeam(playeridTEAM_TEST);
  
SetPlayerColor(playeridCOLOR_YOURCOLOUR);

Hope you enjoyed my simple tutorial it's for newbies that are new at scripting.

Didn't explain good? Tell me i will edit it.
Reply


Messages In This Thread
How to create teams [Showing how to add colors too] - by Glossy42O - 30.10.2014, 13:55
Re: How to make teams - by xMx4LiFe - 30.10.2014, 16:44
Re: How to make teams - by Glossy42O - 30.10.2014, 17:02
Re: How to make teams - by Glossy42O - 30.10.2014, 19:39
Re: How to make teams - by xMx4LiFe - 31.10.2014, 11:15
Re: How to make teams - by Glossy42O - 31.10.2014, 11:34
Re: How to make teams - by Glossy42O - 31.10.2014, 16:21
Re: How to make teams - by xMx4LiFe - 31.10.2014, 16:39
Re: How to make teams - by Glossy42O - 31.10.2014, 17:58
Re: How to make teams - by xMx4LiFe - 01.11.2014, 10:16
Re: How to make teams - by Glossy42O - 01.11.2014, 12:12
Re: How to make teams - by Epic_Mickey - 01.11.2014, 13:22
Re: How to create teams [Showing how to add colors too] - by Kwarde - 14.11.2014, 14:58
Re: How to make teams - by Arastair - 14.11.2014, 15:26
Re: How to make teams - by Glossy42O - 14.11.2014, 15:41
Re: How to make teams - by Arastair - 14.11.2014, 15:46
Re: How to make teams - by sammp - 14.11.2014, 15:50
Re: How to make teams - by Glossy42O - 14.11.2014, 15:55
Re: How to make teams - by Kwarde - 14.11.2014, 17:00
Re: How to make teams - by sammp - 14.11.2014, 18:40
Re: How to make teams - by Glossy42O - 14.11.2014, 18:54
Re: How to make teams - by Kwarde - 14.11.2014, 19:05
Re: How to make teams - by Glossy42O - 15.11.2014, 03:45
Re: How to make teams - by Quickie - 15.11.2014, 04:51
Re: How to make teams - by Kwarde - 15.11.2014, 10:01

Forum Jump:


Users browsing this thread: 1 Guest(s)