SA-MP Forums Archive
Replacing Pickup with Object [I'll REP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Replacing Pickup with Object [I'll REP] (/showthread.php?tid=367938)



Replacing Pickup with Object [I'll REP] - Jaber_Brown - 11.08.2012

i got this ,
pawn Code:
if(HouseInfo[idx][hSetted] == 1)
            {
                if(HouseInfo[idx][hOwned] == 0)
                {
                    format(PropertyString,sizeof(PropertyString),"\n ID: %d \nPrice: $%d \n Description: %s \n Level Required: %d",HouseInfo[idx][hWorld], HouseInfo[idx][hValue],HouseInfo[idx][hDiscription], HouseInfo[idx][hLevel]);
                    HouseLabel[idx] = Create3DTextLabel(PropertyString ,COLOR_WHITE,HouseInfo[idx][hEntrancex], HouseInfo[idx][hEntrancey], HouseInfo[idx][hEntrancez],25, 0, 1);
                    HousePickup[idx] = CreateDynamicPickup(1273, 1, HouseInfo[idx][hEntrancex], HouseInfo[idx][hEntrancey], HouseInfo[idx][hEntrancez]);
                }
                else
                {
                    format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n /rentroom",HouseInfo[idx][hMessage],HouseInfo[idx][hOwner],HouseInfo[idx][hWorld], HouseInfo[idx][hRent], HouseInfo[idx][hDiscription]);
                    HouseLabel[idx] = Create3DTextLabel(PropertyString ,COLOR_RED,HouseInfo[idx][hEntrancex], HouseInfo[idx][hEntrancey], HouseInfo[idx][hEntrancez],25, 0, 1);
                    HousePickup[idx] = CreateDynamicPickup(1272, 1, HouseInfo[idx][hEntrancex], HouseInfo[idx][hEntrancey], HouseInfo[idx][hEntrancez]);
                }
            }
    }
    return 1;
}
and i want to replace the Pickup with this object



ID of the object is 19471


Re: Replacing Pickup with Object [I'll REP] - Jaber_Brown - 11.08.2012

Anyone ?


Re: Replacing Pickup with Object [I'll REP] - Youarex - 11.08.2012

Do you want to replace pickup model, or place an object instead of pickup (https://sampwiki.blast.hk/wiki/CreateObject)?


Re: Replacing Pickup with Object [I'll REP] - phillip875 - 11.08.2012

pawn Code:
CreateDynamicObject(19471,HouseInfo[idx][hEntrancex], HouseInfo[idx][hEntrancey], HouseInfo[idx][hEntrancez],Float:rx,Float:ry,Float:rz,-1,-1,-1,200);
Replace Float:rx,Float:ry,Float:rz with your rotation co-ords (if any).

EDIT: If you have none - put them as 0.