Attach Object to Player help [REP]
#1

How to add object AttachObjectToPlayer(StartsLights, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);

Like in this pic:
Reply
#2

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/attach", true, 7) == 0)
    {
      SetPlayerAttachedObject( playerid, 0, 19270 , 5, 0.118957, 0.048861, -0.017178, 67.190078, 288.352386, 0.000000, 0.000000, 0.000000, 1.000000 ); 
	SetPlayerAttachedObject( playerid, 1, 19270, 6, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); 
        SetPlayerAttachedObject( playerid, 2, 19270, 9, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); 
        SetPlayerAttachedObject( playerid, 3, 19270, 10, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); 
        return 1;
    }

    if(strcmp(cmdtext, "/remove", true, 7) == 0)
    {
        RemovePlayerAttachedObject(playerid, 0); 
        RemovePlayerAttachedObject(playerid, 1); 
        RemovePlayerAttachedObject(playerid, 2); 
        RemovePlayerAttachedObject(playerid, 3); 
        return 1;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by BlackBomb
Посмотреть сообщение
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/attach", true, 7) == 0)
    {
        SetPlayerAttachedObject(playerid, 0, 19270, 5);
        return 1;
    }

    if(strcmp(cmdtext, "/remove", true, 7) == 0)
    {
        RemovePlayerAttachedObject(playerid, 0); 
        return 1;
    }
    return 1;
}
Thank you! but this is one hand object :S
Reply
#4

I updated my post see it and tell me if that works or not
Reply
#5

Quote:
Originally Posted by BlackBomb
Посмотреть сообщение
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/attach", true, 7) == 0)
    {
      SetPlayerAttachedObject( playerid, 0, 19270 , 5, 0.118957, 0.048861, -0.017178, 67.190078, 288.352386, 0.000000, 0.000000, 0.000000, 1.000000 ); 
	SetPlayerAttachedObject( playerid, 1, 19270, 6, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); 
        SetPlayerAttachedObject( playerid, 2, 19270, 9, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); 
        SetPlayerAttachedObject( playerid, 3, 19270, 10, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); 
        return 1;
    }

    if(strcmp(cmdtext, "/remove", true, 7) == 0)
    {
        RemovePlayerAttachedObject(playerid, 0); 
        RemovePlayerAttachedObject(playerid, 1); 
        RemovePlayerAttachedObject(playerid, 2); 
        RemovePlayerAttachedObject(playerid, 3); 
        return 1;
    }
    return 1;
}
You r the best +rep !!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)