[Ajuda] Sistema de Duelo
#1

pawn Код:
CMD:duel(playerid,params[])
{
    new
        string[150],
        Float:vida[MAX_PLAYERS]
    ;

    GetPlayerHealth(playerid,vida[playerid]);

    if(NoDuelo[playerid] == true) return SendClientMessage(playerid,red,"ERROR: You are in duel");
    if(DueloSendoUsado == 1) return SendClientMessage(playerid,red,"ERROR: One duel already happening");
    if(duelid == 0 || 11) return SendClientMessage(playerid,red,"ERROR: Duel styles is of 1 on 10!");
    if(sscanf(params,"d",duelid)) return SendClientMessage(playerid,red,"USAGE: /duel [duel id]");


    if(vida[playerid] <= 100)
    {
        format(string,sizeof(string),"[DUEL]: %s teleported to the duel %d ( /duel )",Nome(playerid),duelid);
        SendClientMessageToAll(ciano,string);
    }
    else
    {
        SendClientMessage(playerid,red,"ERROR: Need of full health");
    }

    if(jogadoresnoduel == 2)
    {
        DueloSendoUsado = 1;
    }
    else
    {
    //DUEL STYLE 1
    if(duelid == 1)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,34,9999);
        GivePlayerWeapon(playerid,25,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 2)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,24,9999);
        GivePlayerWeapon(playerid,25,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 3)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,27,9999);
        GivePlayerWeapon(playerid,24,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 4)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,31,9999);
        GivePlayerWeapon(playerid,25,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 5)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,26,9999);
        GivePlayerWeapon(playerid,32,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 6)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,16,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 7)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,26,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 8)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,24,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 9)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,18,9999);

        NoDuelo[playerid] = true;
    }
    else if{
    if(duelid == 10)
    {
        jogadoresnoduel ++;

        SetPlayerPos(playerid,0.0,1.1,2.2);
        SetPlayerVirtualWorld(playerid,254862318);
        SetPlayerInterior(playerid,0);
        SetPlayerArmour(playerid,100.0);
        SetPlayerHealth(playerid,100.0);

        GivePlayerWeapon(playerid,4,1);

        NoDuelo[playerid] = true;
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
   
    }
   
        //[Style 01]: Sniper+Shotgun
        //[Style 02]: Shotgun+Deagle
        //[Style 03]: Spas12+Deagle
        //[Style 04]: M4+Shotgun
        //[Style 05]: Sawn+Tec9
        //[Style 06]: Granade
        //[Style 07]: SwanOff
        //[Style 08]: Deagle
        //[Style 09]: Motovs
        //[Style 10]: Knife
       
    return 1;
}
Queria que desse para entrar so 2 jogadores em cada duelo ou se nao alguem me falar como faz isso em dialog tipo, eu mando duelo pro cara dai aparece pra ele aceitar ou recusar se ele aceitar, o que aceitou recebe um menu com os estilos de armas de duelo dai comeзa. dai desse jeito queria que desse pra duelo so de 2 e 2..

valeu ai e obrigado pela atenзгo.
Reply


Messages In This Thread
Sistema de Duelo - by s4kuL - 13.12.2012, 22:19
Re: Sistema de Duelo - by ViniBorn - 13.12.2012, 22:49
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 01:33
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 13:57
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 17:54
Re: Sistema de Duelo - by JonathanFeitosa - 14.12.2012, 17:57
Re: Sistema de Duelo - by s4kuL - 14.12.2012, 22:31
Re: Sistema de Duelo - by s4kuL - 15.12.2012, 20:40
Re: Sistema de Duelo - by Gleisson_. - 16.12.2012, 02:31
Re: Sistema de Duelo - by s4kuL - 16.12.2012, 06:28

Forum Jump:


Users browsing this thread: 1 Guest(s)