Text for Pickup - 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: Text for Pickup (
/showthread.php?tid=529158)
Text for Pickup -
Mititel - 31.07.2014
http://imgur.com/8ffl6SX
How I could do this thing when you walk into a pickup?
Re: Text for Pickup -
CJ101 - 31.07.2014
You need to create a textdraw that displays when the playe walks into the checkpoint.
https://sampwiki.blast.hk/wiki/Textdraw
Re: Text for Pickup -
r0bi - 31.07.2014
Fist create a pickup in public OnGameModeInit()
PHP код:
pickupexample = CreatePickup(1239, 1, coordonate x, y, z);
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickupexample)
{
SendClientMessage(playerid,-1, "{FFFFFF} Type {F00000}/paint {FFFFFF} to enter the paitball arena");
return 1;
}
}
Re: Text for Pickup -
Mititel - 02.08.2014
Quote:
Originally Posted by r0bi
Fist create a pickup in public OnGameModeInit()
PHP код:
pickupexample = CreatePickup(1239, 1, coordonate x, y, z);
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickupexample)
{
SendClientMessage(playerid,-1, "{FFFFFF} Type {F00000}/paint {FFFFFF} to enter the paitball arena");
return 1;
}
}
|
Thanks, but not what I'm looking for
Re: Text for Pickup -
Stanford - 02.08.2014
It's exactly the thing that you are looking for, you just need a textdraw and you do what r0bi did.
Re: Text for Pickup -
Steel_ - 02.08.2014
Код:
pickupexample = CreatePickup(1239, 1, coordonate x, y, z);
First create a textdraw use this
http://bsndesign.webs.com/tde.htm
now instead of putting the textdraw in OnPlayerSpawn put it here on OnPlayerPickUpPickup
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickupexample)
{
TextDrawShowForPlayer(playerid, textid);
return 1;
}
Re: Text for Pickup -
Stanford - 02.08.2014
Do not forget to use PlayerTextDraws because you might need to use PlayerTextDrawSetString.
Why not use player Tds instead of global?
Because sometimes more than one player would view the textdraw and they might get the same string.. For example one is near pizza stack entrance and one near ammunition once the pizza stack guy steps near the pickup and gets pizza stack textdraw and after a second guy near ammunition steps near ammunition and gets his string set to ammunition as a result the guy near pizza pickup get his textdraw string set to ammunition..
So you need to use PlayerTextDraws thing..