I need Duel system
#1

Can be deleted
Reply
#2

Found this with a little SEARCH:

http://forum.sa-mp.com/showthread.ph...ht=Duel+system

Should help you get started.
Reply
#3

Can be deleted
Reply
#4

Quote:
Originally Posted by liinor
Посмотреть сообщение
Thats /duel id
He said "To help you get started" why do you think people are gonna script you a full code? -.-
Reply
#5

Quote:
Originally Posted by Funtime
Посмотреть сообщение
He said "To help you get started" why do you think people are gonna script you a full code? -.-
well they actually will... if you give them money, hehe.
Reply
#6

I didnt saw that text under link.
Reply
#7

,,,,
Reply
#8

Can be deleted
Reply
#9

Here is a example for just one arena

pawn Код:
new DualStarted;
new DualJoin;
new Dualers[2];

public OnGameModeInit()
{
    Dualers[0] = -1;
    Dualers[1] = -1;
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/dual", cmdtext, true))
    {
        if(DualStarted == 1) return SendClientMessage(playerid, 0xFF0000AA, "There is already a dual running!");
        if(DualJoin == 0)
        {
                    SendClientMessageToAll(0x1229FAFF, "The Dual arena has been started!");
                    SetPlayerPos(playerid, /*XPOS*/, /*YPOS*/, /*ZPOS*/);
                    GivePlayerWeapon(playerid, /*WeaponID*/, /*Amo*/);
                    Dualers[0] = playerid;
                    DualJoin = 1;
                    return 1;
        }
        if(DualJoin == 1)
        {
                    SendClientMessageToAll(0x1229FAFF, "The Dual has been started!");
                    SetPlayerPos(playerid, /*XPOS*/, /*YPOS*/, /*ZPOS*/);
                    GivePlayerWeapon(playerid, /*WeaponID*/, /*Amo*/);
                    DualStarted = 1;
                    Dualers[1] = playerid;
        }
        return 1;
    }
    return 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new str[70];
    if(playerid == Dualers[0])
    {
        DualStarted = 0;
        SpawnPlayer(Dualers[1]);
        new Pname[24];
        GetPlayerName(Dualers[1], Pname, sizeof(Pname));
        format(str, sizeof(str), "%s has won the dual!", Pname);
        SendClientMessageToAll(0x1229FAFF, str);
        Dualers[0] = -1;
        Dualers[1] = -1;
    }
    if(playerid == Dualers[1])
    {
        DualStarted = 0;
        SpawnPlayer(Dualers[0]);
        new Pname[24];
        GetPlayerName(Dualers[0], Pname, sizeof(Pname));
        format(str, sizeof(str), "%s has won the dual!", Pname);
        SendClientMessageToAll(0x1229FAFF, str);
        Dualers[0] = -1;
        Dualers[1] = -1;
    }
    return 1;
}
Reply
#10

Can be deleted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)