#include <a_samp>
new deaths;
public OnGameModeInit()
{
// Don\'t use these lines if it\'s a filterscript
SetGameModeText(\"Blank Script\");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//csapat 1
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//csapat 2
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
deaths++;
if(deaths == GetPlayersOnServer())
{
for(new i; i < MAX_PLAYERS)
{
if(IsPlayerConnected(i)) SpawnPlayer(i);
else continue;
}
}
else
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
}
return 1;
}
//hív. fórumról szedett online playereket lekérő függvény:
stock GetPlayersOnServer()
{
new count;
for(new x=0; x< MAX_PLAYERS; x++) { //x = MAX_PLAYERS
if(IsPlayerConnected(x))) {
count++;
}
}
return count;
}