[Ajuda] Como fazer pra pegar danos causados em veiculo - 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] Como fazer pra pegar danos causados em veiculo (
/showthread.php?tid=602256)
Como fazer pra pegar danos causados em veiculo -
luccagomes15 - 04.03.2016
Queria pegar danos causados num veiculo para evitar ataques entre pessoas do msm time
Tipo
Код:
if(motorista[carroantigido] й da ORG 1 && atirador й da org 1) {
fun_tapa(atirador);
}
Re: Como fazer pra pegar danos causados em veiculo -
Lуs - 04.03.2016
Seria algo mais ou menos assim:
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_VEHICLE) {
foreach(Player,i) {
if(IsPlayerInAnyVehicle(i)) {
if(GetPlayerVehicleID(i) == hitid) {
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
if(/*var org (i) == var org (playerid)*/) {
fun_tapa(playerid);
}
}
}
}
}
}
return 1;
}
Re: Como fazer pra pegar danos causados em veiculo -
Coringa_Vilao - 05.03.2016
https://sampforum.blast.hk/showthread.php?tid=488223
Re: Como fazer pra pegar danos causados em veiculo -
luccagomes15 - 06.03.2016
Quote:
Originally Posted by Lуs
Seria algo mais ou menos assim:
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_VEHICLE) {
foreach(Player,i) {
if(IsPlayerInAnyVehicle(i)) {
if(GetPlayerVehicleID(i) == hitid) {
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
if(/*var org (i) == var org (playerid)*/) {
fun_tapa(playerid);
}
}
}
}
}
}
return 1;
}
|
Era nessa callback msm, vlw +rep