Add fake actor weapon
#8

PHP код:
//you need vx,vy,vz (weapon offset)
CreateActorWeapon(actorid,weaponid,Float:vx,Float:vy,Float:vz){
    new 
Float:x,Float:y,Float:z,
        
Float:tx,Float:ty,Float:tz
        Float
:rx,Float:rz,Float:angle;
    
GetActorPos(actorid,x,y,z);
    
GetActorFacingAngle(actorid,angle);
    
    
ShiftVectorToRotation(vx,vy,vz,rx,rz);
    
GetPointInFront3D(x,y,z,rx,CompRotationFloat(angle+rz),VectorSize(vx,vy,vz),tx,ty,tz);
    
CreateDynamicObject(GetGunObjectID(weaponid),tx,ty,tz,80.0,0.0,angle,-1);

3DTryg:
https://sampforum.blast.hk/showthread.php?tid=591010
Reply


Messages In This Thread
Add fake actor weapon - by luccagomes15 - 07.02.2017, 15:26
Re: Add fake actor weapon - by luccagomes15 - 08.02.2017, 21:30
Re: Add fake actor weapon - by Jaxson - 08.02.2017, 23:09
Re: Add fake actor weapon - by maikons - 08.02.2017, 23:52
Re: Add fake actor weapon - by Wolfe - 09.02.2017, 03:41
Re: Add fake actor weapon - by AndreiWow - 09.02.2017, 09:34
Re: Add fake actor weapon - by Jaxson - 09.02.2017, 14:07
Re: Add fake actor weapon - by AbyssMorgan - 09.02.2017, 14:31
Re: Add fake actor weapon - by maikons - 09.02.2017, 15:57
Re: Add fake actor weapon - by luccagomes15 - 10.02.2017, 20:51

Forum Jump:


Users browsing this thread: 1 Guest(s)