06.07.2011, 13:23
Just save a few places, when a player presses that list item -> SetPlayerCheckpoint.
This can't be simpler.. But ok, here's a little code
Edit: Shadows are always faster :/
This can't be simpler.. But ok, here's a little code
pawn Код:
#define DIALOG_MAP // Put this on top of script
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/map",true))
{
ShowPlayerDialog(playerid,DIALOG_MAP,DIALOG_STYLE_LIST,"Map","Center of map","Select","Quit");
return 1;
}
return 0;
}
public OnDialogResponse(playerid,dialogid,response,lisitem,inputtext[])
{
if(dialogid == DIALOG_MAP)
{
if(response)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid,-1,"You have set a dot at 'Center of map'");
SetPlayerCheckpoint(playerid,0.0,0.0,3.0,5);
}
/*case 1:
{
blah
} */
}
}
}
return 1;
}