SA-MP Forums Archive
Shoot and move object about. - 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: Shoot and move object about. (/showthread.php?tid=609450)



Shoot and move object about. - Ult1mate - 12.06.2016

Hi.
for example, with a weapon shoot and door object will move(ing).
How can i do ? Waiting for your ideas
Sorry, my English is bad. : /


Re: Shoot and move object about. - Matz - 12.06.2016

I think it must be like this:

Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(weaponid == 24 && hittype == BULLET_HIT_TYPE_OBJECT)
    {
        if(hitid == TheDoorObject)
        {
        	MoveObject(hitid, x,y,z,speed,rx,ry,rz);
        }
    }
    return 1;
}



Re: Shoot and move object about. - Ult1mate - 12.06.2016

Quote:
Originally Posted by Matz
Посмотреть сообщение
I think it must be like this:

Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(weaponid == 24 && hittype == BULLET_HIT_TYPE_OBJECT)
    {
        if(hitid == TheDoorObject)
        {
        	MoveObject(hitid, x,y,z,speed,rx,ry,rz);
        }
    }
    return 1;
}
thanks for your answer sir !