Objetos Rompibles - 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: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Objetos Rompibles (
/showthread.php?tid=474622)
Objetos Rompibles -
[CG]Milito - 09.11.2013
Buenas!
Hoy, como no tenia nada que hacer me puse a trabajar en el Ammunation y me preguntaba como hacer que al dispararle a ciertos objetos, estos se rompan. como en el GTA SA normal cuando estas practicando tiro.
Ya puse los objetos pero no se rompen por mas que les dispare.
Saludos
Respuesta: Objetos Rompibles -
deryan - 09.11.2013
Solo algunos objetos se revientan, hay unos especiales para el disparo, si encuentro la id te la paso
Respuesta: Objetos Rompibles -
OTACON - 09.11.2013
pawn Код:
#include a_samp// ============ [ Posiзгo do Objeto ] =========new Float:X_OBJETO
= 128.7418;
new Float:Y_OBJETO
= -85.9495;
#define TAMANHO_OBJETO 0.4// =========== [ Criar Objeto para teste ] ========main
(){ CreateObject
(2587,
128.7418,
-85.9495,
1.4297,
0.0,
0.0,
96.0);
return true;
}// =========== [ Dar Arma para Teste ] ========public OnPlayerSpawn
(playerid
){ GivePlayerWeapon
(playerid,
32,
400);
return true;
}// =========== [ Detectar Tiro ] ================public OnPlayerKeyStateChange
(playerid, newkeys, oldkeys
){ if((newkeys
& KEY_FIRE || oldkeys
& KEY_FIRE
) && IsPlayerInRangeOfPoint
(playerid,
200.0 , X_OBJETO , Y_OBJETO ,
0.0)) { static Float:xPos,
Float:yPos,
Float:zPos,
Float:distancia,
Float:aPos;
GetPlayerPos
(playerid, xPos, yPos, zPos
);
GetPlayerFacingAngle
(playerid, aPos
);
distancia
= floatsqroot(floatpower(floatabs(xPos
-X_OBJETO
),
2) + floatpower(floatabs(yPos
-Y_OBJETO
),
2));
if(distancia
< 100.0) { xPos
+= (distancia
* floatsin(-aPos, degrees
)),
yPos
+= (distancia
* floatcos(-aPos, degrees
));
distancia
= floatsqroot(floatpower(floatabs(xPos
-X_OBJETO
),
2) + floatpower(floatabs(yPos
-Y_OBJETO
),
2));
} if(TAMANHO_OBJETO
> distancia
) { printf("Jogador %d acertou em um objeto (Pontuaзгo: %f)", playerid, distancia
);
} } return true;
}// Criado por Bruno da Silva// http://www.ips-team.blogspot.com
Respuesta: Objetos Rompibles -
AlieN_ - 09.11.2013
objetos que tienen una funciуn especial, explosiуn, algunos otros objtetos tiene la misma funciуn despuйs de un cierto tiempo de que vuelvan a la normalidad... 8')
Respuesta: Objetos Rompibles -
DesingMyCry - 09.11.2013
Otacon, eso no sirve al 100 por 100. No importa a la posiciуn z que dispares, siempre le tomarб como que le diу al objeto.