Help with this command.
#1

Hi, i need help on this because i dont know how to do it. I need you guys to help me to make this command to spectate the player with the frozen camera ( you can't move the camera ) and in "first person" that's possible? thanks i leave the code here if someone wants to help.

pawn Код:
CMD:specfp(playerid, params[])
{
    new id;
    if(sscanf(params,"u", id))return SendClientMessage(playerid, Grey, "Usage: /spec [id]");
    if(id == playerid)return SendClientMessage(playerid,Grey,"You cannot spec yourself.");
    if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, Grey, "Player not found!");
    if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Grey,"You are already specing someone.");
    GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
    Inter[playerid] = GetPlayerInterior(playerid);
    vWorld[playerid] = GetPlayerVirtualWorld(playerid);
    TogglePlayerSpectating(playerid, true);
    if(IsPlayerInAnyVehicle(id))
    {
        if(GetPlayerInterior(id) > 0)
        {
            SetPlayerInterior(playerid,GetPlayerInterior(id));
        }
        if(GetPlayerVirtualWorld(id) > 0)
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
        }
        PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
    }
    else
    {
        if(GetPlayerInterior(id) > 0)
        {
            SetPlayerInterior(playerid,GetPlayerInterior(id));
        }
        if(GetPlayerVirtualWorld(id) > 0)
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
        }
        PlayerSpectatePlayer(playerid,id);
    }
    GetPlayerName(id, Name, sizeof(Name));
    format(String, sizeof(String),"You have started to spectate %s.",Name);
    SendClientMessage(playerid,0x0080C0FF,String);
    IsSpecing[playerid] = 1;
    IsBeingSpeced[id] = 1;
    spectatorid[playerid] = id;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)