[REQ]SetTeam / team system.. please how to make like this
#1

hello guys...

how i can create this script ?
like

/setteam [100-999]

it would be make the same team can't be killed
like if i use /setteam 125
then my friend /setteam 125 too
he can't killed me.

but if he use /setteam 126
he can kill me

how i can do that? pls help
Reply
#2

im gonna post using zcmd.
use the SetPlayerTeam(playerid,teamid); that way the players in same team cant shoot each other.
im not sure if this helps but anyway
Reply
#3

i know that, buy.. how i can change da team in game

with /setteam
Reply
#4

pawn Код:
CMD:setteam(playerid,params[]) {

        new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
        if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setteam [playerid] [teamid]");
        new player1 = strval(tmp), teamid = strval(tmp2), string[128];
       
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
       
            format(string, sizeof(string), "You have set \"%s's\" team to '$%d", pName(player1), teamid); SendClientMessage(playerid,blue,string);
            if(player1 != playerid) { format(string,sizeof(string)," \"%s\" has set your team to '$%d'", pName(playerid), teamid); SendClientMessage(player1,blue,string); }
            SetPlayerTeam(playerid,teamid);
        } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
}
i copied this of a script and changed it to your needs, so you might get an error so work it out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)