you might use a simple /hold command, which is fun to experiment with. no doubt ^^
Код:
CMD:hold(playerid,params[]){
new TargetID,optional[64],Index,optional2[64],Bone,ObjectID,optional3[64],Float:OffsetX,Float:OffsetY,Float:OffsetZ,Float:RotX,Float:RotY,Float:RotZ,Float:ScaleX,Float:ScaleY,Float:ScaleZ;
if(sscanf(params,"uz",TargetID,optional))
{
SendClientMessage(playerid,MSGCMDS_COLOR, "Usage: \"/Hold <PlayerID/Name> [Index (0-4)] [<Bone (1-18)> <ObjectID>] [OffsetX,Y,Z] [RotX,Y,Z] [ScaleX,Y,Z]\"");
return 1;
}
if(TargetID!=INVALID_PLAYER_ID)
{
if(sscanf(optional,"dz",Index,optional2))
{
SendClientMessage(playerid,MSGSUCC_COLOR, "No Index > All Objects removed.");
RemovePlayerAttachedObject(TargetID,0);
RemovePlayerAttachedObject(TargetID,1);
RemovePlayerAttachedObject(TargetID,2);
RemovePlayerAttachedObject(TargetID,3);
RemovePlayerAttachedObject(TargetID,4);
return 1;
}
if(Index >-1 && Index<6)
{
if(sscanf(optional2,"ddz",Bone,ObjectID,optional3))
{
SendClientMessage(playerid,MSGSUCC_COLOR, "Index > Object removed.");
RemovePlayerAttachedObject(TargetID,Index);
return 1;
}
if(Bone >0 && Bone<19)
{
if(sscanf(optional3,"fffffffff",OffsetX,OffsetY,OffsetZ,RotX,RotY,RotZ,ScaleX,ScaleY,ScaleZ))
{
SendClientMessage(playerid,MSGDBUG_COLOR, "No Off,Rot,Sca");
ScaleX=1;
ScaleY=1;
ScaleZ=1;
}
SetPlayerAttachedObject(TargetID,Index,ObjectID,Bone,OffsetZ,OffsetY,OffsetX,RotZ,RotY,RotX,ScaleX,ScaleY,ScaleZ);
}
}
}
return 1;
}
using ZCMD & sscanf, take whatever you need. theres a lot to enhance i guess