SA-MP Forums Archive
The object wont go off - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: The object wont go off (/showthread.php?tid=515257)



The object wont go off - ThaFuq?Santinosback! - 25.05.2014

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;
}



Re: The object wont go off - superrobot48 - 25.05.2014

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

thanks


Re: The object wont go off - ThaFuq?Santinosback! - 25.05.2014

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


Re: The object wont go off - ThaFuq?Santinosback! - 25.05.2014

BUMP (48 Hours)


Re: The object wont go off - BroZeus - 25.05.2014

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;
}



Re: The object wont go off - ThaFuq?Santinosback! - 25.05.2014

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