Coordonates of hand?
#1

PHP код:
CMD:trolley(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,2.02831.6045,2442.6086,1786.4811))
    {
        
SendClientMessage(playerid, -1"{FFCC33} Type again /trolley to eliminate it.   ");
        
SetPlayerAttachedObject(playerid1134910.000000, -0.1000000.0000003.00000090.0000001.0000001.0000001.0000001.000000);
    }

current coordonates are player's back. How can I set to be at his hand?


ex: Minute 4:59
https://www.youtube.com/watch?v=ZRwO1DqFMgw
Reply
#2

change coordinates manually
or with this https://sampwiki.blast.hk/wiki/EditAttachedObject
Reply
#3

Quote:
Originally Posted by Mugala
Посмотреть сообщение
change coordinates manually
or with this https://sampwiki.blast.hk/wiki/EditAttachedObject
And how can I set player's hand like it's on video?
Reply
#4

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
And how can I set player's hand like it's on video?
Apply Animation
https://sampwiki.blast.hk/wiki/ApplyAnimation

maybe SPECIAL_ACTION_CARRY
Reply
#5

The problem is that when player is moving, the object is moving too.

How can I fix that?
Reply
#6

You have to attach it not to the hand, you have to attach it to the spine (index 1 at the 4th parameter(bone))
Oh, I'm sorry, you have been already did it, you have to try any attachment editor.
Reply
#7

Quote:
Originally Posted by Kraeror
Посмотреть сообщение
You have to attach it not to the hand, you have to attach it to the spine (index 1 at the 4th parameter(bone))
Oh, I'm sorry, you have been already did it, you have to try any attachment editor.
And what do I need to type for "Type /command again to disable the attached"

PHP код:
cmd:Command(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid,2.02831.6045,2442.6086,1786.4811))
    {
        
SendClientMessage(playerid, -1"{FFCC33} Use /command again to disable it.   ");
          
SetPlayerAttachedObject(playerid013491);
        
EditAttachedObject(playerid0);
    }
    if(
IsPlayerAttachedObjectSlotUsed(playerid0)
    {
    
RemovePlayerAttachedObject(playerid0);
     }
    

Good? I don't think so, because It simply removes the command, it's backward of it.
Reply
#8

Try this tho:
PHP код:
CMD:trolley(playerid

if(
IsPlayerInRangeOfPoint(playerid,2.02831.6045,2442.6086,1786.4811)) 

 if(!
IsPlayerAttachedObjectSlotUsed(playerid1)) //It checks if the object isn't (! symbol) attached to the player
 
{
       
SendClientMessage(playerid, -1"{FFCC33} Type again /trolley to eliminate it.   "); 
       
SetPlayerAttachedObject(playerid013491); 
       
EditAttachedObject(playerid0); 
 }
 else
 {
       
RemovePlayerAttachedObject(playerid1);//It removes the object
 
}
 }
 return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)