Marking in dialog -
_GHT_MarK445 - 01.02.2015
Hi guys,
I need simple help, I am about to create some missions, that missions will be enabled by writing command /ms and the thing is, that it will show an dialog, where it will be just like this, it will be Dialog Style List
If player writes command /ms
The dialog will show up:
Missions
Line 1 for example
Stole his wife
so.. Stole his wife will be the name of mission witch will be showed in dialog on the first place.
And, my problem is.. If the player complete the mission, so he will get mission done for example:
Код:
if(Mision[playerid] == 1)
the thing is, i need to set the text in dialog by command /ms to
Line 1 will be (after the mission is done)
Stole his wife (COMPLETED)
and the player, will be not enable to enter the mission, so if the tryes to enter, the server will respond him for example
You've already done this mission!
For any possible help I am thankful!
Re: Marking in dialog -
_GHT_MarK445 - 02.02.2015
Please, will be someone enable to help me? I really want to continue in working on my gamemode, but without this I just cant. I beleive, there is someone who is that good and can make it.
Re: Marking in dialog -
ATGOggy - 02.02.2015
On top
PHP код:
#define DIALOG_MISSIONLIST 0
new mission1[MAX_PLAYERS];
After mission complete:
PHP код:
mission1[playerid]=1;
On /sm command:
PHP код:
new string[32], string2[128];
if(mission1[playerid]==1) string = "Stole his wife (COMPLETED)";
else string = "Stole his wife";
format(string2, sizeof(string2), "%s", string);
ShowPlayerDialog(playerid, DIALOG_MISSIONLIST, DIALOG_STYLE_LIST, "Select mission:", string2, "Select","Cancel");
Re: Marking in dialog -
pellstrike - 02.02.2015
Код:
new
bool: gMission1[MAX_PLAYERS];
// gMission2, gMission3, 4, 5....
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/ms", true))
{
ShowPlayerMissionPrompt(playerid);
return 1;
}
return 0;
}
ShowPlayerMissionPrompt(playerid)
{
new missionstr[48]; // Increase this value.
if(gMission1[playerid])
strcat(missionstr, "Stole his wife (Completed)\n");
else
strcat(missionstr, "Stole his wife\n");
// ...
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Missions", missionstr, "Select", "Close");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1: // Mission 1
{
if(!gMission1[playerid])
{
// Mission 1 Start
}
}
// case 2 for mission 2, case 3 for mission 3, ...
}
return 0;
}
I didn't tested, but It should work.
Re: Marking in dialog -
_GHT_MarK445 - 02.02.2015
Thanks guys, working.
I really appreciate it.