17.01.2014, 16:17
pawn Код:
//I created 2 objects with different rotations.
CreateObject(6959, 17.18580, -58.10570, 2.61260, 0.00000, 90.00000, 0.00000); //hitid 1
CreateObject(6959, 17.18580, -18.14240, 2.61260, 180.00000, 90.00000, 0.00000); //hitid 2
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new Float:X, Float:Y, Float:Z;
switch(hittype)
{
case BULLET_HIT_TYPE_OBJECT: GetObjectPos( hitid, X, Y, Z );
}
CreateObject(1946, X - fZ, Y - fY, Z + fX, 0, 0, 0, 100); //You may noticed I put fZ in X, and fX in Z in CreateObject. And On X and Y I used minus, on Z, I used plus symbol.
//I don't know why, but it works perfect on hitid 1, but it doesn't work properly on hitid 2. Watch the video below;
return 1;
}