17.04.2014, 10:14
I have Setteam Commands...I want if player 1 & player 2 in same Team player 1 cant kill player 2 , and player 2 cant kill player 1.
This's Setteam Commands :
*SorryForMyLittleEnglish
This's Setteam Commands :
Код:
CMD:setteam(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 7) { 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[256]; 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"); } else return SendClientMessage(playerid,-1,"You are not an Admin"); return 1; }