27.03.2011, 18:31
I have this code, I want that when I press the arrow keys then move the camera.
pawn Код:
if (strcmp(cmdtext, "/MBcam", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerCameraPos(playerid, 2848.91, 1692.19, 16.35);
SetPlayerCameraLookAt(playerid, 2860.95, 1730.52, 10.88);
new Float:pos[4];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
SetPVarFloat(playerid, "PosX", pos[0]);
SetPVarFloat(playerid, "PosY", pos[1]);
SetPVarFloat(playerid, "PosZ", pos[2]);
SetPVarFloat(playerid, "PosA", pos[3]);
SetPlayerPos(playerid,2848.91, 1692.19, 16.35);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid,0xff0000ff, "----------------------------------");
SendClientMessage (playerid, COLOR_YELLOW, "You are camming Miliary Base.");
SetPVarInt(playerid, "seccam", 1);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You are not Member");
return 1;
}
}