#6

Now it should work, I understand what you were trying to do, why did you put strlen(inputtext) and strval(inputtext) in a DIALOG_MSGBOX? You'll need to translate it back to your language at some places. I tested the script just to be sure it will work now.

pawn Код:
new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    new string[130];
    Duel[clickedplayerid] = playerid;
    format(string,sizeof string,"Игрок %s(%i) вызывает Вас на дуэль\nВы согласны?",pName,playerid);
    ShowPlayerDialog(clickedplayerid,AccDuel,DIALOG_STYLE_MSGBOX,"Вызов на дуэль:",string,"Принять","Отклонить");
Also

pawn Код:
if(dialogid == AccDuel)
    {
        if(response)
        {
            if(Duel[playerid] == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"The player left the game, impossible to do a duel with him.");
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,31,9999);
            GivePlayerWeapon(playerid,24,9999);
            GivePlayerWeapon(playerid,25,9999);
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
            SetPlayerPos(playerid,2105.8318,2428.2993,45.2188);
            //
            ResetPlayerWeapons(Duel[playerid]);
            GivePlayerWeapon(Duel[playerid],31,9999);
            GivePlayerWeapon(Duel[playerid],24,9999);
            GivePlayerWeapon(Duel[playerid],25,9999);
            SetPlayerHealth(Duel[playerid], 100);
            SetPlayerArmour(Duel[playerid], 100);
            SetPlayerPos(Duel[playerid],2060.2151,2385.5791,45.2265);
        }
        else
        {
            new string[128], pName[MAX_PLAYER_NAME], pSendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pName, sizeof(pName));
            GetPlayerName(Duel[playerid], pSendername, sizeof(pSendername));
            if(Duel[playerid] == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"The player left the game, impossible to decline the duel.");
            format(string, sizeof(string), "You declined the duel of %s.", pSendername);
            SendClientMessage(playerid,-1,string);
            format(string, sizeof(string), "%s declined your duel invitation", pName);
            SendClientMessage(Duel[playerid],-1,string);
        }
    }
Edit: Much easier to fix when you understand something
Reply


Messages In This Thread
Duel - by [HHT]DRON - 08.07.2012, 13:19
Re: Duel - by lelemaster - 08.07.2012, 15:30
Re: Duel - by [HHT]DRON - 08.07.2012, 18:12
Re: Duel - by lelemaster - 10.07.2012, 07:50
Re: Duel - by [HHT]DRON - 10.07.2012, 09:15
Re : Duel - by lelemaster - 10.07.2012, 17:04
Re: Duel - by [HHT]DRON - 11.07.2012, 08:01
Re: Duel - by [HHT]DRON - 12.07.2012, 11:58
Re : Duel - by lelemaster - 12.07.2012, 12:51
Re: Duel - by [HHT]DRON - 12.07.2012, 14:28

Forum Jump:


Users browsing this thread: 2 Guest(s)