How to use dialog wid mission - 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)
+--- Thread: How to use dialog wid mission (
/showthread.php?tid=586801)
How to use dialog with mission -
DerickClark - 25.08.2015
......
Re: How to use dialog wid mission -
DerickClark - 25.08.2015
bump
Re: How to use dialog wid mission -
Luke_James - 25.08.2015
what
Re: How to use dialog wid mission -
DerickClark - 25.08.2015
I want to create an dialog command with the mission.
Re: How to use dialog wid mission -
jamal1992 - 25.08.2015
what must to do that command ? explain more
Re: How to use dialog wid mission -
DerickClark - 25.08.2015
When you type /workmenu it will show the player the mission name when you click on that mission name you will have the mission you picked.
AW: How to use dialog wid mission -
Kaliber - 25.08.2015
Can you please post us your enum?
Then i can give u a good command
Re: How to use dialog wid mission -
DerickClark - 25.08.2015
----------------
AW: How to use dialog wid mission -
Kaliber - 25.08.2015
Then just do this:
PHP код:
stock const trucker[][MissionData] =
{
// Template: {lx, ly, lz, lpname, loadname, ux, uy, uz, upname, cost},
// Dont include comma on last!!!!
{0, 2054.6843,1928.2374,12.1540, "(LV) Book Store", "Books", 2492.5366,2773.2190,10.80422, "K.A.C", 1500},
{1, 2492.5366,2773.2190,10.80422, "K.A.C", "Books", 2054.6843,1928.2374,12.1540, "(LV) Book Store", 2500}
};
//At the top too
new player_mission[MAX_PLAYERS];
//To make it short u can troll
#define idx player_mission[playerid]
//Then in the command:
new string[256];
for(new i; i<sizeof(trucker); i++)format(string,sizeof(string),"%s%s\n",string,trucker[i][lpname]);
ShowPlayerDialog(playerid,1337,DIALOG_STYLE_LIST,"Missions",string,"Accept","Cancel");
//Under OnDialogResponse
if(dialogid == 1337)
{
if(!response) return 1; //here he pressed cancel
player_mission[playerid] = listitem;
SetPlayerPos(playerid,trucker[idx][lx],trucker[idx][ly],trucker[idx][lz]); //For example to set the player at his mission position :)
}
Greekz
Re: AW: How to use dialog wid mission -
DerickClark - 25.08.2015
-----