30.01.2015, 02:34
Quote:
Create a box object using CreateObject(or preferably using a streamer plug-in).
Then to make them "carry" the object, you'd need to find offsets for the skins you're intending on carrying said box. Then attach the box object using AttachObjectToPlayer accordingly. Then, use SPECIAL_ACTION_CARRY to set them in the carrying animation. This might help you get started: pawn Код:
|
For someone who knows what they are doing
pawn Код:
SetPlayerCarry(playerid, bool:toggle)
{
if(!IsPlayerConnected(playerid)) return 0;
return SetPlayerSpecialAction(playerid, (toggle == true) ? SPECIAL_ACTION_CARRY : SPECIAL_ACTION_NONE);
}
IsPlayerCarryingBox(playerid) return GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY;
pawn Код:
SetPlayerCarry(playerid, bool:toggle)
{
if(!IsPlayerConnected(playerid)) return 0;
if(toggle == true && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_CARRY)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
}
else
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
return 1;
}
IsPlayerCarryingBox(playerid)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
return 1;
return 0;
}