Spec - следить за игроком

Готовые команды

Moderator: SJplayer

Avatar
Topic author
Дим M
Администратор
Администратор
Posts: 1319
With us: 7 years 5 months

Spec - следить за игроком

Post #1by Дим » 6 May 2013, 18:50

Spec - следить за игроком

Данная команда позволит администраторам сервера следить за игроком.

Code: Select all

    if(strcmp(cmd"/spec"true) == 0)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 8)
        {
            if(
IsPlayerConnected(playerid))
            {
                
tmp strtok(cmdtext,idx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playerid,COLOR_GREY," /spec [id]");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                if(
GetPlayerState(giveplayerid) == 1)
                {
                    
SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
                    
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
                    
TogglePlayerSpectating(playerid1);
                    
PlayerSpectatePlayer(playeridgiveplayerid);
                    
PlayerSpectateID[playerid] = giveplayerid;
                    
PlayerSpec[giveplayerid] = playerid;
                }
                else if(
GetPlayerState(giveplayerid) == 2)
                {
                    
SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
                    
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
                    new 
idid GetPlayerVehicleID(giveplayerid);
                    
TogglePlayerSpectating(playerid1);
                    
PlayerSpectateVehicle(playerididid);
                    
PlayerSpectateID[playerid] = giveplayerid;
                    
PlayerSpec[giveplayerid] = playerid;
                }
                else if(
GetPlayerState(giveplayerid) == 3)
                {
                    
SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
                    
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
                    new 
idid GetPlayerVehicleID(giveplayerid);
                    
TogglePlayerSpectating(playerid1);
                    
PlayerSpectateVehicle(playerididid);
                    
PlayerSpectateID[playerid] = giveplayerid;
                    
PlayerSpec[giveplayerid] = playerid;
                }
                else
                {
                    
SendClientMessage(playerid,COLOR_YELLOW,"Ошибка");
                }
            }
        }
        return 
1;
    }   


А эта команда для того, чтобы остановить слежку:

Code: Select all

    if(strcmp(cmd"/specoff"true) == 0)
    {
        if(
PlayerInfo[playerid][pAdmin] >= 8)
        {
            
TogglePlayerSpectating(playerid0);
            
SetCameraBehindPlayer(playerid);
            
SendClientMessage(playerid,COLOR_YELLOW,"Слежка окончена.");
            
PlayerSpec[PlayerSpectateID[playerid]] = -1;
            
PlayerSpectateID[playerid] = -1;
        }
        return 
1;
    }   
i love you mxIni Mysql

! ! !


Return to “Команды”

Who is online

Users browsing this forum: 1 guest