17.11.2013, 20:43
Well now I tried to make object and attach it to player and attach camera to that object, but I can't make it so camera will look in front of player.. how can I make it?
Here is the code what I tried but Camera isn't looking in front of player :/
pawn Код:
if(strcmp(cmd, "/test", true) == 0)
{
new Float:x, Float:y, Float:z;
GetPlayerCameraPos(playerid, Float:x, Float:y, Float:z);
new playerobject = CreateObject(playerid, 19300, 0.130999, 0.063999, 0.139000, 0.000000, 0.000000, 0.000000);
AttachObjectToPlayer(playerobject,playerid,0.130999, 0.063999, 0.139000, 0.000000, 0.000000, 0.000000);
SetPlayerCameraLookAt(playerid,x,y,z+10);
TogglePlayerControllable(playerid,0);
AttachCameraToPlayerObject(playerid, playerobject);
return 1;
}