26.10.2018, 12:45
Hi. How can I modify this
instead of those coordinates, I want to appear the attach index selection, what means that player can attachobject where he wants
?
PHP код:
if(weaponid[1] && weaponammo[1] > 0){
if(pArmedWeapon != weaponid[1]){
if(!IsPlayerAttachedObjectSlotUsed(playerid,5)){
SetPlayerAttachedObject( playerid, 5, GetWeaponModel(weaponid[1]), 16, -0.195032, 0.120565, -0.052446, 0.000000, 20.250000, 0.000000, 0.968602, 0.904952, 1.110462 );
}
}
PHP код:
SetPlayerAttachedObject( playerid, 5, GetWeaponModel(weaponid[1]), 16, -0.195032, 0.120565, -0.052446, 0.000000, 20.250000, 0.000000, 0.968602, 0.904952, 1.110462 );
?
PHP код:
public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
Float:fRotX, Float:fRotY, Float:fRotZ,
Float:fScaleX, Float:fScaleY, Float: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;
}