Jump to content

Objects samp


Ascla

Recommended Posts

Posted

Hey all,

I have a problem :P

I want to replace the id 18646 with a samp object.

I have the .dff of the samp object.

But is it possible and how ?

CreateObject(18646) didn't work :(

Posted

That's not possible as far as i know, all the "spots" are taken. You must free an id to place an object

and you can only do that by replacing the object that id represents.

Posted

These IDs might help:

Free IDs in standard unmodified GTA San Andreas (generated by Free ID list generator on unmodified GTA SA, made by fastman92.tk):

2-6, 8, 42, 65, 74, 86, 119, 149, 208, 265-273, 289, 329, 332, 340, 382-383, 398-399,

612-614, 662-663, 665-668, 699, 793-799, 907-909, 965, 999, 1194-1206, 1326, 1573, 1699, 2883-2884, 3136-3166, 3176-3177, 3179-3186, 3188-3192,

3194-3213, 3215-3220, 3222-3240, 3245, 3247-3248, 3251, 3254, 3266, 3348-3349, 3416, 3429, 3610-3611, 3784, 3870-3871, 3883, 3889, 3974,

4542-4549, 4763-4805, 5085, 5090-5104, 5376-5389, 5683-5702, 6011-6034, 6254, 6258-6279, 6348, 6526-6862, 7393-7414, 7974-7977, 9194-9204, 9268, 9479-9481, 10311-10314,

10745-10749, 11418-11419, 11682-12799, 13564-13589, 13668-13671, 13891-14382, 14529, 14555, 14557, 14644-14649, 14658-14659, 14696-14698, 14729-14734, 14766-14769, 14857, 14884, 14899,

14904-15024, 15065-15999, 16791-16999, 17475-17499, 17975, 17977, 17979-17999, 18037, 18103, 18106-18108, 18110-18111, 18113-18199, 18631-19999

Source, fastman92 on GTAForums

Posted

I'm not sure if it is possible but you could try having a go at replacing it via client side ONLY for 1 person, not everyone

Posted

Yes but when I create the object 18646, I have this error :

 Bad argument @ 'createObject' [invalid model id] 

My script :

Server:

function objet (thePlayer, command) 
  
local x,y,z = getElementPosition(thePlayer) 
  
createObject ( 18646, x, y, z) 
  
end 
addCommandHandler("objet", objet) 

Client:

function tramReplace() 
  
         PoliceLight1 = engineLoadDFF ( "objets/PoliceLight1.dff", 18646 ) 
         engineReplaceModel ( PoliceLight1, 18646 ) 
  
 end 
  
 addEventHandler ( "onClientResourceStart", getRootElement(), tramReplace) 

Posted

When i use the id 10000, it works. But when i use a free id like 18646, it doesn't work and gives me the error of Invalid model id

Posted

I dont know exactly what you mean but may use

Meta.xml

  
<meta> 
<info type="script" version="1.0" name="OtherModle." author="foo"/> 
<script type="client" src="script.lua"/> 
<file type="client" src="file.txd"/> 
<file type="client" src="file.dff"/> 
</meta> 

script.lua

addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), function() 
  txd = engineLoadTXD("file.txd", 475 )--modle_id Sabre=475 
  engineImportTXD(txd, 475) 
  dff = engineLoadDFF("file.dff", 475 ) 
  engineReplaceModel(dff, 475) 
  end 
) 
  

just replace 475 to the modle id to be repaced.

may search in the map_editor for the right modle id

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...