Player attached object. Need help
#1

Hi
I was looking around but i found nothing that can help me
I want to make somethng simple but it's too complicated for me {lol}

so: i want to make a script which will do the following thigs:
when write in chat /obecton attach an object to player (SetPlayerAttachedObject)
then if player write /objectoff the object have to sdissapair {something like DestroyObject}

I tried somethig like that

Код:
if (strcmp("/object", cmdtext, true, 10) == 0)
	{
		SetPlayerAttachedObject( playerid, 0, 321, 1, -0.362731, 0.191657, 0.009735, 266.814392, 40.900573, 0.000000, 1.000000, 1.000000, 1.000000 );
		return 1;
	}
	if (strcmp("/objectoff", cmdtext, true, 10) == 0)
	{
		if(IsPlayerAttachedObjectSlotUsed(playerid,0)) RemovePlayerAttachedObject(playerid,0);
		return 1;
	}
But it doesn't work!
If you can help me please DO IT!xD

And sorry for my bad english! [lol]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)