💥 How to do this ? 💥
#1

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(19833x,y,z000000);
 
 
printf("@COW OBJECT IS ID: 1",COW_OBJECTID);
 
  new 
COW_OBJECT_2;
  
COW_OBJECT_1 CreateObject(19833x,y,z000000);
 
printf("@COW OBJECT IS ID: 2",COW_OBJECTID); 
Reply
#2

https://sampwiki.blast.hk/wiki/Printf

Take a look at Format Specifiers.
Reply
#3

I just want to know how to give different ids to objects.
Reply
#4

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); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)