Okay, with ZCMD the '/getteam' command should be something like this:
pawn Код:
CMD:getteam(playerid, params[])
{
new string[110], idx, Float:X, Float:Y, Float:Z, teamtpd;
GetPlayerPos(playerid, X, Y, Z);
string = strtok(params, idx);
if(!strlen(string))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /getteam [TeamID]");
return 1;
}
for(new i; i < MAX_PLAYERS; i++)
{
if(Team[i] == string && teamtpd < 14) // 'Team[i]' should obviously be your team variable, but it should be playerid bound obviously.
{
switch(teamtpd)
{
case 0: SetPlayerPos(i, X+1, Y, Z);
case 1: SetPlayerPos(i, X+1, Y+1, Z);
case 2: SetPlayerPos(i, X, Y+1, Z);
case 3: SetPlayerPos(i, X+2, Y, Z);
case 4: SetPlayerPos(i, X+2, Y+2, Z);
case 5: SetPlayerPos(i, X, Y+2, Z);
case 6: SetPlayerPos(i, X+3, Y, Z);
case 7: SetPlayerPos(i, X+3, Y+3, Z);
case 8: SetPlayerPos(i, X, Y+3, Z);
case 9: SetPlayerPos(i, X+4, Y, Z);
case 10: SetPlayerPos(i, X+4, Y+4, Z);
case 11: SetPlayerPos(i, X, Y+4, Z);
case 12: SetPlayerPos(i, X+5, Y, Z);
case 13: SetPlayerPos(i, X+5, Y+5, Z);
case 14: SetPlayerPos(i, X, Y+5, Z);
}
teamtpd++;
}
}
return 1;
}
The command above will give you the ability to teleport 15 people out of one team to you. If you want to teleport more people/bigger teams you should add more 'case's and you should increase the teamtpd < XX then. If you will do that, and the teams get bigger then like 30 people, I would also take - numbers at the SetPlayerPos' so they spawn around you.
Here is the '/freezeteam' command:
pawn Код:
new TeamFrozen[MAX_TEAMS]; // You will have to define 'MAX_TEAMS' by yourself, depending on how much teams you have. You should do it like '#define MAX_TEAMS *number*' next to all of your other #defines.
CMD:freezeteam(playerid, params[])
{
new string[110], idx, string2[110], name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
string = strtok(params, idx);
if(!strlen(string))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /freezeteam [TeamID]");
return 1;
}
if(TeamFrozen[string] == 0)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(Team[i] == string) // 'Team[i]' should also here obviously be your team variable, but it should also here be playerid bound obviously.
{
GetPlayerName(i, name2, sizeof(name2));
CanPlayerMove(i, 0);
format(string2, sizeof(string2), "> %s has just frozen you.", name);
SendClientMessage(i, 0xFFFFFFFF, string2);
format(string2, sizeof(string2), "> You have just frozen %s.", name2);
SendClientMessage(playerid, 0xFFFFFFFF, string2);
}
}
}
else if(TeamFrozen[string] == 1)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(Team[i] == string) // 'Team[i]' should also here obviously be your team variable, but it should also here be playerid bound obviously.
{
GetPlayerName(i, name2, sizeof(name2));
CanPlayerMove(i, 1);
format(string2, sizeof(string2), "> %s has just unfrozen you.", name);
SendClientMessage(i, 0xFFFFFFFF, string2);
format(string2, sizeof(string2), "> You have just unfrozen %s.", name2);
SendClientMessage(playerid, 0xFFFFFFFF, string2);
}
}
}
return 1;
}
This should be something like it, if I have helped you please rep+ me

..
Best regards,
Jesse