How do I add those red beacons where if you walk in to it it opens up a menu, says something, etc.
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