05.11.2015, 15:11
So , when a player died he spec others till map dont finish
but when they die they see other player's afk , any help ?
all i can give u is the stock
but when they die they see other player's afk , any help ?
all i can give u is the stock
pawn Код:
stock StartSpectate(playerid, specplayerid)
{
if(playerid == specplayerid) return StartSpectate(playerid, GetRandomPlayer(playerid));
for(new x=0; x<MAX_PLAYERS; x++) {
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerData[x][SpecID] == playerid) {
AdvanceSpectate(x);
}
}
SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(specplayerid));
TogglePlayerSpectating(playerid, 1);
Spectekiler[playerid] = 1;
if(IsPlayerInAnyVehicle(specplayerid)) {
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specplayerid));
PlayerData[playerid][SpecID] = specplayerid;
PlayerData[playerid][SpecType] = ADMIN_SPEC_TYPE_VEHICLE;
}
else {
PlayerSpectatePlayer(playerid, specplayerid);
PlayerData[playerid][SpecID] = specplayerid;
PlayerData[playerid][SpecType] = ADMIN_SPEC_TYPE_PLAYER;
}
return 1;
}