14.03.2014, 12:20
Okay so i want to make switching cameras like it shows one place then cuts to another.
Here is the basic script.
Top of the script
Part of OnPlayerKeyStateChange. This is where the timer is activated.
And finally the timer.
Now it seems everything is working, it compiles completely fine. But it teleports the wrong player on the timer. I want it to set the camera to the location 2 seconds after the player presses Y.
Can anybody tell me where i am going wrong? +rep
Here is the basic script.
Top of the script
Код:
forward cam1(playerid);
Код:
if( ( newkeys & KEY_YES ) && !( oldkeys & KEY_YES ) ) { SetTimer("cam1", 2000, false); TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 5201, 0,0,0); return 1; }
Код:
public cam1(playerid) { SetPlayerPos(playerid, 5542.68701, 792.31042, 10.47427); SetPlayerCameraLookAt(playerid, 5545.2988,793.5884,9.8471); SetPlayerCameraPos(playerid, 5565.4932,793.5170,8.4675); TogglePlayerControllable(playerid, 0); return 1; }
Can anybody tell me where i am going wrong? +rep