player spectate, pls i need help
#1

Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);

how to make player will spectate killerid about 5 seconds, after that player will respawn

pls help
Reply
#2

pawn Код:
forward respawnFromSpec(playerid);
public respawnFromSpec(playerid) {
    TogglePlayerSpectating(playerid, false);
    SpawnPlayer(playerid);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason) {
    TogglePlayerSpectating(playerid, true);
    PlayerSpectatePlayer(playerid, killerid);
    SetTimerEx("respawnFromSpec", 5000, false, "d", playerid);
    return 0;
}
This code should work, you might need to add your SetSpawnInfo code and whatnot though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)