How to use dialog wid mission
#1

......
Reply
#2

bump
Reply
#3

what
Reply
#4

I want to create an dialog command with the mission.
Reply
#5

what must to do that command ? explain more
Reply
#6

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.
Reply
#7

Can you please post us your enum?

Then i can give u a good command
Reply
#8

----------------
Reply
#9

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!!!!
    
{02054.6843,1928.2374,12.1540"(LV) Book Store""Books"2492.5366,2773.2190,10.80422"K.A.C"1500},
    {
12492.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 
ii<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
Reply
#10

-----
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)