teleport command
#2

Код:
CMD:tget(playerid, params[])
{
	new adminname[MAX_PLAYER_NAME], Team, Float:x, Float:y, Float:z;
	if(PlayerInfo[playerid][pAdmin] >=4 || IsPlayerAdmin(playerid))
	{
		if(sscanf(params, "i", Team)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /tget [Team id]");
		if(Team == 2 || Team == 1) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: Valid team id: 1-2!");
		GetPlayerName(playerid, adminname, sizeof(adminname));
		GetPlayerPos(playerid, x, y, z);
		for(new i=0; i<MAX_PLAYERS; i++)
		if(IsPlayerConnected(i))
		{
			if(GetPlayerTeam(i) == Team)
			{
				if (aDuty[playerid] == 1) return 1;
				ResetPlayerWeapons(playerid);
				SetPlayerPos(playerid, x+0.303, y+1.7418, z);
				TogglePlayerControllable(playerid, 0);
				if(Team == 1)
				{
					new str[128];
					format(str,128,"%s [ID %d] has teleported team internationalforces!",adminname, playerid);
					SendClientMessageToAll(COLOR_BLUE,str);
				}
				if(Team == 2)
				{
					new str[128];
					format(str,128,"%s [ID %d] has teleported team Daesh!",adminname, playerid);
					SendClientMessageToAll(COLOR_BLUE,str);
				}
			}
		}
		return 1;
	}
	else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");
}
Reply


Messages In This Thread
teleport command - by GeneralAref - 17.12.2015, 09:43
Re: teleport command - by SupperRobin6394 - 17.12.2015, 10:10
Re: teleport command - by GeneralAref - 17.12.2015, 11:29
Re: teleport command - by Amunra - 17.12.2015, 12:28
Re: teleport command - by GeneralAref - 17.12.2015, 12:32
Re: teleport command - by xTURBOx - 17.12.2015, 15:03
Re: teleport command - by GeneralAref - 17.12.2015, 15:27
Re: teleport command - by AmirAmani - 17.12.2015, 17:30

Forum Jump:


Users browsing this thread: 3 Guest(s)