SA-MP Forums Archive
Pickup prob - 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: Pickup prob (/showthread.php?tid=72733)



Pickup prob - Amoken - 10.04.2009

Anyone know why the message and pickup apears only when i use a job id 16 commands?
Код:
	if(PlayerInfo[playerid][pJob] == 16)
	{
  AddStaticPickup(1239, 1, 983.5647,-904.7174,42.3358); //deliver
  AddStaticPickup(1239, 1, 272.7987,1344.7866,11.1762); //take
  }
	if(PlayerInfo[playerid][pJob] == 16)
	{
if (PlayerToPoint(25.0, playerid, 983.5647,-904.7174,42.3358))
  {
  GameTextForPlayer(playerid, "~n~~w~Deliver your fuel ~r~/deliverfuel", 5000, 3);
  }
  else if (PlayerToPoint(25.0, playerid,272.7987,1344.7866,11.1762))
 {
 GameTextForPlayer(playerid, "~n~~w~You can now fill in your trailer with ~r~/takefuel.", 5000, 3);
   }
   }



Re: Pickup prob - Joe Staff - 10.04.2009

Does it have something to do with
pawn Код:
if(PlayerInfo[playerid][pJob] == 16)



Re: Pickup prob - HB - 10.04.2009

Quote:
Originally Posted by Amoken
Anyone know why the message and pickup apears only when i use a job id 16 commands?
Код:
	if(PlayerInfo[playerid][pJob] == 16) // <---------- MARK
	{
  AddStaticPickup(1239, 1, 983.5647,-904.7174,42.3358); //deliver
  AddStaticPickup(1239, 1, 272.7987,1344.7866,11.1762); //take
  }
	if(PlayerInfo[playerid][pJob] == 16) // <---------- MARK
	{
if (PlayerToPoint(25.0, playerid, 983.5647,-904.7174,42.3358))
  {
  GameTextForPlayer(playerid, "~n~~w~Deliver your fuel ~r~/deliverfuel", 5000, 3);
  }
  else if (PlayerToPoint(25.0, playerid,272.7987,1344.7866,11.1762))
 {
 GameTextForPlayer(playerid, "~n~~w~You can now fill in your trailer with ~r~/takefuel.", 5000, 3);
   }
   }
You have the same check twice, look at the marked text. Remove one of the checks.


Re: Pickup prob - Amoken - 10.04.2009

well I dont want this gametext and pickup apear to all jobs coz its anoying walking and rping and sudenly a pickup or a text that has nothing to do about u apearing. Anyone got an idea on how I can make a pickup display and a gametext without this job id have to use a command?
edit: I know that I tryed that in order to avoid any bugs, so I can spot the prob if its pickups one or gametext.