help with a command
#3

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

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;
}
Edit: Shadows are always faster :/
Reply


Messages In This Thread
help with a command - by SwatOwner - 06.07.2011, 13:06
Re: help with a command - by Shadoww5 - 06.07.2011, 13:23
Re: help with a command - by Jochemd - 06.07.2011, 13:23
Re: help with a command - by SwatOwner - 06.07.2011, 13:28
Re: help with a command - by Jochemd - 06.07.2011, 13:31
Re: help with a command - by SwatOwner - 06.07.2011, 13:40
Re: help with a command - by SwatOwner - 09.07.2011, 04:07
Re: help with a command - by Kush - 09.07.2011, 06:12
Re: help with a command - by SwatOwner - 09.07.2011, 09:16

Forum Jump:


Users browsing this thread: 1 Guest(s)