teleport command
#6

Try
PHP код:
CMD:tget(playeridparams[])
{
    new 
adminname[MAX_PLAYER_NAME], TeamFloat:xFloat:yFloat:z;
    if(
PlayerInfo[playerid][pAdmin] >=|| IsPlayerAdmin(playerid))
    {
        if(
sscanf(params"i"Team)) return SendClientMessage(playeridCOLOR_RED"USAGE: /tget [Team id]");
        if(
Team || Team 1) return SendClientMessage(playeridCOLOR_RED,"[ERROR]: Valid team id: 1-2!");
        
GetPlayerName(playeridadminnamesizeof(adminname));
        
GetPlayerPos(playeridxyz);
        for(new 
i=0i<MAX_PLAYERSi++)
        if(
IsPlayerConnected(i))
        {
            if(
Team == 1)
            {
                if(
GetPlayerTeam(i) == 1)
                {
                    new 
str[128];
                    
format(str,128,"%s [ID %d] has teleported team internationalforces!",adminnameplayerid);
                    
SendClientMessageToAll(COLOR_BLUE,str);
                    
ResetPlayerWeapons(i);
                    
SetPlayerPos(ix+0.303y+1.7418z);
                    
TogglePlayerControllable(playerid0);
                }
            }
            if(
Team == 2)
            {
                if(
GetPlayerTeam(i) == 2)
                {
                    new 
str[128];
                    
format(str,128,"%s [ID %d] has teleported team Daesh!",adminnameplayerid);
                    
SendClientMessageToAll(COLOR_BLUE,str);
                    
ResetPlayerWeapons(i);
                    
SetPlayerPos(ix+0.303y+1.7418z);
                    
TogglePlayerControllable(playerid0);
                }
            }
        }
        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: 1 Guest(s)