07.02.2014, 14:30
Simple solution:
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
new
bool:gAlreadyHandled[MAX_PLAYERS];
// Use this if you don't load the FS when you start your server.
public OnFilterScriptInit()
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
if (IsPlayerConnected(i)) OnPlayerConnect(i);
}
}
public OnGameModeInit()
{
for (new i = 0; i != MAX_PLAYERS; ++i)
{
if (IsPlayerConnected(i)) gAlreadyHandled[i] = true;
}
}
public OnPlayerConnect(playerid)
{
if (gAlreadyHandled[playerid]) return 1;
gAlreadyHandled[playerid] = true;
// ================================
// Do your building removal here.
// ================================
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
gAlreadyHandled[playerid] = false;
return 1;
}