Quote:
Originally Posted by RedJohn
pawn Код:
CMD:getteam(playerid, params[]) { new teamid; if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!"); if(sscanf(params,"d",teamid)) return SendClientMessage(playerid, 0xFF0000FF,"USAGE: /getteam [teamid]"); for(new i = 0; i < MAX_PLAYERS; i++) { if(gTeam[i] == teamid) { new player1, Float:X, Float:Y, Float:Z ; GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(i, X+3, Y, Z); } } new pname[24],dstring[124]; GetPlayerName(playerid,pname,sizeof(pname)); format(dstring, sizeof(dstring), "Administrator %s has teleported teamid %d ", pname, teamid); SendClientMessageToAll(blue, dstring); return 1; }
|
Thanks works now
another question now i have to do
/getteam [ID] can you also make it
/getteam iraq /getteam england instead of ids?
pawn Код:
#define TEAM_GERMANY 0
#define TEAM_IRAQ 1
#define TEAM_ENGLAND 2
#define TEAM_USA 3
#define TEAM_NETHERLANDS 4
#define TEAM_ADMINS 5