SA-MP Forums Archive
Drift Axis Lock Camera Help - 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)
+--- Thread: Drift Axis Lock Camera Help (/showthread.php?tid=292529)



Drift Axis Lock Camera Help - Jesus_wow - 24.10.2011

Hello, I am new at scripting and forums. I created a script, who makes when player type "/driftaxis" to lock the camera behind him , like TogglePlayerControllable, but with control . The problem is i want to make the script with timer, i mean when player type "/driftaxis 5" to make the camera behind him/car for 5 minutes and when he type "/driftaxisoff" to stop the locked camera behind him, not to stop it via getting of the car and go in again... . The other problem is when i move over the mouse the camera moves, i mean didnt lock, but when a stop moving the mouse , the camera go backs in behind the player. I maked 2 codes :
http://pastebin.com/0My9hZ3s
http://pastebin.com/kLdPRjHS
Tnx anyway.


Re: Drift Axis Lock Camera Help - Backwardsman97 - 24.10.2011

You mean you want to put the camera in a different spot behind the player's vehicle while he's driving?


Re: Drift Axis Lock Camera Help - Jesus_wow - 24.10.2011

Not exactly. I mean i want to put camera right behind the player's vehicle and when he steering left, the camera dont move, just move with the angle on the angle of the player ( SetCameraBehindPlayer(playerid) like that, but i want to lock it, not when i move the mouse and the camera looks around, and when i stop move the mouse, the camera goes back to behind player's car...
P.S: Like that:

Not like that:



Re: Drift Axis Lock Camera Help - Jesus_wow - 24.10.2011

Sorry of the 2nd post but i worked on the script and i maked, when player write /driftaxisoff to stop the "locked camera" with KillTimer but i have 2 same errors on different lines . Here is the compiled errors:
Код:
D:\server\filterscripts\driftaxis2.pwn(43) : error 017: undefined symbol "daxis1"
D:\server\filterscripts\driftaxis2.pwn(54) : error 017: undefined symbol "daxis1"
D:\server\filterscripts\driftaxis2.pwn(65) : warning 235: public function lacks forward declaration (symbol "camera")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

2 Errors.
And here is the filterscript code:
http://pastebin.com/kuvV2r8U
If you can Help


Re: Drift Axis Lock Camera Help - DRIFT_HUNTER - 24.10.2011

1.Your code will work only for ID 0
2.It will lag your server
3.It will lag for player to (i think)

On topic: Set second timer to kill first one (you will also need another poblic)


Re: Drift Axis Lock Camera Help - Jesus_wow - 24.10.2011

There is no other way to do it?
P.S : I mean there is no other way to script withouth timers, and dont lag other people with chance to be more simple or ?


Re: Drift Axis Lock Camera Help - Backwardsman97 - 24.10.2011

I still don't quite understand the goal here.


Re: Drift Axis Lock Camera Help - Jesus_wow - 25.10.2011

Quote:
Originally Posted by Backwardsman97
Посмотреть сообщение
I still don't quite understand the goal here.
Now if you dont understand i will kill myself
[ame]http://www.youtube.com/watch?v=ZcdhzxWxgyQ[/ame]