[Ajuda] Ban de ip apуs morre 2x [PCC_Trucking]
#8

Quote:
Originally Posted by TenhoUmaDuvida
Посмотреть сообщение
Tente assim:
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
// 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(playeridAPlayerData[playerid][MissionText]);
// Stop any job that may have started
switch (APlayerData[playerid][PlayerClass])
{
case 
ClassTruckDriverTrucker_EndJob(playerid);
case 
ClassBusDriverBusDriver_EndJob(playerid);
case 
ClassPilotPilot_EndJob(playerid);
case 
ClassPolicePolice_EndJob(playerid);
case 
ClassMafiaMafia_EndJob(playerid);
case 
ClassCourierCourier_EndJob(playerid);
case 
ClassAssistanceAssistance_EndJob(playerid);
case 
ClassRoadWorkerRoadworker_EndJob(playerid);
case 
ClassLixeiroLixeiro_EndJob(playerid);
case 
ClassPizzaPizza_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(killeridGetPlayerWantedLevel(killerid) + 1);
// Get the name of the killed player and the killer
GetPlayerName(playeridVictimNamesizeof(VictimName));
GetPlayerName(killeridKillerNamesizeof(KillerName));
// Let the killed know the police are informed about the kill
format(Msg128"{FF0000}Voce Matou {FFFFFF}%s{FF0000}, Agora a Policia esta a sua Procura"VictimName);
SendClientMessage(killerid0xFFFFFFFFMsg);
// Inform all police players about the kill
format(Msg128"{0000FF}O Jogador {FFFFFF}%s{0000FF} Matou {FFFFFF}%s{0000FF}, Procurar e Multar"KillerNameVictimName);
Police_SendMessage(Msg);
}
return 
1;

Qual nescessidade disso?
PHP код:
if( IsPlayerConnectedkillerid ) )
{
if( 
IsPlayerConnectedGetPVarIntplayerid"LastKilled" ) ) && GetPVarIntplayerid"LastKilled" ) == killerid )
{
if( ( 
GetPVarIntplayerid"LastKilledTickcount" ) - GetTickCount( ) ) < 50 )
{
SetPVarIntplayerid"LastKilledTick"GetPVarIntplayerid"LastKilledTick" ) + );
if( 
GetPVarIntplayerid"LastKilledTick" ) > Banplayerid );
}
SetPVarIntplayerid"LastKilledTickcount"GetTickCount( ) );
}
SetPVarIntplayerid"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
Reply


Messages In This Thread
Ban de ip apуs morre 2x [PCC_Trucking] - by Daark - 24.03.2015, 00:14
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by #Luca[S]. - 24.03.2015, 00:16
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by Daark - 24.03.2015, 00:21
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by #Luca[S]. - 24.03.2015, 00:24
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by Daark - 24.03.2015, 00:25
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by #Luca[S]. - 24.03.2015, 00:28
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by ipsLuan - 24.03.2015, 00:30
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by Luucass - 24.03.2015, 03:47
Re: Ban de ip apуs morre 2x [PCC_Trucking] - by matheusspohr - 24.03.2015, 10:16

Forum Jump:


Users browsing this thread: 2 Guest(s)