[Ajuda] Anti Drive-By - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Anti Drive-By (
/showthread.php?tid=438963)
Anti Drive-By -
.FuneraL. - 23.05.2013
Pessoal, estou com uma dъvida aqui, como fazer para remover o jogador de dentro do veнculo, quando ele atropelar outro jogador (Utilizando as Callbacks OnPlayerTakeDamage ou OnPlayerGiveDamage), se puderem ajudar, agradeзo desde jб
Re: Anti Drive-By -
Gii - 23.05.2013
Talvez de certo
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(IsPlayerInAnyVehicle(playerid))
RemovePlayerFromVehicle(playerid);
return true;
}
Re: Anti Drive-By -
.FuneraL. - 23.05.2013
Quote:
Originally Posted by iCasTiel
Talvez de certo
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) { if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid); return true; }
|
Aqui nгo ejetou cara =/
Re: Anti Drive-By -
Gii - 23.05.2013
Nгo tenho como fazer testes aqui, mas faзa um debug e veja se a callback й chamada em caso de atropelamento.
Teste com as duas.
Re: Anti Drive-By -
davi54723 - 23.05.2013
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_PASSENGER || playerState == PLAYER_STATE_DRIVER)
{
RemovePlayerFromVehicle(playerid);
}
return 1;
}