The object wont go off
#1

When i shoot with any weapon i want the object to go off but it dosen't it just explodes where ever i shoot with any weapon, thanks for your time!

pawn Код:
new
    gTutrleObject[ MAX_PLAYERS ];

CMD:gyn(playerid, params[])
{
    gTutrleObject[ playerid ] = SetPlayerAttachedObject(playerid, 4, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
    return true;
}

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ)
{
    MovePlayerObject(playerid, gTutrleObject[ playerid ], fX, fY, fZ, 10);
    CreateExplosion(fX, fY, fZ, 12, 10.0);
    gTutrleObject[ playerid ] = SetPlayerAttachedObject(playerid, 4, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
    return true;
}
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot

thanks
Reply
#3

the hell is that? that's a public function and it has nothing to do with what im trying to fix
Reply
#4

BUMP (48 Hours)
Reply
#5

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ)
{
    MovePlayerObject(playerid, gTutrleObject[ playerid ], fX, fY, fZ, 10);
    CreateExplosion(fX, fY, fZ, 12, 10.0);
    DestroyObject(gTutrleObject[playerid]);//added this
    gTutrleObject[ playerid ] = SetPlayerAttachedObject(playerid, 4, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
    return true;
}
Reply
#6

ffs the problem is that the object wont move when i shoot what the hell is so hard to understand i want the object to move out of my body and fly to where it is gonna hit and then explode but instead when i shoot with any gun it just explodes and no object comes out

EDIT: like this https://www.youtube.com/watch?v=Hg5k...layer_embedded
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)