Attach rock in hands
#1

Hello all, how can i do this, to attach a stone on player hands, and then player can't do anything, like press C, ore fight, only walk like in video

https://*********/SSftwtanojM
Reply
#2

It's the carrying animation. Search for it in wiki.
You'll also need AttachObjectToPlayer.


You can use a filterscript to know where to place the stone and then get the coordinates (Don't know any good FS).

I don't know where the coordinates will output either to 100%.
But I've heard it's possible .
Reply
#3

Yeh, thats i don't know, what are the coord for the attach object, i don't know ..
Reply
#4

PHP код:
   if(!strcmp(cmdtext"/redcone"true)) 
    { 
        
SetPlayerAttachedObject(playerid312386); 
        
SendClientMessage(playeridCOLOR_GREEN"You are holding a Redcone"); 
        return 
1
     } 
Reply
#5

Not work, i don't want to use SetPlayerAttachedObject
Reply
#6

Create yourself a quick editor, like this.

pawn Код:
CMD:spawnobject(playerid,params[])
{
    new obj = SetPlayerAttachedObject(playerid,0,model,puthandbone);
    EditPlayerObject(playerid,obj);
}
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)
{
    if(response)
    {
        printf("%f,%f,%f,%f,%f,%f,%f,%f,%f",fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    }
    else
    {
        SendClientMessage(playerid,-1, "Attached object edition not saved.");
    }
    return 1;
}
Search the wiki for the bone ids and when you've done editing it click on that SAVE icon ingame you'll see the coordinates printed in your console, copy them and go to your SetPlayerAttachedObject, paste the coordinates there.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)