TogglePlayerSpectating
#1

Hello , I want when "TogglePlayerSpectating(playerid, 1)" the player will have a spec view on the Hospital, I tried this
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerPos(playerid, 1173.1825, -1323.4525, 15.3953); //focus on this (those are the hospital coords
    TogglePlayerSpectating(playerid, 1); //focus on this
    SetTimerEx("DeathSpecTimer", 7000, 0, "i", playerid);
    PlayerData[playerid][pDeaths]++;
    PlayerData[killerid][pKills]++;
    PlayerData[playerid][pPosx]= 1173.1825;
    PlayerData[playerid][pPosy]= -1323.4525;
    PlayerData[playerid][pPosz]= 15.3953;
    return 1;
}
But it does not spectate the place I want,
PS: I don't want to spectate a player or a vehicle,
Reply
#2

SetPlayerCameraPos
SetPlayerCameraLookAt
Reply
#3

thanks
+rep as soon as I test it
----------
How do I prevent player from spawning,
After death, he should have a view on the hospital then 5 seconds later it should spawn, but while having the hospital view, he shouldn't be spawned
Reply
#4

Код:
SetTimerEx("Dummy", 5000, false, "i", playerid);
after your code for setting camera.

And somewhere in script
Код:
forward Dummy(playerid);
public Dummy(playerid)
{
	SetCameraBehindPlayer(playerid);
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)