very simple help!
#1

I use this attach:

SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000,1.500000, 1.500000);


and use this for destroy the attach but it's not destroy: DestroyObject(18634);
Reply
#2

to use this ?

DestroyDynamicObject
Reply
#3

You don't do that...

You're using the actual ModelID of the object, you should be tracking the created object via a variable

Код:
Object[playerid] = SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000,1.500000, 1.500000);
Код:
DestroyObject(Object[playerid]);

This is probably entirely wrong, but the main thing is that you need to track the actual object, so you can destroy it, as the model ID isn't what it goes off.

It's similar to cars... If you spawn cars, you can put
Код:
AdminCar = CreateVehicle(bla,de,bla);
then you can use AdminCar in if statements and other areas.

Each one that is created will make the object ID for the next increment, hence why you need to track it.
Reply
#4

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
You don't do that...

You're using the actual ModelID of the object, you should be tracking the created object via a variable

Код:
Object[playerid] = SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000,1.500000, 1.500000);
Код:
DestroyObject(Object[playerid]);

This is probably entirely wrong, but the main thing is that you need to track the actual object, so you can destroy it, as the model ID isn't what it goes off.

It's similar to cars... If you spawn cars, you can put
Код:
AdminCar = CreateVehicle(bla,de,bla);
then you can use AdminCar in if statements and other areas.

Each one that is created will make the object ID for the next increment, hence why you need to track it.
I understand, Thank u very much!
Reply
#5

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
You don't do that...

You're using the actual ModelID of the object, you should be tracking the created object via a variable

Код:
Object[playerid] = SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000,1.500000, 1.500000);
Код:
DestroyObject(Object[playerid]);

This is probably entirely wrong, but the main thing is that you need to track the actual object, so you can destroy it, as the model ID isn't what it goes off.

It's similar to cars... If you spawn cars, you can put
Код:
AdminCar = CreateVehicle(bla,de,bla);
then you can use AdminCar in if statements and other areas.

Each one that is created will make the object ID for the next increment, hence why you need to track it.
get errors
Reply
#6

try this
Код:
    RemovePlayerAttachedObject(playerid, 1);
Reply
#7

Quote:
Originally Posted by silverms
Посмотреть сообщение
try this
Код:
    RemovePlayerAttachedObject(playerid, 1);
OK, thanks!
Reply
#8

Better topic for next time in relation to this would be "SetPlayerAttachedObject help" or something more reflective of the topic ;P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)