Show a objects model ID? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Show a objects model ID? (
/showthread.php?tid=253647)
Show a objects model ID? -
Lorenc_ - 07.05.2011
Hey guys if i run a loop around all objects and create a 3dlabel what method would be suggested to gain the objects MODEL ID?
pawn Код:
for(new i = 0; i < MAX_OBJECTS; i++)
{
format(string, sizeof(string), "Model ID: %d", ???);
}
Thanks in advance, Lorenc
Note: The previous topic i created makes me crash when i click the topic link, IDK why maybe i just pasted too much code? IF any admin/mod sees this please remove that topc 'Short way of defining a object list?'
Re: Show a objects model ID? -
[WSF]ThA_Devil - 07.05.2011
i think you need distance from a object... that means you have too much labels that server can contain
pawn Код:
for(new i = 0; i < MAX_OBJECTS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, i))
{
format(string, sizeof(string), "Model ID: %d", ???);
}
}
(NOT TESTED and might not work)
Re: Show a objects model ID? -
MadeMan - 07.05.2011
There is no native function for getting object's modelid. You need to save the modelids when creating objects.
Re: Show a objects model ID? -
Babul - 07.05.2011
Код:
const MaxObjectsAndLabels=1000;
new Object[MaxObjectsAndLabels];
new ObjectModelID[MaxObjectsAndLabels];
// at each
//Object[id]=CreateDynamicObject(ModelID,...);
// add a
//ObjectModelID[id]=ModelID;
// then you can obtain its ModelID by using its arrayed [id]:
format(string, sizeof(string), "ObjectID:%4d ModelID:%5d", id, ObjectModelID[id]);
Re: Show a objects model ID? -
Lorenc_ - 07.05.2011
bump... Those things up the top aren't working. And is everyone sure you can't do this
Re: Show a objects model ID? -
DRIFT_HUNTER - 07.05.2011
https://sampforum.blast.hk/showthread.php?tid=175118
Re: Show a objects model ID? -
Lorenc_ - 08.05.2011
o.0 thanks, ill look through it, although not make a edit since i aint one of those ppl.