SA-MP Forums Archive
What annimation/action will give the player a phone? - 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: What annimation/action will give the player a phone? (/showthread.php?tid=435270)



What annimation/action will give the player a phone? - Don_Cage - 06.05.2013

Well like the title say. I'm wondering how i can make the player get a phone in his hand when he use his phone?
Currently I'm using this SPECIAL_ACTION_USECELLPHONE and that is not right.

To explain it more I can take this as an exampel..
SPECIAL_ACTION_SMOKE_CIGGY -This will give the player a cigar that is right placed in his hand wich means that I dont need to put object id etc for where the cigar should be.
So I'm wondering what special action make the same but with the cellphone?


Re: What annimation/action will give the player a phone? - DaRk_RaiN - 06.05.2013

SPECIAL_ACTION_USECELLPHONE


Re: What annimation/action will give the player a phone? - Don_Cage - 06.05.2013

Like i said, Im allready using that one and that is not right. The player doesnt get a cellphone in his hand and that is what i want him to get


Re: What annimation/action will give the player a phone? - DaRk_RaiN - 06.05.2013

Then you'll have to use AttachObjectToPlayer function and attach the phone object to his hand.


Re: What annimation/action will give the player a phone? - Don_Cage - 06.05.2013

So there isnt any action like for the smoke? that automaticlly gives him a cellphone?


Re: What annimation/action will give the player a phone? - DaRk_RaiN - 06.05.2013

No, i don't think there is, you could still search for another cellphone animation but it's a rare possibility to find one that attaches the phone.


Re: What annimation/action will give the player a phone? - Don_Cage - 06.05.2013

Ok, How can i then attach it myself? the link you provided didnt work


Re: What annimation/action will give the player a phone? - DaRk_RaiN - 06.05.2013

https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Cellphone object IDs 2886, 330, 18866.


Re: What annimation/action will give the player a phone? - DobbysGamertag - 06.05.2013

pawn Код:
ApplyAnimation(playerid,"PED","phone_out",4.1,0,0,0,0,0,0);
or
pawn Код:
ApplyAnimation(playerid,"PED","phone_talk",4.1,0,0,0,0,0,0);



Re: What annimation/action will give the player a phone? - MP2 - 06.05.2013

The phone object was removed in a recent SA-MP version (d, e or x) to allow for any phone model to be used. Attach it with SetPlayerAttachedObject and detach it when done on a ~1000 MS timer.