i made this command help.
#4

pawn Код:
new bool:cameraman[MAX_PLAYERS],
        FPS2[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
    if(cameraman[playerid] == true)
        return SendClientMessage(playerid, -1, "You can't use chat while using /cameraman");

    return 0;
}

CMD:camaraman(playerid, params[])
{
    new userID;
    if(sscanf(params, "u", userID)) return SendClientMessage(playerid, -1, "/spec [playerid]");
    if(!IsPlayerConnected(userID)) return SendClientMessage(playerid, -1, "* No conectado.");

    cameraman[playerid] = true;

    SetPlayerInterior(playerid, GetPlayerInterior(userID));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(userID));
    AttachObjectToPlayer(FPS2[userID], playerid, 0.0, 0.15, 0.65, 0.0, 0.0, 0.0);
    AttachCameraToObject(playerid, FPS2[userID]);

    return 1;
}
You'll need to make a command to set the cameraman variable back to false so the player can talk again
Reply


Messages In This Thread
i made this command help. - by gamersx - 14.02.2017, 17:26
Re: i made this command help. - by Jelly23 - 14.02.2017, 17:46
Re: i made this command help. - by gamersx - 14.02.2017, 18:44
Re: i made this command help. - by Wolfe - 14.02.2017, 18:58
Re: i made this command help. - by gamersx - 14.02.2017, 22:12
Re: i made this command help. - by MiiSha - 14.02.2017, 22:32
Re: i made this command help. - by gamersx - 14.02.2017, 22:43
Re: i made this command help. - by MiiSha - 14.02.2017, 22:50
Re: i made this command help. - by gamersx - 14.02.2017, 22:56
Re: i made this command help. - by MiiSha - 14.02.2017, 23:29

Forum Jump:


Users browsing this thread: 1 Guest(s)