SA-MP Forums Archive
[HELP] How can I get a pickup icon ingame? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] How can I get a pickup icon ingame? (/showthread.php?tid=80718)



[HELP] How can I get a pickup icon ingame? - FreddeN - 05.06.2009

I want a Health icon so players can run into it and get healed, also some Info icons, if a player goes in it, it will pop up a text that says "To enter, type /entersfpd" or something...

Thanks


Re: [HELP] How can I get a pickup icon ingame? - efeX - 05.06.2009

Wiki.
AddStaticPickup
OnPlayerPickupPickup
GameTextForPlayer


Re: [HELP] How can I get a pickup icon ingame? - FreddeN - 05.06.2009

Quote:
Originally Posted by efeX
Wiki.
AddStaticPickup
OnPlayerPickupPickup
GameTextForPlayer
Alright, I have created it, but I cant get text on it...


Re: [HELP] How can I get a pickup icon ingame? - efeX - 05.06.2009

Get PlayerToPoint function (search, i'm not on my comp with pawn)

Then say something like

pawn Код:
if (PlayerToPoint(5.0, playerid, thepickupX, thepickupY, thepickupZ))
{
   GameTextForPlayer(playerid, "You're touching me!", 3, 5) <- last 2 parameters are text style and time, wiki shows those under Script Resources
}



Re: [HELP] How can I get a pickup icon ingame? - Abernethy - 05.06.2009

I think you should use OnPlayerPickUpPickup myself. But if you're creating a Roleplay script, or editing, use PlayerToPoint.


Re: [HELP] How can I get a pickup icon ingame? - efeX - 05.06.2009

Yeah, he could easily put it inside OnPlayerPickupPickup without the PTP also.. Just giving him 2 ways.


Re: [HELP] How can I get a pickup icon ingame? - Badger(new) - 05.06.2009

also
pawn Код:
GameTextForPlayer(playerid, "You're touching me!", 3, 5)
wont last for 5 seconds.
pawn Код:
GameTextForPlayer(playerid, "You're touching me!", 3, 5000)
that will.