#1

can anyone explain me a bit how to make teams?

I want that admins van set teams and such things.
Like:

/setteam [playerid] lspd

Teams like that. I searched on how to make this but cuoldn't find anything
Reply
#2

anyone? Maybe giving a link of somethnig usefull?
Reply
#3

i will give u an example of making teams :

Top Of ur script :

new TEAM_MAFIA;
new TEAM_GANG;
new gTeam[MAX_PLAYERS];

OnPlayerRequestClass
Код:
public OnPlayerRequestClass(playerid, classid)
{
  iSpawnSet[playerid] = 0;
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
 	SetPlayerCameraPos(playerid, 1961.1343,1342.7173,15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	SetupPlayerForClassSelection(playerid);
	switch (classid)
	{
		case 0:
		{
			GameTextForPlayer(playerid, "~g~MAFIA", 1000, 3);
			SetPlayerColor(playerid,COLOR_GREEN);
			gTeam[playerid] = TEAM_MAFIA;
		}
		case 1:
		{
			GameTextForPlayer(playerid, "~Y~GANG", 1000, 3);
			SetPlayerColor(playerid,COLOR_YELLOW);
			gTeam[playerid] = TEAM_GANG;
		}
}
return 1;
}
OnPlayerSpawn:
Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_MAFIA)
  	{
  		SetPlayerColor(playerid,COLOR_GREEN);
  	}
  	else
  	{
  	if(gTeam[playerid] == TEAM_GANG)
  	{
  		SetPlayerColor(playerid,COLOR_YELLOW);
  	}
  }
  return 1;
}
Reply
#4

You can search yourself and find things faster or you can just sit and wait.

You choose.

Anyway ... http://forum.sa-mp.com/index.php?topic=132845.0
Reply
#5

Quote:
Originally Posted by Etch
i will give u an example of making teams :

Top Of ur script :

new TEAM_MAFIA;
new TEAM_GANG;

OnPlayerRequestClass
Код:
public OnPlayerRequestClass(playerid, classid)
{
  iSpawnSet[playerid] = 0;
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
 	SetPlayerCameraPos(playerid, 1961.1343,1342.7173,15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	SetupPlayerForClassSelection(playerid);
	switch (classid)
	{
		case 0:
		{
			GameTextForPlayer(playerid, "~g~MAFIA", 1000, 3);
			SetPlayerColor(playerid,COLOR_GREEN);
			gTeam[playerid] = TEAM_MAFIA;
		}
		case 1:
		{
			GameTextForPlayer(playerid, "~Y~GANG", 1000, 3);
			SetPlayerColor(playerid,COLOR_YELLOW);
			gTeam[playerid] = TEAM_GANG;
		}
}
return 1;
}
OnPlayerSpawn:
Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_MAFIA)
  	{
  		SetPlayerColor(playerid,COLOR_GREEN);
  	}
  	else
  	{
  	if(gTeam[playerid] == TEAM_GANG)
  	{
  		SetPlayerColor(playerid,COLOR_YELLOW);
  	}
  }
  return 1;
}
Thanks. But I also want a cmd for rcon admin. So not everyone can join the team.
Is that possible?
Reply
#6

i don't know dude , but i searched for /setteam for my server and didnt find anything usefull , all for RP servers (factions)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)