[HELP]SetPlayerCameraPos not work
#1

I Have a menu....

On Top
pawn Код:
new Menu:tsm1bmas;
OnGameModeInit()
pawn Код:
tsm1bmasa = CreateMenu("Alien Bodykit Parts", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(tsm1bmasa, 0, "Front Bumper");
AddMenuItem(tsm1bmasa, 0, "Rear Bumper");
AddMenuItem(tsm1bmasa, 0, "Spoiler");
AddMenuItem(tsm1bmasa, 0, "Sideskirt");
AddMenuItem(tsm1bmasa, 0, "Roof");
AddMenuItem(tsm1bmasa, 0, "Exhaust");

All thing work exept SetPlayerCameraPos

OnPlayerSelectedMenuRow(playerid, row)
pawn Код:
if(current == tsm1bmasa)
{
switch(row)
{
case 0:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasafb, playerid);
AddVehicleComponent(vehicleid, 1171);
SetPlayerCameraPos(playerid, 1601.0812, -1885.2516, 942.1389);
}
case 1:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasarb, playerid);
AddVehicleComponent(vehicleid, 1149);
SetPlayerCameraPos(playerid, 1609.1083, -1882.4520, 942.1389);
}
case 2:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasasp, playerid);
AddVehicleComponent(vehicleid, 1147);
SetPlayerCameraPos(playerid, 1608.3770, -1886.4465, 943.7663);
}
case 3:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasass, playerid);
AddVehicleComponent(vehicleid, 1040);
AddVehicleComponent(vehicleid, 1036);
SetPlayerCameraPos(playerid, 1603.0118, -1887.3169, 942.5385);
}
case 4:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasarf, playerid);
AddVehicleComponent(vehicleid, 1038);
SetPlayerCameraPos(playerid, 1602.8588, -1884.0482, 943.3430);
}
case 5:
{
HideMenuForPlayer(tsm1bmasa, playerid);
ShowMenuForPlayer(tsm1bmasaex, playerid);
AddVehicleComponent(vehicleid, 1034);
SetPlayerCameraPos(playerid, 1609.3939, -1883.8730, 941.2430);
}
}
}

OnPlayerExitedMenu(playerid)
pawn Код:
if(current == tsm1bmasa)
{
ShowMenuForPlayer(tsm1bmas, playerid);
}
Reply
#2

I think you must do TogglePlayerSpectating first. Try that, I'm sure it works.
Reply
#3

SetPlayerCameraPos(playerid, 1608.3770, -1886.4465, 943.7663);

and where is Look at, if you stay on road, how you know where to look ?
Reply
#4

Quote:
Originally Posted by ikey07
Посмотреть сообщение
SetPlayerCameraPos(playerid, 1608.3770, -1886.4465, 943.7663);

and where is Look at, if you stay on road, how you know where to look ?
i have setplayercameralookat on in other code.....
Reply
#5

Setplayercamerapos probably doesn't work because youre in a menu.
first hide the old menu, then set the camera, and then show the new menu
Reply
#6

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
I think you must do TogglePlayerSpectating first. Try that, I'm sure it works.
this is how i enter in first menu + TogglePlayerSpectating but now the camera is in back o the car and the code still not work.....

pawn Код:
if(dialogid == 0)
{
if(response == 1)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid, vehicleid);
TogglePlayerControllable(playerid, 0);
SetVehicleZAngle(vehicleid, 90.0);
SetVehiclePos(vehicleid, 1605.1127, -1884.1449, 942.0190);
LinkVehicleToInterior(vehicleid, 42);
SetPlayerPos(playerid, 1606.1832, -1892.1638, 945.1024);
PutPlayerInVehicle(playerid, vehicleid, 0);
SetPlayerInterior(playerid, 42);
SetPlayerCameraPos(playerid, 1605.2750, -1891.6453, 941.2430);
SetPlayerCameraLookAt(playerid, 1605.1127, -1884.1449, 942.0190);
ShowMenuForPlayer(tsm1, playerid);
}
}
Reply
#7

Quote:
Originally Posted by ғαιιοцт
Посмотреть сообщение
Setplayercamerapos probably doesn't work because youre in a menu.
first hide the old menu, then set the camera, and then show the new menu
i will try now
Reply
#8

Quote:
Originally Posted by ғαιιοцт
Посмотреть сообщение
Setplayercamerapos probably doesn't work because youre in a menu.
first hide the old menu, then set the camera, and then show the new menu
i do like this for all 6 selections
pawn Код:
HideMenuForPlayer(tsm1bmasa, playerid);
SetPlayerCameraPos(playerid, 1609.1083, -1882.4520, 942.1389);
ShowMenuForPlayer(tsm1bmasarb, playerid);
AddVehicleComponent(vehicleid, 1149);
Not Working....
Reply
#9

hmm..
and you are sure the menus appear?
Reply
#10

Quote:
Originally Posted by ғαιιοцт
Посмотреть сообщение
hmm..
and you are sure the menus appear?
yes all work fine exept camera
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)