25.08.2015, 11:04
(
Последний раз редактировалось DerickClark; 26.08.2015 в 11:39.
)
......
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 :)
}