Need help in duel system !
#1

I have problem, when i am inviting player for duel, invitation message not showing to his!

see my script:

pawn Код:
CMD:duel(playerid,params[])
{
    new target;
    if(pInfo[playerid][Minigame] == 1) return sMess(playerid,4);
    if(pInfo[playerid][Dinviter] != -1) return SendClientMessage(playerid,Red,"** You already have an invitation from player!");
    if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"**Usage: /duel <playerid>");
    if(pInfo[target][Dinviter] != -1) return SendClientMessage(playerid,Red,"** Target have an invitation from player!");
    if(pInfo[target][InDuel] == 1) return SendClientMessage(playerid,Red,"** Target already in duel!");
    if(pInfo[playerid][InDuel] == 1) return SendClientMessage(playerid,Red,"** You are already in duel!");

    pInfo[playerid][Dinviter] = target;
   
    ShowPlayerDialog(playerid, DIALOG_DUEL, DIALOG_STYLE_LIST,"Select duel wepaon", "Sawn-off\nDeagle\nUzi", "Ok", "Back");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    // duel
    if(dialogid == DIALOG_DUEL && response)
    {
            switch(dialogid)
            {
                case 0:
                {
                    new ms[500];
                    new target = pInfo[playerid][Dinviter];
                    // target = player id invited for duel!
                    // playerid = inviter

                    format(ms,500,"{808080}["WI"DUEL-INVITE{808080}] : Player %s is inviting you for duel Sawn-Off!",GetName(playerid));
                    SendClientMessage(target,-1,ms); // This message for player invite for duel!
                    SendClientMessage(target,-1,"==>> Type /yes if you want to duel!"); // This message for player invite for duel!
                    SendClientMessage(playerid,-1,"** Please wait for target accepting your request!"); // This message for inviter!
                    pInfo[target][Dinviter] = playerid;
                    pInfo[target][DuelType] = 1;
                    pInfo[playerid][DuelType] = 1;
                    SetTimerEx("ResetD",10000,0,"dd",pInfo[playerid][Dinviter],playerid);
                }
                case 1:
                {
                   
               
                }
                case 2:
                {
                   
                   
                }
            }
           
            if(!response)
            {
                pInfo[playerid][Dinviter] = -1;
            }
    }
    return 1;
}
Whats wrong ?

Sorry for my bad english
Reply


Messages In This Thread
Need help in duel system ! - by VenomMancer - 04.03.2015, 14:05
Re: Need help in duel system ! - by wooolly - 04.03.2015, 14:11
Re: Need help in duel system ! - by VenomMancer - 04.03.2015, 14:22
Re: Need help in duel system ! - by VenomMancer - 04.03.2015, 14:38
Re: Need help in duel system ! - by CalvinC - 04.03.2015, 14:43
Re: Need help in duel system ! - by X337 - 04.03.2015, 14:57
Re: Need help in duel system ! - by VenomMancer - 04.03.2015, 15:02

Forum Jump:


Users browsing this thread: 2 Guest(s)