[Not Solved] Help, (Expert Scripters) (PRO)
#1

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;
        }
    }
Reply
#2

OnPlayerKeyStateChange ??
Reply
#3

I don't know, I just want that when I press the arrow keys then move the camera.
(Look to the right, left, up or down) position.
Reply
#4

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
I don't know, I just want that when I press the arrow keys then move the camera.
(Look to the right, left, up or down) position.
OnPlayerKeyStateChange and/or GetPlayerKeys(playerid, &keys, &updown, &leftright)
This will do what you want.
Reply
#5

Can you give me an example with my script?
Add what you say to it, its in the 1st post...
Reply
#6

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Can you give me an example with my script?
Add what you say to it, its in the 1st post...
So you want me to write it for you?

Код:
SetTimer("ChangeCamPos"...)

ChangeCameraPos(...)

     GetPlayerKeys(playerid , ...)
          if player is pressing up key
               move camera x+
          if player is pressing down key
               move camera x-
          if player is pressing right key
               move camera y+
          if player is pressing left key
               move camera y-
If you want fancy camera rotation and stuff, you better know some trig
Reply
#7

Download LuxAdmin System its have integrated moving camera (camhack)
Reply
#8

Dude, what I need is you to put my code and add this stuff, My skeelz are not that great like yours, please put my code and add your stuff to mines....





Everything will be appreciated, Alex.
Reply
#9

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Dude, what I need is you to put my code and add this stuff, My skeelz are not that great like yours, please put my code and add your stuff to mines....





Everything will be appreciated, Alex.
I appreciate your appreciation but I only accept the appreciation in the form of coinage, like paypal credits. When I feel that kind of appreciation, I can be much more specific.
Reply
#10

Just give me a little example here because I dont know how to make it, look, i take the idea from here:


https://sampforum.blast.hk/showthread.php?tid=68492
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)