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(playerid, 4,-2000, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1); 
And i want to set it

if he has M4 in hand, SetPlayerAttachedObject

else

remove it.


PHP Code:
stock GetPlayerWeapon(playerid)
{
        case 
0: wepname = "Fists";
        case 
25: wepname = "Shotgun";
        case 
30: wepname = "AK-47";
        case 
31: wepname = "M4";
        {
        
SetPlayerAttachedObject(playerid, 4,-2000, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
        }
        case 
34: wepname = "Sniper Rifle";
        case 
33: wepname = "Country Rifle";
        case 
22: wepname = "Pistol";
        case 
27: wepname = "SPAZ-12 Shotgun";
        case 
29: wepname = "MP5";
        case 
8: wepname = "Katana";
        case 
5: wepname = "Baseball Bat";
        case 
23: wepname = "Silenced Pistol";
        case 
45: wepname = "Thermal Vision Goggles";
        case 
44: wepname = "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)