CMD:gunholdster(playerid,params[])
{
..........
}
if(tickcount() - armedbody_pTick[playerid] > 113)
{
new
weaponid[13],weaponammo[13],pArmedWeapon;
pArmedWeapon = GetPlayerWeapon(playerid);
GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
#if ARMEDBODY_USE_HEAVY_WEAPON
GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
#endif
if(weaponid[1] && weaponammo[1] > 0){
if(pArmedWeapon != weaponid[1]){
if(!IsPlayerAttachedObjectSlotUsed(playerid,5)){
//SetPlayerAttachedObject(playerid,5,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
SetPlayerAttachedObject( playerid, 5, GetWeaponModel(weaponid[1]), 16, -0.195032, 0.120565, -0.052446, 0.000000, 20.250000, 0.000000, 0.968602, 0.904952, 1.110462 );
}
}
else {
if(IsPlayerAttachedObjectSlotUsed(playerid,5)){
RemovePlayerAttachedObject(playerid,5);
}
}
}
else if(IsPlayerAttachedObjectSlotUsed(playerid,5)){
RemovePlayerAttachedObject(playerid,5);
}
if(weaponid[2] && weaponammo[2] > 0){
if(pArmedWeapon != weaponid[2]){
if(!IsPlayerAttachedObjectSlotUsed(playerid,6)){
//SetPlayerAttachedObject(playerid,6,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
SetPlayerAttachedObject(playerid, 6, GetWeaponModel(weaponid[2]), 12, -0.050205, -0.069741, -0.080912, 20.179998, 17.460956, 354.668945, 1.150907, 1.061156, 0.884258 );
}
}
else {
if(IsPlayerAttachedObjectSlotUsed(playerid,6)){
RemovePlayerAttachedObject(playerid,6);
}
}
}
else if(IsPlayerAttachedObjectSlotUsed(playerid,6)){
RemovePlayerAttachedObject(playerid,6);
}
if(weaponid[4] && weaponammo[4] > 0){
if(pArmedWeapon != weaponid[4]){
if(!IsPlayerAttachedObjectSlotUsed(playerid,7)){
SetPlayerAttachedObject(playerid,7,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
}
}
else {
if(IsPlayerAttachedObjectSlotUsed(playerid,7)){
RemovePlayerAttachedObject(playerid,7);
}
}
}
else if(IsPlayerAttachedObjectSlotUsed(playerid,7)){
RemovePlayerAttachedObject(playerid,7);
}
if(weaponid[5] && weaponammo[5] > 0){
if(pArmedWeapon != weaponid[5]){
if(!IsPlayerAttachedObjectSlotUsed(playerid,8)){
SetPlayerAttachedObject(playerid,8,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
}
}
else {
if(IsPlayerAttachedObjectSlotUsed(playerid,8)){
RemovePlayerAttachedObject(playerid,8);
}
}
}
else if(IsPlayerAttachedObjectSlotUsed(playerid,8)){
RemovePlayerAttachedObject(playerid,8);
}
#if ARMEDBODY_USE_HEAVY_WEAPON
if(weaponid[7] && weaponammo[7] > 0){
if(pArmedWeapon != weaponid[7]){
if(!IsPlayerAttachedObjectSlotUsed(playerid,9)){
SetPlayerAttachedObject(playerid,9,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
}
}
else {
if(IsPlayerAttachedObjectSlotUsed(playerid,9)){
RemovePlayerAttachedObject(playerid,9);
}
}
}
else if(IsPlayerAttachedObjectSlotUsed(playerid,9)){
RemovePlayerAttachedObject(playerid,9);
}
#endif
armedbody_pTick[playerid] = tickcount();
}
}
return 1;
}
look for SetPlayerAttachedObject on ur script it might be on onplayerupdate or a 1second timer
|
I use this filterscript I've attached, I tried to find original post but I couldn't.
Credits are his, I only edit objects ids for my needings. |
Yes it has all bones, you all need to be sure the object id is in the code and you can edit it.
When saving the object the filterscript will print the function to add in your code, to copy it check server log. |
Header size: 19288 bytes
Code size: 1102096 bytes
Data size: 100890032 bytes
Stack/heap size: 18000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:102029416 bytes
No keep it as filterscript, if you need to attach object later ask here, we can help.
|