SA-MP Forums Archive
Custom SetPlayerAttachedObject - 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: Custom SetPlayerAttachedObject (/showthread.php?tid=660164)



Custom SetPlayerAttachedObject - Zeus666 - 26.10.2018

Hi. How can I modify this
PHP код:
            if(weaponid[1] && weaponammo[1] > 0){
                if(
pArmedWeapon != weaponid[1]){
                    if(!
IsPlayerAttachedObjectSlotUsed(playerid,5)){
                        
SetPlayerAttachedObjectplayerid5GetWeaponModel(weaponid[1]), 16, -0.1950320.120565, -0.0524460.00000020.2500000.0000000.9686020.9049521.110462 );
                    }
                } 

PHP код:
                       SetPlayerAttachedObjectplayerid5GetWeaponModel(weaponid[1]), 16, -0.1950320.120565, -0.0524460.00000020.2500000.0000000.9686020.9049521.110462 ); 
instead of those coordinates, I want to appear the attach index selection, what means that player can attachobject where he wants

?

PHP код:
public OnPlayerEditAttachedObjectplayeridresponseindexmodelidboneid,
                                   
Float:fOffsetXFloat:fOffsetYFloat:fOffsetZ,
                                   
Float:fRotXFloat:fRotYFloat:fRotZ,
                                   
Float:fScaleXFloat:fScaleYFloat:fScaleZ )
{
    new 
debug_string[256+1];
    
format(debug_string,256,"SetPlayerAttachedObject(playerid,%d,%d,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f)",
           
index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    
SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
 
    return 
1;




Re: Custom SetPlayerAttachedObject - Zeus666 - 27.10.2018

Bump