[REQ]SetTeam / team system.. please how to make like this - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [REQ]SetTeam / team system.. please how to make like this (
/showthread.php?tid=258830)
[REQ]SetTeam / team system.. please how to make like this -
leingod - 01.06.2011
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
Re: [REQ]SetTeam / team system.. please how to make like this -
xalith - 01.06.2011
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
Re: [REQ]SetTeam / team system.. please how to make like this -
leingod - 01.06.2011
i know that, buy.. how i can change da team in game
with /setteam
Re: [REQ]SetTeam / team system.. please how to make like this -
xalith - 01.06.2011
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.