SA-MP Forums Archive
I need help im having a really hard time with it - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need help im having a really hard time with it (/showthread.php?tid=174813)



I need help im having a really hard time with it - gupey1984 - 07.09.2010

I need help. Im really having hard time. Anyone knows how do moving camera like looking at the bank and then it gets closer slowly?


Re: I need help im having a really hard time with it - PinkFloydLover - 07.09.2010

I geuss you would have to create a timer of like quarter of a second, and change the camera to the next location which would be about 1 centimeter infront of the last camera position and do that every time the timer repeats


Re: I need help im having a really hard time with it - gupey1984 - 07.09.2010

I still dont get it. how I do that a timer I tryed but it keeps missing up.


Re: I need help im having a really hard time with it - PinkFloydLover - 07.09.2010

I don't even know if it would work just try forward CamTimer(playerid); new Cam = -1; at the top of your script, then create:
pawn Код:
public CamTimer(playerid)
{
Cam ++;
if(Cam == 0)
{
    SetPlayerCameraPos(playerid,x,y,z);
    return 1;
}
if(cam == 1)
{
    SetPlayerCameraPos(playerid,x,y,z);
    return 1;
}
if(cam == 2)
{
    SetPlayerCameraPos(playerid,x,y,z);
    return 1;
}
etc just like that change each position about 1 inch ahead of each one, so go into samp and type /save then walk about 1 inch infront of that spot and type /save again and keep on doing that
for every position you save, you need to add those positions into the SetPlayerCameraPos

You also need to start the time, maybe on a command so here:

pawn Код:
if(strcmp(cmdtext,"/camera",false) == true)
{
    SetTimer("CamTimer",250,true);
    return 1;
}
This should work

EDIT: im going to create a tutorial on how to make a moving camera


Re: I need help im having a really hard time with it - gupey1984 - 07.09.2010

Thanks Ill try this in the morring