Menu when entering checkpoint
#8

I reccomend using http://codegenerators.pl/infotext for making the pickups i know it says info text. But thats how i make the pickups to trigger dialogs. Just change the onplayerpickuppickup to show your dialog ID you'd like to show.

pawn Код:
#include <a_samp>
new test; //declare them as "new" each time you add a new pickup

public OnGameModeInit()
{
    test = CreatePickup(3433, 1, 2084.4717, -1808.0403, 13.3828, -1);//create the pickup. Make unique names i find is easier to identify
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == test)
//here goes your show player dialog
    return 1;
}
to get the next one you simple /save. get the x y z

go to the FS/GM add

pawn Код:
new Test2;

public OnGameModeInit()
    test2 = CreatePickup(pickupid,type,x,y,z,virtualworld); //reccomend at -1 for allworlds
So there's the pickups created. but you want to show them in a car correct? that will be:
"14 -Pickupable, but only when in a vehicle." (samp wiki)


Now you want to make something happen when you drive over the pickup.

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == test2)
        ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Congratulations", "Your pickup works", "Close", "");
    return 1;
}
Now im gonna add it all into one for you hopefully you're following my awful explanation.

pawn Код:
new infotext;
new blabla;
public OnGameModeInit()
{
    infotext = CreatePickup(1241,14, 2084.4717, -1808.0403, 13.3828, -1); //random saveplace i had
    blabla = CreatePickup(1241,14,2157.8694, -1798.4272, 13.3671, -1); //another random :)
         return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == test)
        ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Hello", "You can add your dialogs here", "Close", "");
    if(pickupid == blabla)
               ShowPlayerDialog(playerid,yours can go here.);
  return 1;
}
Let me know if you need it explaining
Reply


Messages In This Thread
Menu when entering checkpoint - by BossZk - 16.04.2013, 12:52
Re: Menu when entering checkpoint - by DobbysGamertag - 16.04.2013, 13:08
Re: Menu when entering checkpoint - by BossZk - 16.04.2013, 13:25
Re: Menu when entering checkpoint - by DobbysGamertag - 18.04.2013, 21:46
Re: Menu when entering checkpoint - by Guest123 - 18.04.2013, 23:50
Re: Menu when entering checkpoint - by DobbysGamertag - 19.04.2013, 14:56
Re: Menu when entering checkpoint - by BossZk - 20.04.2013, 22:01
Re: Menu when entering checkpoint - by DobbysGamertag - 20.04.2013, 22:24
Re: Menu when entering checkpoint - by BossZk - 23.04.2013, 05:59
Re: Menu when entering checkpoint - by DaTa[X] - 23.04.2013, 06:02

Forum Jump:


Users browsing this thread: 2 Guest(s)