22.09.2015, 11:23
(
Последний раз редактировалось Gammix; 23.09.2015 в 05:28.
)
Fly Camera
This is an edited version of Kalcor's flymode filterscript. Those who don't know the general idea, this include let you toggle flying camera (a spectating screen which can be controlled with mouse and key combinations).
What's new?
- Bug free code, the filterscript had one which you experince while no key conditions'
- Custom camrea speed per player
- Two types of fly camreas:
Код:1 - Camera which can be moved with movement keys and rotated with mouse 2 - Camera only rotated with mouse (immovable - like CCTVs) 0 - Get player back from spectating state (NOTE: the player will be spawned where the last camera position was)
- Easy to toggle using SetPlayerCamrea
pawn Код:
SetPlayerCamera(playerid, type = 1);
pawn Код:
SetPlayerCameraSpeed(playerid, Float:speed);
(General speed = 50.0)
pawn Код:
Float: GetPlayerCameraSpeed(playerid);
And there is this callback which will be called everytime when the player moves his/her camera (not doesn't support rotation detection)
pawn Код:
public OnPlayerCameraUpdate(playerid, Float:oldx, Float:oldy, Float:oldz, olddir, Float:newx, Float:newy, Float:newz, newdir)
The github repo:
https://github.com/Gammix/Fly-Camera
Where to use?
Here are few ideas that can be generated by this:
- A CCTV system for game shops
- Using it with PlayerSpectatePlayer (a spectate system like that of Counter strike)
- Use type 2 when player dies (to let the player rotate camera from ground)
- ...