Dialog
#1

hello, i have a piece of code here which i would like in dialog. (i mean all the messages) it appear when player spawns so whenever player choose role as theif and spawn all the messages appear to them in a dialog instead in chatbox.

pawn Код:
new rname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, rname, sizeof(rname));
    if(GetPlayerMenu(playerid) == Roles)
    {
        switch(row)
        {
            case 0: // Thief
            {
                SetPlayerTeam(playerid, THIEF);
                SendClientMessage(playerid, LIGHT_BLUE, "You made your choice. You are now a Thief.");
                SendClientMessage(playerid, LIGHT_BLUE, "As a Thief, you need to rob things.");
                SendClientMessage(playerid, LIGHT_BLUE, "To see your role's commands, type: /rcommands");
                ChoosingRole[playerid] = 0;
                TogglePlayerControllable(playerid, true);
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 24, 100);
                GivePlayerWeapon(playerid, 29, 250);
            }
Any help is kind and appricieated.
Reply
#2

Anyone ?...
Its urgent.
Reply
#3

it should be like

pawn Код:
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
pawn Код:
new rname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, rname, sizeof(rname));
    if(GetPlayerMenu(playerid) == Roles)
    {
        switch(row)
        {
            case 0: // Thief
            {
                SetPlayerTeam(playerid, THIEF);
                ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
                ChoosingRole[playerid] = 0;
                TogglePlayerControllable(playerid, true);
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 24, 100);
                GivePlayerWeapon(playerid, 29, 250);
            }
Used DIALOG_STYLE_MSGBOX
P.S: Dont bump for atleast 48 hours.
Reply
#4

Thanks a lot, <3 it worked, repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)