14.02.2017, 17:26
Hello, i made this, i know its not the best but i want to do a "cameraman" function to spectate another player and see him in first person ( i want to do a "news" in my rp server ).
So i made this:
The problem its, i tested with a friend, and sometimes the /spec doesn't work, i mean , sometimes when you write /spec (id of your friend) most of time you see yourself in first person.
And when its working, sometimes its buggy and you can move the camera like if you were your friend ( i want that you can't move the camera, if the player that you're spectating moves, the camera moves).
If someone can help me , i would be grateful. Thanks.
So i made this:
pawn Код:
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.");
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;
}
And when its working, sometimes its buggy and you can move the camera like if you were your friend ( i want that you can't move the camera, if the player that you're spectating moves, the camera moves).
If someone can help me , i would be grateful. Thanks.