IFG : Insane Family Gangsters Forum Index
IFG : Insane Family Gangsters
Server Team DeathMatch : 188.138.79.5:8500
 
IFG : Insane Family Gangsters Forum IndexFAQSearchRegisterLog in

:: Duel Filterscript ::

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    IFG : Insane Family Gangsters Forum Index -> Server Developers -> Server Scripts/Gamemodes
Previous topic :: Next topic  
Author Message
[IFG]YaRecon
IFG Member
IFG Member

Offline

Joined: 24 Mar 2010
Posts: 1,206
Localisation: Apple Universe
Masculin Poissons (20fev-20mar)

PostPosted: Wed 8 Sep - 14:33 (2010)    Post subject: Duel Filterscript Reply with quote

Just found on Samp forum:
We just need to fit it with luxadmin

 
Quote:

#include <a_samp>
#define DIALOG_DUEL 24245
new bool:InvitedDuel[MAX_PLAYERS];
new IdDuel[MAX_PLAYERS];
new bool:UsingArena;
new Counting = 5;
new CountDueling[5][5] ={"~r~1","~b~2","~p~3","~y~4","~g~5"};
forward ExecuteCount(playerid,pid);
public ExecuteCount(playerid,pid)
{
    if (Counting > 0)
    {
        GameTextForPlayer(playerid,CountDueling[Counting-1], 2500, 3);
        GameTextForPlayer(pid,CountDueling[Counting-1], 1000, 3);
        Counting--;
        SetTimerEx("GoDuel",1000,false,"ii",playerid,pid);
    }
    else
    {
        GameTextForPlayer(playerid,"~>~~g~Go~w~Go~r~Go~b~Go~<~", 2500, 3);
        GameTextForPlayer(pid,"~>~~g~Go~w~Go~r~Go~b~Go~<~", 2500, 3);
        Counting = 5;
        TogglePlayerControllable(playerid,true);
        TogglePlayerControllable(pid,true);
    }
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128];
    new idx;
    new id;
    cmd = otherplayerids(cmdtext, idx);
    if(!strcmp("/duel", cmd, true))
    {
        new tmp[128];
        new string[128];
        tmp = otherplayerids(cmdtext, idx);
        id = strval(tmp);
        if(InvitedDuel[playerid] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Have you invited someone, wait Expire Invitation");
        if(UsingArena == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : At the time the Arena is Being Used");
        if(!strlen(tmp)) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You must enter the ID of the player following the Way (/duel [playerid])");
        if(id == playerid) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : You can not invite the Self");
        if(InvitedDuel[id] == true) return SendClientMessage(playerid,0xF41917AA,"»»[DUEL]«« : Currently the player is in a Duel, wait..");
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "»»[DUEL]«« : %s This inviting you to a \n Duel Runing (Press Accept to Accept Duel)",name);
        ShowPlayerDialog(id,DIALOG_DUEL,DIALOG_STYLE_MSGBOX,"»»[DUEL]«« :",string,"Accept", "No");
        GameTextForPlayer(id,"~r~DUE~w~LO !", 2500, 3);
        InvitedDuel[id] = true;
        IdDuel[id] = playerid;
        SetTimerEx("ExpireDuel",15000,false,"ii",id,playerid);
        return 1;
    }
    return 0;
}


forward GoDuel(playerid,pid);
public GoDuel(playerid,pid)
{
    //-> Go To  X1 <-//
    //SetPlayerPos
    //SetPlayerArmor
    //SetPlayerHealth


    //-> Functions for Count x1<-//
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(pid,false);
    ExecuteCount(playerid,pid);
    return 1;
}


forward ExpireDuel(playerid,pid);
public ExpireDuel(playerid,pid)
{
    if(UsingArena == false)
    {
        SendClientMessage(pid,0x1DF6F6AA,"»»[DUEL]«« : Expired challenge, He Refused");
        SendClientMessage(playerid,0x1DF6F6AA,"»»[DUEL]«« : Expired challenge, you automatically refuse");
        InvitedDuel[pid] = false;
        InvitedDuel[playerid] = false;
        IdDuel[playerid] = playerid;
        IdDuel[pid] = pid;
    }
    return 1;
}


otherplayerids(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_DUEL)
    {
        if(!response) return ExpireDuel(playerid,IdDuel[playerid]);
        if(response)
        {
            UsingArena = true;
            new name[MAX_PLAYER_NAME], string[44];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "»»[DUEL]«« : %s accepted the challenge, wait 8 seconds to go to Duel.",name);
            SendClientMessage(IdDuel[playerid],0xF6F600AA,string);
            SendClientMessage(playerid,0xF6F600AA,"»»[DUEL]«« : You accepted the Duel Wait 8 seconds to process your Data");
            SetTimerEx("GoDuel",8000,false,"ii",playerid,IdDuel[playerid]);
        }
        return 1;
    }
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
    if(InvitedDuel[killerid] == true)
    {
        new Float:healthkiller;
        new namekiller[24],namedeather[24],string[44];
        GetPlayerName(killerid, namekiller, 24);
        GetPlayerName(playerid, namedeather, 24);
        GetPlayerHealth(killerid,healthkiller);
        format(string, sizeof(string), "»»[DUELO]«« : %s Wins Duel of %s how %0.0f off Armour and Health",namekiller,namedeather,healthkiller);
        SendClientMessageToAll(0xF600F6AA, string);
        InvitedDuel[killerid] = false;
        InvitedDuel[playerid] = false;
        IdDuel[playerid] = playerid;
        IdDuel[killerid] = killerid;
        UsingArena = false;
        healthkiller = 0;
        SpawnPlayer(killerid);
    }
    return 1;
}

_________________

Back to top
Publicité






PostPosted: Wed 8 Sep - 14:33 (2010)    Post subject: Publicité

PublicitéSupprimer les publicités ?
Back to top
[IFG]Zer0
Leader
Leader

Offline

Joined: 27 Mar 2010
Posts: 16,777,215
Localisation: On the streets, fuckin with da livin
Masculin Cancer (21juin-23juil)

PostPosted: Wed 8 Sep - 14:51 (2010)    Post subject: Duel Filterscript Reply with quote

Will use it in our admin script.
_________________
Back to top
Visit poster’s website Yahoo Messenger
[IFG]YaRecon
IFG Member
IFG Member

Offline

Joined: 24 Mar 2010
Posts: 1,206
Localisation: Apple Universe
Masculin Poissons (20fev-20mar)

PostPosted: Wed 8 Sep - 14:54 (2010)    Post subject: Duel Filterscript Reply with quote

Good
_________________

Back to top
[IFG]Zer0
Leader
Leader

Offline

Joined: 27 Mar 2010
Posts: 16,777,215
Localisation: On the streets, fuckin with da livin
Masculin Cancer (21juin-23juil)

PostPosted: Wed 8 Sep - 14:56 (2010)    Post subject: Duel Filterscript Reply with quote

[THC]YaRecon wrote:
Good


What do you think about my Lag Counter?
_________________
Back to top
Visit poster’s website Yahoo Messenger
[IFG]YaRecon
IFG Member
IFG Member

Offline

Joined: 24 Mar 2010
Posts: 1,206
Localisation: Apple Universe
Masculin Poissons (20fev-20mar)

PostPosted: Wed 8 Sep - 16:03 (2010)    Post subject: Duel Filterscript Reply with quote

Shocked ?
_________________

Back to top
[IFG]Zer0
Leader
Leader

Offline

Joined: 27 Mar 2010
Posts: 16,777,215
Localisation: On the streets, fuckin with da livin
Masculin Cancer (21juin-23juil)

PostPosted: Wed 8 Sep - 16:29 (2010)    Post subject: Duel Filterscript Reply with quote

Check out tha secret page, admin fs
_________________
Back to top
Visit poster’s website Yahoo Messenger
[IFG]YaRecon
IFG Member
IFG Member

Offline

Joined: 24 Mar 2010
Posts: 1,206
Localisation: Apple Universe
Masculin Poissons (20fev-20mar)

PostPosted: Wed 8 Sep - 18:08 (2010)    Post subject: Duel Filterscript Reply with quote

lool ace dude Very Happy
_________________

Back to top
Contenu Sponsorisé






PostPosted: Today at 08:37 (2017)    Post subject: Duel Filterscript

Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    IFG : Insane Family Gangsters Forum Index -> Server Developers -> Server Scripts/Gamemodes All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  

Index | Create a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
Design par Kronica

Powered by phpBB © 2001, 2005 phpBB Group