20.04.2013, 22:24
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.
to get the next one you simple /save. get the x y z
go to the FS/GM add
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.
Now im gonna add it all into one for you hopefully you're following my awful explanation.
Let me know if you need it explaining
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;
}
go to the FS/GM add
pawn Код:
new Test2;
public OnGameModeInit()
test2 = CreatePickup(pickupid,type,x,y,z,virtualworld); //reccomend at -1 for allworlds
"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;
}
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;
}