0.3.DL Custom object help
#1

Hi. I want to put a custom skin to every weapon of my server
but i can't find the correct coordonates
can you help me ?

this is the coord

PHP Code:
        SetPlayerAttachedObject(playerid4,-200050.10.02, -0.05000111); 
And i want to set it

if he has M4 in hand, SetPlayerAttachedObject

else

remove it.


PHP Code:
stock GetPlayerWeapon(playerid)
{
        case 
0wepname "Fists";
        case 
25wepname "Shotgun";
        case 
30wepname "AK-47";
        case 
31wepname "M4";
        {
        
SetPlayerAttachedObject(playerid4,-200050.10.02, -0.05000111);
        }
        case 
34wepname "Sniper Rifle";
        case 
33wepname "Country Rifle";
        case 
22wepname "Pistol";
        case 
27wepname "SPAZ-12 Shotgun";
        case 
29wepname "MP5";
        case 
8wepname "Katana";
        case 
5wepname "Baseball Bat";
        case 
23wepname "Silenced Pistol";
        case 
45wepname "Thermal Vision Goggles";
        case 
44wepname "Night Vision Goggles";
    } 
Reply
#2

you must see this link to add specific coordinate by Bone Player : https://sampwiki.blast.hk/wiki/Bone_IDs

here from wiki :

playerid The ID of the player to attach the object to.
index The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions).
modelid The model to attach.
bone The bone to attach the object to.
fOffsetX (optional) X axis offset for the object position.
fOffsetY (optional) Y axis offset for the object position.
fOffsetZ (optional) Z axis offset for the object position.
fRotX (optional) X axis rotation of the object.
fRotY (optional) Y axis rotation of the object.
fRotZ (optional) Z axis rotation of the object.
fScaleX (optional) X axis scale of the object.
fScaleY (optional) Y axis scale of the object.
fScaleZ (optional) Z axis scale of the object.
materialcolor1 (optional) The first object color to set, as an integer or hex in ARGB color format.
materialcolor2 (optional) The second object color to set, as an integer or hex in ARGB color format


public OnPlayerSpawn(playerid){
SetPlayerAttachedObject(playerid, 3, 1609, 2); //Attach a turtle to the playerid's head, in slot 3

// example of using colors on an object being attached to the player:
SetPlayerAttachedObject(playerid, 3, 19487, 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1.0, 1.0, 1.0, 0xFF00FF00);
// Attach a white hat to the head of the player and paint it green
return 1;
}
Reply
#3

There are many attachment filterscripts, use them to adjust your weapon covers and it'd drop the right coords in your scriptfiles.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)