💥 How to do this ? 💥 - 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: 💥 How to do this ? 💥 (
/showthread.php?tid=653478)
💥 How to do this ? 💥 -
SingleFFG - 05.05.2018
good evening ...
how can I add ID's to certain objects or things, example
PHP код:
 new COW_OBJECT_1,COW_OBJECT_2,COW_OBJECTID;
 COW_OBJECT_1 = CreateObject(19833, x,y,z, 0, 0, 0, 0, 0, 0);
Â
 printf("@COW OBJECT IS ID: 1",COW_OBJECTID);
Â
  new COW_OBJECT_2;
  COW_OBJECT_1 = CreateObject(19833, x,y,z, 0, 0, 0, 0, 0, 0);
 printf("@COW OBJECT IS ID: 2",COW_OBJECTID);Â
Re: 💥 How to do this ? 💥 -
Gammix - 05.05.2018
https://sampwiki.blast.hk/wiki/Printf
Take a look at Format Specifiers.
Re: 💥 How to do this ? 💥 -
SingleFFG - 05.05.2018
I just want to know how to give different ids to objects.
Re: 💥 How to do this ? 💥 -
Gammix - 05.05.2018
CreateObject returns the id of the object which you are storing in COW_OBJECT_1.
So you already have a unique object id:
PHP код:
printf("@COW OBJECT IS ID: %i", COW_OBJECT_1);Â