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



Beacons - andrewp - 14.03.2010

How do I add those red beacons where if you walk in to it it opens up a menu, says something, etc.

Thanks.


Re: Beacons - MrIncredible - 14.03.2010

i think this can help i am using not the red thingy .. you can replace it
Код:
new minimenu; // at the verytop put this
minimenu = CreatePickup(234, 23, -2348.942,261.415,2.65); //put this under ongamemodeinit
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == minimenu)
	{
		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Guns", "m4\nRocket", "Select", "Cancel");!");
	}
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
		  new string[128];

		  if(dialogid == 2 )
		  {
			  if(!response)
			  {
		   		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Guns", "m4\nRocket", "Select", "Cancel");
			    TogglePlayerControllable(playerid, 0);
		 		}

			  if(response)
			  {
			    if(listitem == 0)
			    {
					 GivePlayerWeapon(playerid, 24, 200); // i dont remeber the id of m4 so find it your self
		      }
		    }
		  if(listitem == 1)
			    {
           GivePlayerWeapon(playerid, 24, 200); ///// for this one also
          }
      return 1;
}
no i am not sure .. if it will work