Ban de ip apуs morre 2x [PCC_Trucking] -
Daark - 24.03.2015
Quando algum player morre mais de 2x ou 3x toma ban de ip '-'
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
#Luca[S]. - 24.03.2015
Existe algum AntiFakeKill no seu servidor? Pode ser ele que estб provocando isso.
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
Daark - 24.03.2015
Nгo tem FS nenhum.
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
#Luca[S]. - 24.03.2015
Se possнvel poste sua public da gm
OnPlayerDeath.
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
Daark - 24.03.2015
public OnPlayerDeath(playerid, killerid, reason)
{
// Setup local variables
new VictimName[24], KillerName[24], Msg[128];
// Clear the missiontext
TextDrawSetString(APlayerData[playerid][MissionText], " ");
// Hide the missiontext for this player (when the player is choosing a class, it's not required to show any mission-text)
TextDrawHideForPlayer(playerid, APlayerData[playerid][MissionText]);
// Stop any job that may have started
switch (APlayerData[playerid][PlayerClass])
{
case ClassTruckDriver: Trucker_EndJob(playerid);
case ClassBusDriver: BusDriver_EndJob(playerid);
case ClassPilot: Pilot_EndJob(playerid);
case ClassPolice: Police_EndJob(playerid);
case ClassMafia: Mafia_EndJob(playerid);
case ClassCourier: Courier_EndJob(playerid);
case ClassAssistance: Assistance_EndJob(playerid);
case ClassRoadWorker: Roadworker_EndJob(playerid);
case ClassLixeiro: Lixeiro_EndJob(playerid);
case ClassPizza: Pizza_EndJob(playerid);
}
// If the player is part of a convoy, kick him from it
Convoy_Leave(playerid);
// If another player kills you, he'll get an extra star of his wanted level
if (killerid != INVALID_PLAYER_ID)
{
// Increase the wanted level of the killer by one star
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
// Get the name of the killed player and the killer
GetPlayerName(playerid, VictimName, sizeof(VictimName));
GetPlayerName(killerid, KillerName, sizeof(KillerName));
// Let the killed know the police are informed about the kill
format(Msg, 128, "{FF0000}Voce Matou {FFFFFF}%s{FF0000}, Agora a Policia esta a sua Procura", VictimName);
SendClientMessage(killerid, 0xFFFFFFFF, Msg);
// Inform all police players about the kill
format(Msg, 128, "{0000FF}O Jogador {FFFFFF}%s{0000FF} Matou {FFFFFF}%s{0000FF}, Procurar e Multar", KillerName, VictimName);
Police_SendMessage(Msg);
}
if( IsPlayerConnected( killerid ) )
{
if( IsPlayerConnected( GetPVarInt( playerid, "LastKilled" ) ) && GetPVarInt( playerid, "LastKilled" ) == killerid )
{
if( ( GetPVarInt( playerid, "LastKilledTickcount" ) - GetTickCount( ) ) < 50 )
{
SetPVarInt( playerid, "LastKilledTick", GetPVarInt( playerid, "LastKilledTick" ) + 1 );
if( GetPVarInt( playerid, "LastKilledTick" ) > 1 ) Ban( playerid );
}
SetPVarInt( playerid, "LastKilledTickcount", GetTickCount( ) );
}
SetPVarInt( playerid, "LastKilled", killerid );
}
return 1;
}
// This callback gets called when the player is selecting a class (but hasn't clicked "Spawn" yet)
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
#Luca[S]. - 24.03.2015
Tente assim:
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
// Setup local variables
new VictimName[24], KillerName[24], Msg[128];
// Clear the missiontext
TextDrawSetString(APlayerData[playerid][MissionText], " ");
// Hide the missiontext for this player (when the player is choosing a class, it's not required to show any mission-text)
TextDrawHideForPlayer(playerid, APlayerData[playerid][MissionText]);
// Stop any job that may have started
switch (APlayerData[playerid][PlayerClass])
{
case ClassTruckDriver: Trucker_EndJob(playerid);
case ClassBusDriver: BusDriver_EndJob(playerid);
case ClassPilot: Pilot_EndJob(playerid);
case ClassPolice: Police_EndJob(playerid);
case ClassMafia: Mafia_EndJob(playerid);
case ClassCourier: Courier_EndJob(playerid);
case ClassAssistance: Assistance_EndJob(playerid);
case ClassRoadWorker: Roadworker_EndJob(playerid);
case ClassLixeiro: Lixeiro_EndJob(playerid);
case ClassPizza: Pizza_EndJob(playerid);
}
// If the player is part of a convoy, kick him from it
Convoy_Leave(playerid);
// If another player kills you, he'll get an extra star of his wanted level
if (killerid != INVALID_PLAYER_ID)
{
// Increase the wanted level of the killer by one star
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
// Get the name of the killed player and the killer
GetPlayerName(playerid, VictimName, sizeof(VictimName));
GetPlayerName(killerid, KillerName, sizeof(KillerName));
// Let the killed know the police are informed about the kill
format(Msg, 128, "{FF0000}Voce Matou {FFFFFF}%s{FF0000}, Agora a Policia esta a sua Procura", VictimName);
SendClientMessage(killerid, 0xFFFFFFFF, Msg);
// Inform all police players about the kill
format(Msg, 128, "{0000FF}O Jogador {FFFFFF}%s{0000FF} Matou {FFFFFF}%s{0000FF}, Procurar e Multar", KillerName, VictimName);
Police_SendMessage(Msg);
}
return 1;
}
Qual nescessidade disso?
PHP код:
if( IsPlayerConnected( killerid ) )
{
if( IsPlayerConnected( GetPVarInt( playerid, "LastKilled" ) ) && GetPVarInt( playerid, "LastKilled" ) == killerid )
{
if( ( GetPVarInt( playerid, "LastKilledTickcount" ) - GetTickCount( ) ) < 50 )
{
SetPVarInt( playerid, "LastKilledTick", GetPVarInt( playerid, "LastKilledTick" ) + 1 );
if( GetPVarInt( playerid, "LastKilledTick" ) > 1 ) Ban( playerid );
}
SetPVarInt( playerid, "LastKilledTickcount", GetTickCount( ) );
}
SetPVarInt( playerid, "LastKilled", killerid );
}
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
ipsLuan - 24.03.2015
Tenta retirar aquele Ban(playerid);
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
Luucass - 24.03.2015
Quote:
Originally Posted by TenhoUmaDuvida
Tente assim:
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
// Setup local variables
new VictimName[24], KillerName[24], Msg[128];
// Clear the missiontext
TextDrawSetString(APlayerData[playerid][MissionText], " ");
// Hide the missiontext for this player (when the player is choosing a class, it's not required to show any mission-text)
TextDrawHideForPlayer(playerid, APlayerData[playerid][MissionText]);
// Stop any job that may have started
switch (APlayerData[playerid][PlayerClass])
{
case ClassTruckDriver: Trucker_EndJob(playerid);
case ClassBusDriver: BusDriver_EndJob(playerid);
case ClassPilot: Pilot_EndJob(playerid);
case ClassPolice: Police_EndJob(playerid);
case ClassMafia: Mafia_EndJob(playerid);
case ClassCourier: Courier_EndJob(playerid);
case ClassAssistance: Assistance_EndJob(playerid);
case ClassRoadWorker: Roadworker_EndJob(playerid);
case ClassLixeiro: Lixeiro_EndJob(playerid);
case ClassPizza: Pizza_EndJob(playerid);
}
// If the player is part of a convoy, kick him from it
Convoy_Leave(playerid);
// If another player kills you, he'll get an extra star of his wanted level
if (killerid != INVALID_PLAYER_ID)
{
// Increase the wanted level of the killer by one star
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
// Get the name of the killed player and the killer
GetPlayerName(playerid, VictimName, sizeof(VictimName));
GetPlayerName(killerid, KillerName, sizeof(KillerName));
// Let the killed know the police are informed about the kill
format(Msg, 128, "{FF0000}Voce Matou {FFFFFF}%s{FF0000}, Agora a Policia esta a sua Procura", VictimName);
SendClientMessage(killerid, 0xFFFFFFFF, Msg);
// Inform all police players about the kill
format(Msg, 128, "{0000FF}O Jogador {FFFFFF}%s{0000FF} Matou {FFFFFF}%s{0000FF}, Procurar e Multar", KillerName, VictimName);
Police_SendMessage(Msg);
}
return 1;
}
Qual nescessidade disso?
PHP код:
if( IsPlayerConnected( killerid ) )
{
if( IsPlayerConnected( GetPVarInt( playerid, "LastKilled" ) ) && GetPVarInt( playerid, "LastKilled" ) == killerid )
{
if( ( GetPVarInt( playerid, "LastKilledTickcount" ) - GetTickCount( ) ) < 50 )
{
SetPVarInt( playerid, "LastKilledTick", GetPVarInt( playerid, "LastKilledTick" ) + 1 );
if( GetPVarInt( playerid, "LastKilledTick" ) > 1 ) Ban( playerid );
}
SetPVarInt( playerid, "LastKilledTickcount", GetTickCount( ) );
}
SetPVarInt( playerid, "LastKilled", killerid );
}
|
Isso й um antfakekill , em gm PPC_Trucking vc perde dinheiro ao matar, entao o pessoal faz de sacanagem...
@Topic
Isso resolverб seu problema
Na linha
pawn Код:
if( GetPVarInt( playerid, "LastKilledTick" ) > 1 ) Ban( playerid );
Mude "1" para "5"
Ficando assim
pawn Код:
if( GetPVarInt( playerid, "LastKilledTick" ) > 5 ) Ban( playerid );
Qualquer duvida estamos ai
Re: Ban de ip apуs morre 2x [PCC_Trucking] -
matheusspohr - 24.03.2015
Concordo plenamente em deixar o anti fake kill, mais da pra vc mudar de 1 para 3 e mudar para kick (playerid), pois um Ban serгo meio desnecessбrio.